WP_Ajax_Upgrader_Skin::get_error_messages() – Retrieves a string for error messages.

You appear to be a bot. Output may be restricted

Description

Retrieves a string for error messages.

Usage

$string = WP_Ajax_Upgrader_Skin::get_error_messages();

Parameters

Returns

string Error messages during an upgrade.

Source

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

1 to 15 of 15
  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 );
  }
 

 View on GitHub View on Trac