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

WP_Theme::exists() WP 3.4.0

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();
$var = $WP_Theme->exists();

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

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

Код WP Theme::exists: wp-includes/class-wp-theme.php WP 5.4.1

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