Make WordPress Core

Ticket #20287: 20287.1.diff

File 20287.1.diff, 2.4 KB (added by MikeHansenMe, 10 years ago)

refreshed

  • src/wp-includes/default-filters.php

     
    210210add_action( 'wp_head',             'wp_print_head_scripts',            9    );
    211211add_action( 'wp_head',             'wp_generator'                           );
    212212add_action( 'wp_head',             'rel_canonical'                          );
     213add_action( 'load_footer',         'load_footer'                            );
    213214add_action( 'wp_footer',           'wp_print_footer_scripts',         20    );
    214215add_action( 'wp_head',             'wp_shortlink_wp_head',            10, 0 );
    215216add_action( 'template_redirect',   'wp_shortlink_header',             11, 0 );
  • src/wp-includes/template.php

     
    503503                require( $_template_file );
    504504}
    505505
     506/**
     507 * Load header template.
     508 *
     509 * Includes the header template for a theme or if a name is specified then a
     510 * specialised header will be included.
     511 *
     512 * For the parameter, if the file is called "header-special.php" then specify
     513 * "special".
     514 *
     515 * @since 3.4
     516 * @uses locate_template()
     517 *
     518 * @param string $name The name of the specialised header.
     519 */
     520function load_header( $name = null ) {
     521        $templates = array();
     522        if ( isset($name) )
     523                $templates[] = "header-{$name}.php";
     524
     525        $templates[] = 'header.php';
     526
     527        // Backward compat code will be removed in a future release
     528        if ('' == locate_template($templates, true))
     529                load_template( ABSPATH . WPINC . '/theme-compat/header.php');
     530}
     531
     532/**
     533 * Load footer template.
     534 *
     535 * Includes the footer template for a theme or if a name is specified then a
     536 * specialised footer will be included.
     537 *
     538 * For the parameter, if the file is called "footer-special.php" then specify
     539 * "special".
     540 *
     541 * @since 3.4
     542 * @uses locate_template()
     543 *
     544 * @param string $name The name of the specialised footer.
     545 */
     546function load_footer( $name = null ) {
     547        $templates = array();
     548        if ( isset($name) )
     549                $templates[] = "footer-{$name}.php";
     550
     551        $templates[] = 'footer.php';
     552
     553        // Backward compat code will be removed in a future release
     554        if ('' == locate_template($templates, true))
     555                load_template( ABSPATH . WPINC . '/theme-compat/footer.php');
     556}