| 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 | */ |
| 520 | function 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 | */ |
| 546 | function 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 | } |