WP_Ajax_Upgrader_Skin::get_error_messages()
Retrieves a string for error messages.
Метод класса: WP_Ajax_Upgrader_Skin{}
Хуков нет.
Возвращает
Строку
. Error messages during an upgrade.
Использование
$WP_Ajax_Upgrader_Skin = new WP_Ajax_Upgrader_Skin(); $WP_Ajax_Upgrader_Skin->get_error_messages();
Список изменений
С версии 4.6.0 | Введена. |
Код WP_Ajax_Upgrader_Skin::get_error_messages() WP Ajax Upgrader Skin::get error messages WP 6.6.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 ); }