mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Widgets: Limit container-constraining logic in Text widget to video
, iframe
, object
, and embed
elements.
Amends [41779]. See #40854. Built from https://develop.svn.wordpress.org/trunk@42001 git-svn-id: http://core.svn.wordpress.org/trunk@41835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bebb0b0d82
commit
fd2e006968
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-beta3-42000';
|
||||
$wp_version = '4.9-beta3-42001';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -292,7 +292,7 @@ class WP_Widget_Text extends WP_Widget {
|
||||
echo $args['before_title'] . $title . $args['after_title'];
|
||||
}
|
||||
|
||||
$text = preg_replace_callback( '#<[^>]*>#', array( $this, 'inject_video_max_width_style' ), $text );
|
||||
$text = preg_replace_callback( '#<(video|iframe|object|embed)\s[^>]*>#i', array( $this, 'inject_video_max_width_style' ), $text );
|
||||
|
||||
?>
|
||||
<div class="textwidget"><?php echo $text; ?></div>
|
||||
|
Loading…
Reference in New Issue
Block a user