wp_set_template_globals()WP 6.5.0

Set up the globals used for template loading.

No Hooks.

Return

null. Nothing (null).

Usage

wp_set_template_globals();

Notes

  • Global. String. $wp_stylesheet_path Path to current theme's stylesheet directory.
  • Global. String. $wp_template_path Path to current theme's template directory.

Changelog

Since 6.5.0 Introduced.

wp_set_template_globals() code WP 6.5.4

function wp_set_template_globals() {
	global $wp_stylesheet_path, $wp_template_path;

	$wp_stylesheet_path = get_stylesheet_directory();
	$wp_template_path   = get_template_directory();
}