WP_Theme::get_stylesheet_directory
Returns the absolute path to the directory of a theme's "stylesheet" files.
In the case of a child theme, this is the absolute path to the directory of the child theme's files.
Method of the class: WP_Theme{}
No Hooks.
Returns
String. Absolute path of the stylesheet directory.
Usage
$WP_Theme = new WP_Theme(); $WP_Theme->get_stylesheet_directory();
Changelog
| Since 3.4.0 | Introduced. |
WP_Theme::get_stylesheet_directory() WP Theme::get stylesheet directory code WP 7.0
public function get_stylesheet_directory() {
if ( $this->errors() && in_array( 'theme_root_missing', $this->errors()->get_error_codes(), true ) ) {
return '';
}
return $this->theme_root . '/' . $this->stylesheet;
}