ACF_Admin_Updates::display_wp_error() public ACF 5.7.10
Adds an admin notice using the provided WP_Error.
{} Это метод класса: ACF_Admin_Updates{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
$ACF_Admin_Updates = new ACF_Admin_Updates(); $ACF_Admin_Updates->display_wp_error( $wp_error );
- $wp_error(WP_Error) (обязательный)
- The error to display.
Список изменений
С версии 5.7.10 | Введена. |
Код ACF_Admin_Updates::display_wp_error() ACF Admin Updates::display wp error ACF 5.9.1
function display_wp_error( $wp_error ) {
// Only show one error on page.
if( acf_has_done('display_wp_error') ) {
return;
}
// Create new notice.
acf_new_admin_notice(array(
'text' => __('<b>Error</b>. Could not connect to update server', 'acf') . ' <span class="description">(' . esc_html( $wp_error->get_error_message() ) . ').</span>',
'type' => 'error'
));
}