Make WordPress Core

Ticket #49030: 49030.diff

File 49030.diff, 609 bytes (added by jeherve, 5 years ago)

Only target videos inside post content

  • src/wp-content/themes/twentytwenty/assets/js/index.js

     
    294294        },
    295295
    296296        makeFit: function() {
    297                 document.querySelectorAll( 'iframe, object, video' ).forEach( function( video ) {
     297                document.querySelectorAll( '.entry-content iframe, .entry-content object, .entry-content video' ).forEach( function( video ) {
    298298                        var ratio, iTargetWidth,
    299299                                container = video.parentNode;
    300300