mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Replaces all uses of TEMPLATEPATH and STYLESHEETPATH in core with get_template_directory() and get_stylesheet_directory().
Add `@deprecated` annotations to `TEMPLATEPATH` and `STYLESHEETPATH` definitions. Props obenland, aaroncampbell. Fixes #18298. git-svn-id: https://develop.svn.wordpress.org/trunk@28563 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+6
-4
@@ -322,10 +322,12 @@ $GLOBALS['wp_locale'] = new WP_Locale();
|
||||
|
||||
// Load the functions for the active theme, for both parent and child theme if applicable.
|
||||
if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) {
|
||||
if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
|
||||
include( STYLESHEETPATH . '/functions.php' );
|
||||
if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
|
||||
include( TEMPLATEPATH . '/functions.php' );
|
||||
if ( is_child_theme() && file_exists( get_stylesheet_directory() . '/functions.php' ) ) {
|
||||
include get_stylesheet_directory() . '/functions.php';
|
||||
}
|
||||
if ( file_exists( get_template_directory() . '/functions.php' ) ) {
|
||||
include get_template_directory() . '/functions.php';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user