WordPress.org

Make WordPress Core

Changeset 47308


Ignore:
Timestamp:
02/18/2020 06:17:53 PM (5 months ago)
Author:
desrosj
Message:

Widgets: Revert [47307].

Even though the source URL for an attachment is stored in a variable, attachments should still be passed through the wp_video_shortcode() function.

Unprops desrosj, spacedmonkey.
See #46718.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-media-video.php

    r47307 r47308  
    130130        $vimeo_pattern   = '#^https?://(.+\.)?vimeo\.com/.*#';
    131131
    132         if ( preg_match( $youtube_pattern, $src ) || preg_match( $vimeo_pattern, $src ) ) {
     132        if ( $attachment || preg_match( $youtube_pattern, $src ) || preg_match( $vimeo_pattern, $src ) ) {
    133133            add_filter( 'wp_video_shortcode', array( $this, 'inject_video_max_width_style' ) );
    134134
Note: See TracChangeset for help on using the changeset viewer.