Changeset 14241
- Timestamp:
- 04/26/2010 05:55:41 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/options.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options.php
r14139 r14241 31 31 wp_die(__('Cheatin’ uh?')); 32 32 33 // Handle admin email change requests 34 if ( is_multisite() ) { 35 if ( ! empty($_GET[ 'adminhash' ] ) ) { 36 $new_admin_details = get_option( 'adminhash' ); 37 $redirect = 'options-general.php?updated=false'; 38 if ( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && !empty($new_admin_details[ 'newemail' ]) ) { 39 update_option( 'admin_email', $new_admin_details[ 'newemail' ] ); 40 delete_option( 'adminhash' ); 41 delete_option( 'new_admin_email' ); 42 $redirect = 'options-general.php?updated=true'; 43 } 44 wp_redirect( admin_url( $redirect ) ); 45 exit; 46 } elseif ( ! empty( $_GET['dismiss'] ) && 'new_admin_email' == $_GET['dismiss'] ) { 47 delete_option( 'adminhash' ); 48 delete_option( 'new_admin_email' ); 49 wp_redirect( admin_url( 'options-general.php?updated=true' ) ); 50 exit; 51 } 52 } 53 33 54 if ( is_multisite() && !is_super_admin() && 'update' != $action ) 34 55 wp_die(__('Cheatin’ uh?')); … … 72 93 73 94 $whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); 74 75 if ( is_multisite() && is_super_admin() ) {76 if ( ! empty($_GET[ 'adminhash' ] ) ) {77 $new_admin_details = get_option( 'adminhash' );78 $redirect = 'options-general.php?updated=false';79 if ( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && !empty($new_admin_details[ 'newemail' ]) ) {80 update_option( 'admin_email', $new_admin_details[ 'newemail' ] );81 delete_option( 'adminhash' );82 delete_option( 'new_admin_email' );83 $redirect = 'options-general.php?updated=true';84 }85 wp_redirect( admin_url( $redirect ) );86 exit;87 } elseif ( ! empty( $_GET['dismiss'] ) && 'new_admin_email' == $_GET['dismiss'] ) {88 delete_option( 'adminhash' );89 delete_option( 'new_admin_email' );90 wp_redirect( admin_url( 'options-general.php?updated=true' ) );91 exit;92 }93 }94 95 95 96 /*
Note: See TracChangeset
for help on using the changeset viewer.