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.
Метод класса: WP_Theme{}
Хуков нет.
Возвращает
Строку
. Absolute path of the stylesheet directory.
Использование
$WP_Theme = new WP_Theme(); $WP_Theme->get_stylesheet_directory();
Список изменений
С версии 3.4.0 | Введена. |
Код WP_Theme::get_stylesheet_directory() WP Theme::get stylesheet directory WP 6.6.2
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; }