mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Add a wp-video
class to the div
that wraps video shortcode output. It was previously hard to target.
Props nofearinc. Fixes #25896. Built from https://develop.svn.wordpress.org/trunk@26526 git-svn-id: http://core.svn.wordpress.org/trunk@26419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ba55e433a4
commit
e86b10131b
@ -1148,7 +1148,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
|
||||
$html .= wp_mediaelement_fallback( $fileurl );
|
||||
$html .= '</video>';
|
||||
|
||||
$html = sprintf( '<div style="width: %dpx; max-width: 100%%;">%s</div>', $width, $html );
|
||||
$html = sprintf( '<div style="width: %dpx; max-width: 100%%;" class="wp-video">%s</div>', $width, $html );
|
||||
return apply_filters( 'wp_video_shortcode', $html, $atts, $video, $post_id, $library );
|
||||
}
|
||||
add_shortcode( 'video', 'wp_video_shortcode' );
|
||||
|
Loading…
Reference in New Issue
Block a user