Browse Source

Update responsive-videos.js

Prevent responsive-videos script from targeting images in columns block. See #503
alaczek 6 năm trước cách đây
mục cha
commit
831a2cf9ff
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      illustratr/js/responsive-videos.js

+ 5 - 1
illustratr/js/responsive-videos.js

@@ -13,7 +13,11 @@
 	function responsive_videos() {
 
 		$( '.video-wrapper embed, .video-wrapper iframe, .video-wrapper object' ).each( function() {
-
+			
+			if ( $( '.wp-block-column .video-wrapper embed, .wp-block-column .video-wrapper iframe, .wp-block-column .video-wrapper object' ) ) {
+				return;
+			}
+			
 			var video_ratio     = $( this ).attr( 'data-ratio' ),
 			    video_width     = $( this ).attr( 'data-width' ),
 			    video_height    = $( this ).attr( 'data-height' );