WP_Theme::exists()publicWP 3.4.0

Determines whether the theme exists.

A theme with errors exists. A theme with the error of 'theme_not_found', meaning that the theme's directory was not found, does not exist.

Метод класса: WP_Theme{}

Хуков нет.


true|false. Whether the theme exists.


$WP_Theme = new WP_Theme();

Список изменений

С версии 3.4.0 Введена.

Код WP_Theme::exists() WP 6.5.3

public function exists() {
	return ! ( $this->errors() && in_array( 'theme_not_found', $this->errors()->get_error_codes(), true ) );