Ticket #20287: 20287.patch
| File 20287.patch, 4.5 KB (added by johnbillion, 14 months ago) |
|---|
-
wp-includes/default-filters.php
193 193 add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object' ); 194 194 195 195 // Actions 196 add_action( 'load_header', 'load_header' ); 196 197 add_action( 'wp_head', 'wp_enqueue_scripts', 1 ); 197 198 add_action( 'wp_head', 'feed_links', 2 ); 198 199 add_action( 'wp_head', 'feed_links_extra', 3 ); … … 206 207 add_action( 'wp_head', 'wp_print_head_scripts', 9 ); 207 208 add_action( 'wp_head', 'wp_generator' ); 208 209 add_action( 'wp_head', 'rel_canonical' ); 210 add_action( 'load_footer', 'load_footer' ); 209 211 add_action( 'wp_footer', 'wp_print_footer_scripts', 20 ); 210 212 add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 ); 211 213 add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 ); -
wp-includes/general-template.php
15 15 * For the parameter, if the file is called "header-special.php" then specify 16 16 * "special". 17 17 * 18 * @uses locate_template()19 18 * @since 1.5.0 20 19 * @uses do_action() Calls 'get_header' action. 20 * @uses do_action() Calls 'load_header' action. 21 21 * 22 22 * @param string $name The name of the specialised header. 23 23 */ 24 24 function get_header( $name = null ) { 25 25 do_action( 'get_header', $name ); 26 27 $templates = array(); 28 if ( isset($name) ) 29 $templates[] = "header-{$name}.php"; 30 31 $templates[] = 'header.php'; 32 33 // Backward compat code will be removed in a future release 34 if ('' == locate_template($templates, true)) 35 load_template( ABSPATH . WPINC . '/theme-compat/header.php'); 26 do_action( 'load_header', $name ); 36 27 } 37 28 38 29 /** … … 44 35 * For the parameter, if the file is called "footer-special.php" then specify 45 36 * "special". 46 37 * 47 * @uses locate_template()48 38 * @since 1.5.0 49 39 * @uses do_action() Calls 'get_footer' action. 40 * @uses do_action() Calls 'load_footer' action. 50 41 * 51 42 * @param string $name The name of the specialised footer. 52 43 */ 53 44 function get_footer( $name = null ) { 54 45 do_action( 'get_footer', $name ); 55 56 $templates = array(); 57 if ( isset($name) ) 58 $templates[] = "footer-{$name}.php"; 59 60 $templates[] = 'footer.php'; 61 62 // Backward compat code will be removed in a future release 63 if ('' == locate_template($templates, true)) 64 load_template( ABSPATH . WPINC . '/theme-compat/footer.php'); 46 do_action( 'load_footer', $name ); 65 47 } 66 48 67 49 /** -
wp-includes/template.php
392 392 require( $_template_file ); 393 393 } 394 394 395 /** 396 * Load header template. 397 * 398 * Includes the header template for a theme or if a name is specified then a 399 * specialised header will be included. 400 * 401 * For the parameter, if the file is called "header-special.php" then specify 402 * "special". 403 * 404 * @since 3.4 405 * @uses locate_template() 406 * 407 * @param string $name The name of the specialised header. 408 */ 409 function load_header( $name = null ) { 410 $templates = array(); 411 if ( isset($name) ) 412 $templates[] = "header-{$name}.php"; 413 414 $templates[] = 'header.php'; 415 416 // Backward compat code will be removed in a future release 417 if ('' == locate_template($templates, true)) 418 load_template( ABSPATH . WPINC . '/theme-compat/header.php'); 419 } 420 421 /** 422 * Load footer template. 423 * 424 * Includes the footer template for a theme or if a name is specified then a 425 * specialised footer will be included. 426 * 427 * For the parameter, if the file is called "footer-special.php" then specify 428 * "special". 429 * 430 * @since 3.4 431 * @uses locate_template() 432 * 433 * @param string $name The name of the specialised footer. 434 */ 435 function load_footer( $name = null ) { 436 $templates = array(); 437 if ( isset($name) ) 438 $templates[] = "footer-{$name}.php"; 439 440 $templates[] = 'footer.php'; 441 442 // Backward compat code will be removed in a future release 443 if ('' == locate_template($templates, true)) 444 load_template( ABSPATH . WPINC . '/theme-compat/footer.php'); 445 }
