Make WordPress Core

Ticket #25313: 25313.7.patch

File 25313.7.patch, 2.6 KB (added by SergeyBiryukov, 13 years ago)
  • src/wp-includes/media.php

     
    873873 *
    874874 * @since 3.6.0
    875875 *
    876  * @param array $attr Attributes of the shortcode.
     876 * @param array  $attr    Attributes of the shortcode.
     877 * @param string $content Optional. Shortcode content.
    877878 * @return string HTML content to display audio.
    878879 */
    879 function wp_audio_shortcode( $attr ) {
     880function wp_audio_shortcode( $attr, $content = '' ) {
    880881        $post_id = get_post() ? get_the_ID() : 0;
    881882
    882883        static $instances = 0;
    … …  
    887888         *
    888889         * @since 3.7.0
    889890         *
    890          * @param null             Empty variable to be replaced with shortcode markup.
    891          * @param array $attr      Attributes of the shortcode.
    892          * @param int   $instances Unique numeric ID of this audio shortcode instance.
     891         * @param null              Empty variable to be replaced with shortcode markup.
     892         * @param array  $attr      Attributes of the shortcode.
     893         * @param string $content   Shortcode content.
     894         * @param int    $instances Unique numeric ID of this audio shortcode instance.
    893895         */
    894         $html = apply_filters( 'wp_audio_shortcode_override', null, $attr, $instances );
    895         if ( null !== $html )
     896        $html = apply_filters( 'wp_audio_shortcode_override', '', $attr, $content, $instances );
     897        if ( '' !== $html )
    896898                return $html;
    897899
    898900        $audio = null;
    … …  
    10081010 *
    10091011 * @since 3.6.0
    10101012 *
    1011  * @param array $attr Attributes of the shortcode.
     1013 * @param array  $attr    Attributes of the shortcode.
     1014 * @param string $content Optional. Shortcode content.
    10121015 * @return string HTML content to display video.
    10131016 */
    1014 function wp_video_shortcode( $attr ) {
     1017function wp_video_shortcode( $attr, $content = '' ) {
    10151018        global $content_width;
    10161019        $post_id = get_post() ? get_the_ID() : 0;
    10171020
    … …  
    10231026         *
    10241027         * @since 3.7.0
    10251028         *
    1026          * @param null             Empty variable to be replaced with shortcode markup.
    1027          * @param array $attr      Attributes of the shortcode.
    1028          * @param int   $instances Unique numeric ID of this video shortcode instance.
     1029         * @param null              Empty variable to be replaced with shortcode markup.
     1030         * @param array  $attr      Attributes of the shortcode.
     1031         * @param string $content   Shortcode content.
     1032         * @param int    $instances Unique numeric ID of this video shortcode instance.
    10291033         */
    1030         $html = apply_filters( 'wp_video_shortcode_override', null, $attr, $instances );
    1031         if ( null !== $html )
     1034        $html = apply_filters( 'wp_video_shortcode_override', '', $attr, $content, $instances );
     1035        if ( '' !== $html )
    10321036                return $html;
    10331037
    10341038        $video = null;