Use load_template().
git-svn-id: https://develop.svn.wordpress.org/trunk@2023 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a7c5546375
commit
4553f8cef0
@ -1649,7 +1649,7 @@ function load_template($file) {
|
||||
|
||||
extract($wp_query->query_vars);
|
||||
|
||||
include($file);
|
||||
require_once($file);
|
||||
}
|
||||
|
||||
function add_magic_quotes($array) {
|
||||
|
@ -3,27 +3,24 @@
|
||||
/* Note: these tags go anywhere in the template */
|
||||
|
||||
function get_header() {
|
||||
global $wpdb, $wp_query;
|
||||
if ( file_exists( TEMPLATEPATH . '/header.php') )
|
||||
require_once( TEMPLATEPATH . '/header.php');
|
||||
load_template( TEMPLATEPATH . '/header.php');
|
||||
else
|
||||
require_once( ABSPATH . 'wp-includes/wp-header.php');
|
||||
load_template( ABSPATH . 'wp-includes/wp-header.php');
|
||||
}
|
||||
|
||||
function get_footer() {
|
||||
global $wpdb, $wp_query;
|
||||
if ( file_exists( TEMPLATEPATH . '/footer.php') )
|
||||
require_once( TEMPLATEPATH . '/footer.php');
|
||||
load_template( TEMPLATEPATH . '/footer.php');
|
||||
else
|
||||
require_once( ABSPATH . 'wp-includes/wp-footer.php');
|
||||
load_template( ABSPATH . 'wp-includes/wp-footer.php');
|
||||
}
|
||||
|
||||
function get_sidebar() {
|
||||
global $wpdb, $wp_query;
|
||||
if ( file_exists( TEMPLATEPATH . '/sidebar.php') )
|
||||
require_once( TEMPLATEPATH . '/sidebar.php');
|
||||
load_template( TEMPLATEPATH . '/sidebar.php');
|
||||
else
|
||||
require_once( ABSPATH . 'wp-includes/wp-sidebar.php');
|
||||
load_template( ABSPATH . 'wp-includes/wp-sidebar.php');
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user