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
This commit is contained in:
parent
520fe14f79
commit
4cc82e180e
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -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 ( 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' ) );
|
add_filter( 'wp_video_shortcode', array( $this, 'inject_video_max_width_style' ) );
|
||||||
|
|
||||||
echo wp_video_shortcode(
|
echo wp_video_shortcode(
|
||||||
|
|
Loading…
Reference in New Issue