Media: Pass shortcode attributes to `wp_audio_shortcode_class` and `wp_video_shortcode_class` filters.
Props sathyapulse. Fixes #37329. git-svn-id: https://develop.svn.wordpress.org/trunk@41234 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fff8e29cbf
commit
0e0e31d515
|
@ -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'],
|
||||
|
|
Loading…
Reference in New Issue