WordPress at Your Fingertips
function is not described

WP_Upgrader_Skin::error() public WP 2.8.0

{} It's a method of the class: WP_Upgrader_Skin{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Upgrader_Skin = new WP_Upgrader_Skin();
$WP_Upgrader_Skin->error( $errors );
$errors *(string WP_Error) (required)*

Changelog

Since 2.8.0 Introduced.

Code of WP_Upgrader_Skin::error() WP 5.8.2

public function error( $errors ) {
	if ( ! $this->done_header ) {
		$this->header();
	}
	if ( is_string( $errors ) ) {
		$this->feedback( $errors );
	} elseif ( is_wp_error( $errors ) && $errors->has_errors() ) {
		foreach ( $errors->get_error_messages() as $message ) {
			if ( $errors->get_error_data() && is_string( $errors->get_error_data() ) ) {
				$this->feedback( $message . ' ' . esc_html( strip_tags( $errors->get_error_data() ) ) );
			} else {
				$this->feedback( $message );
			}
		}
	}
}