From 4cc82e180efb80d764051b23d13eb6597ca61668 Mon Sep 17 00:00:00 2001 From: desrosj Date: Tue, 18 Feb 2020 18:19:06 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@47308 git-svn-id: http://core.svn.wordpress.org/trunk@47108 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets/class-wp-widget-media-video.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 43f3a48cdd..34673a3d52 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-beta1-47307'; +$wp_version = '5.4-beta1-47308'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-media-video.php b/wp-includes/widgets/class-wp-widget-media-video.php index cd22bca5b2..993af35a65 100644 --- a/wp-includes/widgets/class-wp-widget-media-video.php +++ b/wp-includes/widgets/class-wp-widget-media-video.php @@ -129,7 +129,7 @@ class WP_Widget_Media_Video extends WP_Widget_Media { $youtube_pattern = '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#'; $vimeo_pattern = '#^https?://(.+\.)?vimeo\.com/.*#'; - if ( preg_match( $youtube_pattern, $src ) || preg_match( $vimeo_pattern, $src ) ) { + if ( $attachment || preg_match( $youtube_pattern, $src ) || preg_match( $vimeo_pattern, $src ) ) { add_filter( 'wp_video_shortcode', array( $this, 'inject_video_max_width_style' ) ); echo wp_video_shortcode(