template filter-hookWP 1.5.0

Filters the name of the active theme.

Usage

add_filter( 'template', 'wp_kama_template_filter' );

/**
 * Function for `template` filter-hook.
 * 
 * @param string $template active theme's directory name.
 *
 * @return string
 */
function wp_kama_template_filter( $template ){

	// filter...
	return $template;
}
$template(string)
active theme's directory name.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

get_template()
template
wp-includes/theme.php 315
return apply_filters( 'template', get_option( 'template' ) );

Where the hook is used in WordPress

wp-includes/class-wp-customize-manager.php 676
add_filter( 'template', array( $this, 'get_template' ) );
wp-includes/class-wp-customize-manager.php 714
remove_filter( 'template', array( $this, 'get_template' ) );