WordPress.org

Make WordPress Core

Changeset 41234


Ignore:
Timestamp:
08/05/17 16:41:39 (4 months ago)
Author:
SergeyBiryukov
Message:

Media: Pass shortcode attributes to wp_audio_shortcode_class and wp_video_shortcode_class filters.

Props sathyapulse.
Fixes #37329.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r41206 r41234  
    23142314     * 
    23152315     * @since 3.6.0 
     2316     * @since 4.9.0 The `$atts` parameter was added. 
    23162317     * 
    23172318     * @param string $class CSS class or list of space-separated classes. 
    2318      */ 
    2319     $atts['class'] = apply_filters( 'wp_audio_shortcode_class', $atts['class'] ); 
     2319     * @param array  $atts  Array of audio shortcode attributes. 
     2320     */ 
     2321    $atts['class'] = apply_filters( 'wp_audio_shortcode_class', $atts['class'], $atts ); 
    23202322 
    23212323    $html_atts = array( 
     
    24442446     * 
    24452447     * @param string $html     Empty variable to be replaced with shortcode markup. 
    2446      * @param array  $attr     Attributes of the video shortcode. 
     2448     * @param array  $attr     Attributes of the shortcode. @see wp_video_shortcode() 
    24472449     * @param string $content  Video shortcode content. 
    24482450     * @param int    $instance Unique numeric ID of this video shortcode instance. 
     
    25702572     * 
    25712573     * @since 3.6.0 
     2574     * @since 4.9.0 The `$atts` parameter was added. 
    25722575     * 
    25732576     * @param string $class CSS class or list of space-separated classes. 
    2574      */ 
    2575     $atts['class'] = apply_filters( 'wp_video_shortcode_class', $atts['class'] ); 
     2577     * @param array  $atts  Array of video shortcode attributes. 
     2578     */ 
     2579    $atts['class'] = apply_filters( 'wp_video_shortcode_class', $atts['class'], $atts ); 
    25762580 
    25772581    $html_atts = array( 
Note: See TracChangeset for help on using the changeset viewer.