Skip class doesnt work on post attachment (featured image)
-
I could not get this to work so on row 260 in /wp-content/plugins/a3-lazy-load/classes/class-a3-lazy-load.php I replaced:
add_filter( 'wp_get_attachment_image_attributes', array( $A3_Lazy_Load, 'get_attachment_image_attributes' ), 200 );
with
if ( is_array( $A3_Lazy_Load->_skip_images_classes ) ) { $skip_images_preg_quoted = array_map( 'preg_quote', $A3_Lazy_Load->_skip_images_classes ); $skip_images_regex = sprintf( '/class=".*(%s).*"/s', implode( '|', $skip_images_preg_quoted ) ); } if ( ( is_array( $A3_Lazy_Load->_skip_images_classes ) && preg_match( $skip_images_regex, $imgHTML ) ) ) { add_filter( 'wp_get_attachment_image_attributes', array( $A3_Lazy_Load, 'get_attachment_image_attributes' ), 200 ); }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Skip class doesnt work on post attachment (featured image)’ is closed to new replies.