From 520fe14f7918f683abad082c96bc4075d5927feb Mon Sep 17 00:00:00 2001 From: desrosj Date: Tue, 18 Feb 2020 17:52:06 +0000 Subject: [PATCH] Widgets: Remove unnecessary redundant conditional. Props spacedmonkey. Fixes #46718. Built from https://develop.svn.wordpress.org/trunk@47307 git-svn-id: http://core.svn.wordpress.org/trunk@47107 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 456d3547fa..43f3a48cdd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-beta1-47306'; +$wp_version = '5.4-beta1-47307'; /** * 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 993af35a65..cd22bca5b2 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 ( $attachment || preg_match( $youtube_pattern, $src ) || preg_match( $vimeo_pattern, $src ) ) { + if ( 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(