Changeset 13705
- Timestamp:
- 03/15/2010 05:18:00 PM (13 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-general.php
r13702 r13705 107 107 <span class="setting-description"><?php _e('This address is used for admin purposes. If you change this we will send you an e-mail at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>') ?></span> 108 108 <?php 109 if ( $new_admin_email = get_option( 'new_admin_email' ) ) : ?> 109 $new_admin_email = get_option( 'new_admin_email' ); 110 if ( $new_admin_email && $new_admin_email != get_option('admin_email') ) : ?> 110 111 <div class="updated inline"> 111 <p><?php printf( __('There is a pending change of the admin e-mail to <code>% s</code>.'), $new_admin_email); ?></p>112 <p><?php printf( __('There is a pending change of the admin e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), $new_admin_email, esc_url( admin_url( 'options.php?dismiss=new_admin_email' ) ) ); ?></p> 112 113 </div> 113 114 <?php endif; ?> -
trunk/wp-admin/options.php
r13661 r13705 76 76 $whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); 77 77 78 if ( is_multisite() && is_super_admin() && !empty($_GET[ 'adminhash' ]) ) { 79 $new_admin_details = get_option( 'adminhash' ); 80 $redirect = admin_url('options-general.php?updated=false'); 81 if ( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && !empty($new_admin_details[ 'newemail' ]) ) { 82 update_option( 'admin_email', $new_admin_details[ 'newemail' ] ); 78 if ( is_multisite() && is_super_admin() ) { 79 if ( ! empty($_GET[ 'adminhash' ] ) ) { 80 $new_admin_details = get_option( 'adminhash' ); 81 $redirect = 'options-general.php?updated=false'; 82 if ( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && !empty($new_admin_details[ 'newemail' ]) ) { 83 update_option( 'admin_email', $new_admin_details[ 'newemail' ] ); 84 delete_option( 'adminhash' ); 85 delete_option( 'new_admin_email' ); 86 $redirect = 'options-general.php?updated=true'; 87 } 88 wp_redirect( admin_url( $redirect ) ); 89 exit; 90 } elseif ( ! empty( $_GET['dismiss'] ) && 'new_admin_email' == $_GET['dismiss'] ) { 83 91 delete_option( 'adminhash' ); 84 92 delete_option( 'new_admin_email' ); 85 $redirect = admin_url('options-general.php?updated=true'); 86 } 87 wp_redirect( $redirect); 88 exit; 93 wp_redirect( admin_url( 'options-general.php?updated=true' ) ); 94 exit; 95 } 89 96 } 90 97
Note: See TracChangeset
for help on using the changeset viewer.