Widgets: Remove unnecessary redundant conditional.
Props spacedmonkey. Fixes #46718. git-svn-id: https://develop.svn.wordpress.org/trunk@47307 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b797e91541
commit
0d7a5f949d
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue