Make WordPress Core

Ticket #25313: 25313.2.patch

File 25313.2.patch, 2.8 KB (added by SergeyBiryukov, 13 years ago)
  • src/wp-includes/default-filters.php

     
    245245add_action( 'admin_print_footer_scripts', '_wp_footer_scripts'                             );
    246246add_action( 'admin_print_styles',         'print_admin_styles',                      20    );
    247247add_action( 'init',                       'smilies_init',                             5    );
     248add_action( 'init',                       'wp_add_initial_shortcodes',                0    );
    248249add_action( 'plugins_loaded',             'wp_maybe_load_widgets',                    0    );
    249250add_action( 'plugins_loaded',             'wp_maybe_load_embeds',                     0    );
    250251add_action( 'shutdown',                   'wp_ob_end_flush_all',                      1    );
  • src/wp-includes/media.php

     
    607607        remove_filter( 'wp_get_attachment_image_attributes', '_wp_post_thumbnail_class_filter' );
    608608}
    609609
    610 add_shortcode('wp_caption', 'img_caption_shortcode');
    611 add_shortcode('caption', 'img_caption_shortcode');
    612 
    613610/**
    614611 * The Caption shortcode.
    615612 *
    … …  
    656653        . do_shortcode( $content ) . '<p class="wp-caption-text">' . $caption . '</p></div>';
    657654}
    658655
    659 add_shortcode('gallery', 'gallery_shortcode');
    660 
    661656/**
    662657 * The Gallery shortcode.
    663658 *
    … …  
    946941
    947942        return apply_filters( 'wp_audio_shortcode', $html, $atts, $audio, $post_id, $library );
    948943}
    949 add_shortcode( 'audio', apply_filters( 'wp_audio_shortcode_handler', 'wp_audio_shortcode' ) );
    950944
    951945/**
    952946 * Return a filtered list of WP-supported video formats
    … …  
    10901084        $html = sprintf( '<div style="width: %dpx; max-width: 100%%;">%s</div>', $width, $html );
    10911085        return apply_filters( 'wp_video_shortcode', $html, $atts, $video, $post_id, $library );
    10921086}
    1093 add_shortcode( 'video', apply_filters( 'wp_video_shortcode_handler', 'wp_video_shortcode' ) );
    10941087
    10951088/**
    10961089 * Display previous image link that has the same post parent.
    … …  
    20272020        $gallery = get_post_gallery( $post, false );
    20282021        return empty( $gallery['src'] ) ? array() : $gallery['src'];
    20292022}
     2023
     2024/**
     2025 * Add default shortcodes.
     2026 *
     2027 * @since 3.7.0
     2028 */
     2029function wp_add_initial_shortcodes() {
     2030        add_shortcode( 'wp_caption', 'img_caption_shortcode' );
     2031        add_shortcode( 'caption',    'img_caption_shortcode' );
     2032        add_shortcode( 'gallery',    'gallery_shortcode' );
     2033        add_shortcode( 'audio',      apply_filters( 'wp_audio_shortcode_handler', 'wp_audio_shortcode' ) );
     2034        add_shortcode( 'video',      apply_filters( 'wp_video_shortcode_handler', 'wp_video_shortcode' ) );
     2035}