WordPress.org

Make WordPress Core

Changeset 2023


Ignore:
Timestamp:
12/30/04 21:58:01 (10 years ago)
Author:
rboren
Message:

Use load_template().

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r2009 r2023  
    16501650    extract($wp_query->query_vars); 
    16511651 
    1652     include($file); 
     1652    require_once($file); 
    16531653} 
    16541654 
  • trunk/wp-includes/template-functions-general.php

    r2009 r2023  
    44 
    55function get_header() { 
    6     global $wpdb, $wp_query; 
    76    if ( file_exists( TEMPLATEPATH . '/header.php') ) 
    8         require_once( TEMPLATEPATH . '/header.php'); 
     7        load_template( TEMPLATEPATH . '/header.php'); 
    98    else 
    10         require_once( ABSPATH . 'wp-includes/wp-header.php'); 
     9        load_template( ABSPATH . 'wp-includes/wp-header.php'); 
    1110} 
    1211 
    1312function get_footer() { 
    14     global $wpdb, $wp_query; 
    1513    if ( file_exists( TEMPLATEPATH . '/footer.php') ) 
    16         require_once( TEMPLATEPATH . '/footer.php'); 
     14        load_template( TEMPLATEPATH . '/footer.php'); 
    1715    else 
    18         require_once( ABSPATH . 'wp-includes/wp-footer.php'); 
     16        load_template( ABSPATH . 'wp-includes/wp-footer.php'); 
    1917} 
    2018 
    2119function get_sidebar() { 
    22     global $wpdb, $wp_query; 
    2320    if ( file_exists( TEMPLATEPATH . '/sidebar.php') ) 
    24         require_once( TEMPLATEPATH . '/sidebar.php'); 
     21        load_template( TEMPLATEPATH . '/sidebar.php'); 
    2522    else 
    26         require_once( ABSPATH . 'wp-includes/wp-sidebar.php'); 
     23        load_template( ABSPATH . 'wp-includes/wp-sidebar.php'); 
    2724} 
    2825 
Note: See TracChangeset for help on using the changeset viewer.