瀏覽代碼

Independent Publisher 2: Correct issue in JavaScript selector for wide images.

Laurel Fulford 6 年之前
父節點
當前提交
3a8f143114
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      independent-publisher-2/js/independent-publisher-2.js

+ 1 - 1
independent-publisher-2/js/independent-publisher-2.js

@@ -32,7 +32,7 @@
 
 
                     if ( img_width >= 1100
                     if ( img_width >= 1100
                         && img.parents( '.tiled-gallery-item-large' ).length === 0
                         && img.parents( '.tiled-gallery-item-large' ).length === 0
-                        && img.parents().attr( ['class^="wp-block-"'] ).length === 0 ) {
+                        && img.parents( '[class^="wp-block-"]' ).length === 0 ) {
                             $( img ).addClass( 'size-big' );
                             $( img ).addClass( 'size-big' );
                      }
                      }