Uses
Uses | Description |
---|---|
wp-includes/class-wp-theme.php: WP_Theme::errors() | Returns errors property. |
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.
(bool) Whether the theme exists.
File: wp-includes/class-wp-theme.php
public function exists() { return ! ( $this->errors() && in_array( 'theme_not_found', $this->errors()->get_error_codes(), true ) ); }
Version | Description |
---|---|
3.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_theme/exists