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. Built from https://develop.svn.wordpress.org/trunk@36504 git-svn-id: http://core.svn.wordpress.org/trunk@36471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0eb4f6ccfc
commit
d9a5894c2e
|
@ -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>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36503';
|
||||
$wp_version = '4.5-alpha-36504';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue