Skip to content

Commit d623167

Browse files
committed
Fix - Use correct object ‘A3_Lazy_Load’ instead of ‘this’
1 parent b9b3ad5 commit d623167

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

classes/class-a3-lazy-load.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,12 @@ static function filter_content_images( $content ) {
276276
static function get_attachment_image_attributes( $attr ) {
277277
$A3_Lazy_Load = A3_Lazy_Load::_instance();
278278

279-
if ( is_array( $this->_skip_images_classes ) ) {
280-
$skip_images_preg_quoted = array_map( 'preg_quote', $this->_skip_images_classes );
279+
if ( is_array( $A3_Lazy_Load->_skip_images_classes ) ) {
280+
$skip_images_preg_quoted = array_map( 'preg_quote', $A3_Lazy_Load->_skip_images_classes );
281281
$skip_images_regex = sprintf( '/class=".*(%s).*"/s', implode( '|', $skip_images_preg_quoted ) );
282282
}
283283

284-
if ( ! ( is_array( $this->_skip_images_classes ) && preg_match( $skip_images_regex, 'class="'.$attr['class'].'"' ) ) && ! preg_match( "/src=.*lazy_placeholder.gif['\"]/s", 'src="'.$attr['src'].'"' ) ) {
284+
if ( ! ( is_array( $A3_Lazy_Load->_skip_images_classes ) && preg_match( $skip_images_regex, 'class="'.$attr['class'].'"' ) ) && ! preg_match( "/src=.*lazy_placeholder.gif['\"]/s", 'src="'.$attr['src'].'"' ) ) {
285285

286286
$attr['data-src'] = $attr['src'];
287287
$attr['src'] = $A3_Lazy_Load->_placeholder_url;

0 commit comments

Comments
 (0)