WP_Theme::errors() WordPress Method

The WP_Theme::errors() method is a way for themes to report errors to the WordPress administration interface. By default, this method will only report errors to the php error log. However, if the WP_DEBUG and WP_DEBUG_DISPLAY constants are both set to true, this method will also display errors in the browser.

WP_Theme::errors() #

Returns errors property.


Return

(WP_Error|false) WP_Error if there are errors, or false.


Top ↑

More Information

Returns WP_Error object with error information. If there isn’t any error information then it returns false.


Top ↑

Source

File: wp-includes/class-wp-theme.php

	public function errors() {
		return is_wp_error( $this->errors ) ? $this->errors : false;
	}


Top ↑

Changelog

Changelog
VersionDescription
3.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by the Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.