mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-20 11:14:28 +00:00
Users: Display the new user email notice in user admin too.
Also, in `new_user_email_admin_notice()` use the global `$pagenow` and add a translators comment for the placeholder. Fixes #35767. git-svn-id: https://develop.svn.wordpress.org/trunk@36504 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -12,6 +12,7 @@ add_filter( 'wp_handle_upload_prefilter', 'check_upload_size' );
|
||||
|
||||
// User Hooks
|
||||
add_action( 'admin_notices', 'new_user_email_admin_notice' );
|
||||
add_action( 'user_admin_notices', 'new_user_email_admin_notice' );
|
||||
|
||||
add_action( 'admin_page_access_denied', '_access_denied_splash', 99 );
|
||||
|
||||
|
||||
@@ -403,10 +403,15 @@ All at ###SITENAME###
|
||||
* after email address change.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @global string $pagenow
|
||||
*/
|
||||
function new_user_email_admin_notice() {
|
||||
if ( strpos( $_SERVER['PHP_SELF'], 'profile.php' ) && isset( $_GET['updated'] ) && $email = get_option( get_current_user_id() . '_new_email' ) )
|
||||
echo "<div class='update-nag'>" . sprintf( __( "Your email address has not been updated yet. Please check your inbox at %s for a confirmation email." ), $email['newemail'] ) . "</div>";
|
||||
global $pagenow;
|
||||
if ( 'profile.php' === $pagenow && isset( $_GET['updated'] ) && $email = get_option( get_current_user_id() . '_new_email' ) ) {
|
||||
/* translators: %s: New email address */
|
||||
echo '<div class="update-nag">' . sprintf( __( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ), esc_html( $email['newemail'] ) ) . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user