mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Look for template files in the stylesheet folder as well as the template folder for inheriting themes. Fixes #7086 props ionfish.
git-svn-id: https://develop.svn.wordpress.org/trunk@8497 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
|
||||
function get_header() {
|
||||
do_action( 'get_header' );
|
||||
if ( file_exists( TEMPLATEPATH . '/header.php') )
|
||||
if ( file_exists( STYLESHEETPATH . '/header.php') )
|
||||
load_template( STYLESHEETPATH . '/header.php');
|
||||
elseif ( file_exists( TEMPLATEPATH . '/header.php') )
|
||||
load_template( TEMPLATEPATH . '/header.php');
|
||||
else
|
||||
load_template( WP_CONTENT_DIR . '/themes/default/header.php');
|
||||
@@ -13,7 +15,9 @@ function get_header() {
|
||||
|
||||
function get_footer() {
|
||||
do_action( 'get_footer' );
|
||||
if ( file_exists( TEMPLATEPATH . '/footer.php') )
|
||||
if ( file_exists( STYLESHEETPATH . '/footer.php') )
|
||||
load_template( STYLESHEETPATH . '/footer.php');
|
||||
elseif ( file_exists( TEMPLATEPATH . '/footer.php') )
|
||||
load_template( TEMPLATEPATH . '/footer.php');
|
||||
else
|
||||
load_template( WP_CONTENT_DIR . '/themes/default/footer.php');
|
||||
@@ -22,8 +26,12 @@ function get_footer() {
|
||||
|
||||
function get_sidebar( $name = null ) {
|
||||
do_action( 'get_sidebar' );
|
||||
if ( isset($name) && file_exists( TEMPLATEPATH . "/sidebar-{$name}.php") )
|
||||
if ( isset($name) && file_exists( STYLESHEETPATH . "/sidebar-{$name}.php") )
|
||||
load_template( STYLESHEETPATH . "/sidebar-{$name}.php");
|
||||
elseif ( isset($name) && file_exists( TEMPLATEPATH . "/sidebar-{$name}.php") )
|
||||
load_template( TEMPLATEPATH . "/sidebar-{$name}.php");
|
||||
elseif ( file_exists( STYLESHEETPATH . '/sidebar.php') )
|
||||
load_template( STYLESHEETPATH . '/sidebar.php');
|
||||
elseif ( file_exists( TEMPLATEPATH . '/sidebar.php') )
|
||||
load_template( TEMPLATEPATH . '/sidebar.php');
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user