Browse Source

Merge pull request #538 from Automattic/fixes/illustratr-503-responsive-videos

Update responsive-videos.js
Laurel 6 years ago
parent
commit
38604678cd
1 changed files with 8 additions and 0 deletions
  1. 8 0
      illustratr/js/responsive-videos.js

+ 8 - 0
illustratr/js/responsive-videos.js

@@ -14,6 +14,10 @@
 
 
 		$( '.video-wrapper embed, .video-wrapper iframe, .video-wrapper object' ).each( function() {
 		$( '.video-wrapper embed, .video-wrapper iframe, .video-wrapper object' ).each( function() {
 
 
+			if ( $( this ).parents( '.wp-block-column' ).length ) {
+				return;
+			}
+
 			var video_ratio     = $( this ).attr( 'data-ratio' ),
 			var video_ratio     = $( this ).attr( 'data-ratio' ),
 			    video_width     = $( this ).attr( 'data-width' ),
 			    video_width     = $( this ).attr( 'data-width' ),
 			    video_height    = $( this ).attr( 'data-height' );
 			    video_height    = $( this ).attr( 'data-height' );
@@ -41,6 +45,10 @@
 
 
 		$( '.hentry.format-video .entry-media embed, .hentry.format-video .entry-media iframe, .hentry.format-video .entry-media object, .hentry.format-video > .video-wrapper embed, .hentry.format-video > .video-wrapper iframe, .hentry.format-video > .video-wrapper object, .portfolio-entry embed, .portfolio-entry iframe, .portfolio-entry object' ).each( function() {
 		$( '.hentry.format-video .entry-media embed, .hentry.format-video .entry-media iframe, .hentry.format-video .entry-media object, .hentry.format-video > .video-wrapper embed, .hentry.format-video > .video-wrapper iframe, .hentry.format-video > .video-wrapper object, .portfolio-entry embed, .portfolio-entry iframe, .portfolio-entry object' ).each( function() {
 
 
+			if ( $( this ).parents( '.wp-block-column' ).length ) {
+				return;
+			}
+
 			var video_ratio   = $( this ).attr( 'data-ratio' ),
 			var video_ratio   = $( this ).attr( 'data-ratio' ),
 			    video_wrapper = $( this ).parent();
 			    video_wrapper = $( this ).parent();