Administration: Use wp_admin_notice() in /wp-includes/.

Add usages of `wp_admin_notice()` and `wp_get_admin_notice()` on `.notice-[type]` in the root level of `/wp-includes/`. Ongoing task to implement new function across core.

Props costdev, joedolson.
See #57791.

git-svn-id: https://develop.svn.wordpress.org/trunk@56572 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson
2023-09-14 01:23:37 +00:00
parent fa21528a9a
commit 795534f909
2 changed files with 36 additions and 11 deletions
+6 -2
View File
@@ -3761,8 +3761,12 @@ function new_user_email_admin_notice() {
if ( 'profile.php' === $pagenow && isset( $_GET['updated'] ) ) {
$email = get_user_meta( get_current_user_id(), '_new_email', true );
if ( $email ) {
/* translators: %s: New email address. */
echo '<div class="notice notice-info"><p>' . sprintf( __( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ), '<code>' . esc_html( $email['newemail'] ) . '</code>' ) . '</p></div>';
$message = sprintf(
/* translators: %s: New email address. */
__( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ),
'<code>' . esc_html( $email['newemail'] ) . '</code>'
);
wp_admin_notice( $message, array( 'type' => 'info' ) );
}
}
}