WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Theme::get_template_directory() WP 3.4.0

Returns the absolute path to the directory of a theme's "template" files.

In the case of a child theme, this is the absolute path to the directory of the parent theme's files.

Это метод класса: WP_Theme

Хуков нет.


Строку. Absolute path of the template directory.


$WP_Theme = new WP_Theme();
$var = $WP_Theme->get_template_directory();

Код WP Theme::get template directory: wp-includes/class-wp-theme.php WP 5.2.1

public function get_template_directory() {
	if ( $this->parent() ) {
		$theme_root = $this->parent()->theme_root;
	} else {
		$theme_root = $this->theme_root;

	return $theme_root . '/' . $this->template;