WordPress at Your Fingertips
function is not described

WP_Ajax_Upgrader_Skin::get_error_messages() public WP 4.6.0

Retrieves a string for error messages.

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

No Hooks.

Return

String. Error messages during an upgrade.

Usage

$WP_Ajax_Upgrader_Skin = new WP_Ajax_Upgrader_Skin();
$WP_Ajax_Upgrader_Skin->get_error_messages();

Changelog

Since 4.6.0 Introduced.

Code of WP_Ajax_Upgrader_Skin::get_error_messages() WP 5.8.2

public function get_error_messages() {
	$messages = array();

	foreach ( $this->errors->get_error_codes() as $error_code ) {
		$error_data = $this->errors->get_error_data( $error_code );

		if ( $error_data && is_string( $error_data ) ) {
			$messages[] = $this->errors->get_error_message( $error_code ) . ' ' . esc_html( strip_tags( $error_data ) );
		} else {
			$messages[] = $this->errors->get_error_message( $error_code );
		}
	}

	return implode( ', ', $messages );
}