Changeset 56142 for trunk/src/wp-includes/theme.php
- Timestamp:
- 07/05/2023 07:28:02 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r55977 r56142 1238 1238 $attr, 1239 1239 array( 1240 'src' => $header->url, 1241 'width' => $width, 1242 'height' => $height, 1243 'alt' => $alt, 1240 'src' => $header->url, 1241 'width' => $width, 1242 'height' => $height, 1243 'alt' => $alt, 1244 'decoding' => 'async', 1244 1245 ) 1245 1246 ); … … 1264 1265 } 1265 1266 } 1267 } 1268 1269 $attr = array_merge( 1270 $attr, 1271 wp_get_loading_optimization_attributes( 'img', $attr, 'get_header_image_tag' ) 1272 ); 1273 1274 /* 1275 * If the default value of `lazy` for the `loading` attribute is overridden 1276 * to omit the attribute for this image, ensure it is not included. 1277 */ 1278 if ( isset( $attr['loading'] ) && ! $attr['loading'] ) { 1279 unset( $attr['loading'] ); 1280 } 1281 1282 // If the `fetchpriority` attribute is overridden and set to false or an empty string. 1283 if ( isset( $attr['fetchpriority'] ) && ! $attr['fetchpriority'] ) { 1284 unset( $attr['fetchpriority'] ); 1285 } 1286 1287 // If the `decoding` attribute is overridden and set to false or an empty string. 1288 if ( isset( $attr['decoding'] ) && ! $attr['decoding'] ) { 1289 unset( $attr['decoding'] ); 1266 1290 } 1267 1291
Note: See TracChangeset
for help on using the changeset viewer.