wp_set_template_globals()
Set up the globals used for template loading.
No Hooks.
Returns
null. Nothing (null).
Usage
wp_set_template_globals();
Notes
- Global. String.
$wp_stylesheet_pathPath to current theme's stylesheet directory. - Global. String.
$wp_template_pathPath to current theme's template directory.
Changelog
| Since 6.5.0 | Introduced. |
wp_set_template_globals() wp set template globals code WP 7.0
function wp_set_template_globals() {
global $wp_stylesheet_path, $wp_template_path;
$wp_stylesheet_path = get_stylesheet_directory();
$wp_template_path = get_template_directory();
}