WP_Theme::get_theme_root() WordPress Method
The WP_Theme::get_theme_root() method is used to get the absolute path to the directory where themes are located. This is useful for retrieving the path to a specific theme or file within a theme.
WP_Theme::get_theme_root() #
Returns the absolute path to the directory of the theme root.
Description
This is typically the absolute path to wp-content/themes.
Return
(string) Theme root.
Source
File: wp-includes/class-wp-theme.php
public function get_theme_root() { return $this->theme_root; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |