Changeset 64228 for trunk/src/wp-admin/options-general.php
- Timestamp:
- 10/07/2026 01:40:25 PM (8 hours ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/options-general.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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 );
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)