Changeset 64228
- Timestamp:
- 10/07/2026 01:40:25 PM (3 hours ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
-
wp-admin/includes/admin-filters.php (modified) (1 diff)
-
wp-admin/options-general.php (modified) (3 diffs)
-
wp-admin/options.php (modified) (2 diffs)
-
wp-admin/user-edit.php (modified) (2 diffs)
-
wp-includes/functions.php (modified) (1 diff)
-
wp-includes/user.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/admin-filters.php
r64120 r64228 122 122 123 123 add_action( 'admin_notices', 'default_password_nag' ); 124 add_action( 'admin_notices', 'new_user_email_admin_notice' );125 124 126 125 add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 ); -
trunk/src/wp-admin/options-general.php
r63352 r64228 22 22 /* translators: Date and time format for exact current time, mainly about timezones, see https://www.php.net/manual/datetime.format.php */ 23 23 $timezone_format = _x( 'Y-m-d H:i:s', 'timezone date format' ); 24 25 $new_admin_email = get_option( 'new_admin_email' ); 26 $pending_new_admin_email = $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email; 24 27 25 28 add_action( 'admin_head', 'options_general_add_js' ); … … 67 70 <div class="wrap"> 68 71 <h1><?php echo esc_html( $title ); ?></h1> 72 73 <?php 74 if ( isset( $_GET['admin_email_updated'] ) ) { 75 $message = '<strong>' . __( 'Administration email updated.' ) . '</strong>'; 76 wp_admin_notice( 77 $message, 78 array( 79 'id' => 'message', 80 'dismissible' => true, 81 'type' => 'success', 82 ) 83 ); 84 } 85 86 $pending_admin_email_cancel_request_link = sprintf( 87 ' <a href="%1$s">%2$s</a>', 88 esc_url( wp_nonce_url( admin_url( 'options.php?dismiss=new_admin_email' ), 'dismiss-' . get_current_blog_id() . '-new_admin_email' ) ), 89 _x( 'Cancel request', 'admin email change' ) 90 ); 91 92 if ( $pending_new_admin_email ) { 93 $message = sprintf( 94 /* translators: %s: New administration email address. */ 95 __( 'The administration email address has not been updated yet. Please check the inbox at %s for a confirmation email.' ), 96 '<code>' . esc_html( $new_admin_email ) . '</code>' 97 ); 98 $message .= $pending_admin_email_cancel_request_link; 99 wp_admin_notice( $message, array( 'type' => 'info' ) ); 100 } 101 ?> 69 102 70 103 <form method="post" action="options.php" novalidate="novalidate"> … … 267 300 <p class="description" id="new-admin-email-description"><?php _e( 'This address is used for admin purposes. If you change this, an email will be sent to your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?></p> 268 301 <?php 269 $new_admin_email = get_option( 'new_admin_email' ); 270 if ( $new_admin_email && get_option( 'admin_email' ) !== $new_admin_email ) { 302 if ( $pending_new_admin_email ) { 271 303 $pending_admin_email_message = sprintf( 272 /* translators: %s: New admin email. */273 __( 'There is a pending change of the admin email to %s.' ),304 /* translators: %s: New administration email address. */ 305 __( 'There is a pending change of the administration email to %s.' ), 274 306 '<code>' . esc_html( $new_admin_email ) . '</code>' 275 307 ); 276 $pending_admin_email_message .= sprintf( 277 ' <a href="%1$s">%2$s</a>', 278 esc_url( wp_nonce_url( admin_url( 'options.php?dismiss=new_admin_email' ), 'dismiss-' . get_current_blog_id() . '-new_admin_email' ) ), 279 __( 'Cancel' ) 280 ); 308 $pending_admin_email_message .= $pending_admin_email_cancel_request_link; 281 309 wp_admin_notice( 282 310 $pending_admin_email_message, 283 311 array( 284 'additional_classes' => array( 'updated', 'inline' ), 312 'type' => 'info', 313 'additional_classes' => array( 'inline' ), 285 314 ) 286 315 ); -
trunk/src/wp-admin/options.php
r64046 r64228 58 58 if ( ! empty( $_GET['adminhash'] ) ) { 59 59 $new_admin_details = get_option( 'adminhash' ); 60 $redirect = 'options-general.php?updated=false';60 $redirect = add_query_arg( array( 'updated' => 'false' ), 'options-general.php' ); 61 61 62 62 if ( is_array( $new_admin_details ) … … 67 67 delete_option( 'adminhash' ); 68 68 delete_option( 'new_admin_email' ); 69 $redirect = 'options-general.php?updated=true'; 69 $redirect = add_query_arg( 70 array( 71 'updated' => 'true', 72 'admin_email_updated' => 'true', 73 ), 74 'options-general.php', 75 ); 70 76 } 71 77 -
trunk/src/wp-admin/user-edit.php
r64091 r64228 267 267 <div class="wrap" id="profile-page"> 268 268 <h1 class="wp-heading-inline"> 269 <?php echo esc_html( $title ); ?>269 <?php echo esc_html( $title ); ?> 270 270 </h1> 271 272 <?php 273 if ( IS_PROFILE_PAGE ) { 274 new_user_email_admin_notice(); 275 } 276 ?> 271 277 272 278 <?php if ( ! IS_PROFILE_PAGE ) : ?> … … 597 603 ' <a href="%1$s">%2$s</a>', 598 604 esc_url( wp_nonce_url( self_admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ), 'dismiss-' . $current_user->ID . '_new_email' ) ), 599 _ _( 'Cancel' )605 _x( 'Cancel request', 'user email change' ) 600 606 ); 601 607 wp_admin_notice( 602 608 $pending_change_message, 603 609 array( 604 'additional_classes' => array( 'updated', 'inline' ), 610 'type' => 'info', 611 'additional_classes' => array( 'inline' ), 605 612 ) 606 613 ); -
trunk/src/wp-includes/functions.php
r64163 r64228 1267 1267 'activated', 1268 1268 'admin_email_remind_later', 1269 'admin_email_updated', 1269 1270 'approved', 1270 1271 'core-major-auto-updates-saved', -
trunk/src/wp-includes/user.php
r64163 r64228 4018 4018 global $pagenow; 4019 4019 4020 if ( 'profile.php' === $pagenow && isset( $_GET['updated'] ) ) { 4021 $email = get_user_meta( get_current_user_id(), '_new_email', true ); 4020 if ( 'profile.php' === $pagenow ) { 4021 $current_user_id = get_current_user_id(); 4022 $email = get_user_meta( $current_user_id, '_new_email', true ); 4022 4023 if ( $email ) { 4023 4024 $message = sprintf( … … 4025 4026 __( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ), 4026 4027 '<code>' . esc_html( $email['newemail'] ) . '</code>' 4028 ); 4029 $message .= sprintf( 4030 ' <a href="%1$s">%2$s</a>', 4031 esc_url( wp_nonce_url( self_admin_url( 'profile.php?dismiss=' . $current_user_id . '_new_email' ), 'dismiss-' . $current_user_id . '_new_email' ) ), 4032 _x( 'Cancel request', 'user email change' ), 4027 4033 ); 4028 4034 wp_admin_notice( $message, array( 'type' => 'info' ) );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)