Media: Pass shortcode attributes to `wp_audio_shortcode_class` and `wp_video_shortcode_class` filters.

Props sathyapulse.
Fixes #37329.
Built from https://develop.svn.wordpress.org/trunk@41234


git-svn-id: http://core.svn.wordpress.org/trunk@41074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2017-08-05 16:42:45 +00:00
parent 1a123e432f
commit 187b4ad48b
2 changed files with 8 additions and 4 deletions

View File

@ -2313,10 +2313,12 @@ function wp_audio_shortcode( $attr, $content = '' ) {
* Filters the class attribute for the audio shortcode output container.
*
* @since 3.6.0
* @since 4.9.0 The `$atts` parameter was added.
*
* @param string $class CSS class or list of space-separated classes.
* @param array $atts Array of audio shortcode attributes.
*/
$atts['class'] = apply_filters( 'wp_audio_shortcode_class', $atts['class'] );
$atts['class'] = apply_filters( 'wp_audio_shortcode_class', $atts['class'], $atts );
$html_atts = array(
'class' => $atts['class'],
@ -2443,7 +2445,7 @@ function wp_video_shortcode( $attr, $content = '' ) {
* @see wp_video_shortcode()
*
* @param string $html Empty variable to be replaced with shortcode markup.
* @param array $attr Attributes of the video shortcode.
* @param array $attr Attributes of the shortcode. @see wp_video_shortcode()
* @param string $content Video shortcode content.
* @param int $instance Unique numeric ID of this video shortcode instance.
*/
@ -2569,10 +2571,12 @@ function wp_video_shortcode( $attr, $content = '' ) {
* Filters the class attribute for the video shortcode output container.
*
* @since 3.6.0
* @since 4.9.0 The `$atts` parameter was added.
*
* @param string $class CSS class or list of space-separated classes.
* @param array $atts Array of video shortcode attributes.
*/
$atts['class'] = apply_filters( 'wp_video_shortcode_class', $atts['class'] );
$atts['class'] = apply_filters( 'wp_video_shortcode_class', $atts['class'], $atts );
$html_atts = array(
'class' => $atts['class'],

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41233';
$wp_version = '4.9-alpha-41234';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.