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
This commit is contained in:
desrosj 2020-02-18 17:52:06 +00:00
parent 447536a0e6
commit 520fe14f79
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -129,7 +129,7 @@ class WP_Widget_Media_Video extends WP_Widget_Media {
$youtube_pattern = '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#'; $youtube_pattern = '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#';
$vimeo_pattern = '#^https?://(.+\.)?vimeo\.com/.*#'; $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' ) ); add_filter( 'wp_video_shortcode', array( $this, 'inject_video_max_width_style' ) );
echo wp_video_shortcode( echo wp_video_shortcode(