Changeset 54920
- Timestamp:
- 12/01/2022 03:41:12 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r54895 r54920 2868 2868 } 2869 2869 2870 // Add `loading` a ttribute.2870 // Add `loading` and `decoding` attributes. 2871 2871 $extra_attr = $args['extra_attr']; 2872 $loading = $args['loading']; 2873 2874 if ( in_array( $loading, array( 'lazy', 'eager' ), true ) && ! preg_match( '/\bloading\s*=/', $extra_attr ) ) { 2872 2873 if ( in_array( $args['loading'], array( 'lazy', 'eager' ), true ) 2874 && ! preg_match( '/\bloading\s*=/', $extra_attr ) 2875 ) { 2875 2876 if ( ! empty( $extra_attr ) ) { 2876 2877 $extra_attr .= ' '; 2877 2878 } 2878 2879 2879 $extra_attr .= "loading='{$loading}'"; 2880 } 2881 2882 if ( in_array( $args['decoding'], array( 'async', 'sync', 'auto' ), true ) && ! preg_match( '/\bdecoding\s*=/', $extra_attr ) ) { 2880 $extra_attr .= "loading='{$args['loading']}'"; 2881 } 2882 2883 if ( in_array( $args['decoding'], array( 'async', 'sync', 'auto' ), true ) 2884 && ! preg_match( '/\bdecoding\s*=/', $extra_attr ) 2885 ) { 2883 2886 if ( ! empty( $extra_attr ) ) { 2884 2887 $extra_attr .= ' '; 2885 2888 } 2889 2886 2890 $extra_attr .= "decoding='{$args['decoding']}'"; 2887 2891 }
Note: See TracChangeset
for help on using the changeset viewer.