acf_pro_display_wp_activation_error()
Adds an admin notice using the provided WP_Error.
No Hooks.
Returns
null. Nothing (null).
Usage
acf_pro_display_wp_activation_error( $wp_error );
- $wp_error(WP_Error) (required)
- The error to display.
Changelog
| Since 5.7.10 | Introduced. |
acf_pro_display_wp_activation_error() acf pro display wp activation error code ACF 6.8.8
function acf_pro_display_wp_activation_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' => __( 'Could not connect to the activation server', 'acf' ) . ' <span class="description">(' . esc_html( $wp_error->get_error_message() ) . ').</span>',
'type' => 'error',
)
);
}