Uses
Uses | Description |
---|---|
wp-includes/formatting.php: esc_html() | Escaping for HTML blocks. |
Retrieves a string for error messages.
(string) Error messages during an upgrade.
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 ) { $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 ); }
Version | Description |
---|---|
4.6.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_ajax_upgrader_skin/get_error_messages