diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 6c4fce40ea..15a608b0e5 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -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'],