WP_Ajax_Upgrader_Skin::get_error_messages()

Retrieves a string for error messages.


Description Description


Return Return

(string) Error messages during an upgrade.


Top ↑

Source Source

File: wp-admin/includes/class-wp-ajax-upgrader-skin.php

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

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

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

Top ↑

Changelog Changelog

Changelog
Version Description
4.6.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.