wp_set_template_globals

The timeline below displays how wordpress function wp_set_template_globals has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.5

/**
 * Set up the globals used for template loading.
 *
 * @since 6.5.0
 *
 * @global string $wp_stylesheet_path Path to current theme's stylesheet directory.
 * @global string $wp_template_path   Path to current theme's template directory.
 */
function wp_set_template_globals()
{
    global $wp_stylesheet_path, $wp_template_path;
    $wp_stylesheet_path = get_stylesheet_directory();
    $wp_template_path = get_template_directory();
}