Changeset 12825
- Timestamp:
- 01/25/2010 09:33:49 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ms-deprecated.php
r12824 r12825 29 29 } 30 30 31 /** 32 * @deprecated 3.0 33 */ 34 function mu_options( $options ) { 35 _deprecated_function(__FUNCTION__, '3.0', '' ); 36 return $options; 37 } 38 31 39 ?> -
trunk/wp-admin/includes/ms.php
r12824 r12825 562 562 } 563 563 add_action( 'admin_page_access_denied', 'redirect_user_to_blog', 99 ); 564 565 function mu_options( $options ) {566 if ( defined( 'POST_BY_EMAIL' ) ) {567 $writing = array( 'ping_sites' );568 } else {569 $writing = array( 'ping_sites', 'mailserver_login', 'mailserver_pass', 'default_email_category', 'mailserver_port', 'mailserver_url' );570 }571 $removed = array(572 'general' => array( 'siteurl', 'home', 'admin_email', 'users_can_register', 'default_role' ),573 'reading' => array( 'gzipcompression' ),574 'writing' => $writing,575 );576 577 $added = array( 'general' => array( 'new_admin_email', 'WPLANG', 'language' ) );578 579 $options[ 'misc' ] = array();580 581 $options = remove_option_whitelist( $removed, $options );582 $options = add_option_whitelist( $added, $options );583 584 return $options;585 }586 add_filter( 'whitelist_options', 'mu_options' );587 564 588 565 function check_import_new_users( $permission ) { -
trunk/wp-admin/includes/plugin.php
r12789 r12825 1065 1065 */ 1066 1066 function add_option_whitelist( $new_options, $options = '' ) { 1067 if ( $options == '' ) {1067 if ( $options == '' ) 1068 1068 global $whitelist_options; 1069 } else {1069 else 1070 1070 $whitelist_options = $options; 1071 } 1072 foreach ( $new_options as $page => $keys ) {1073 foreach ( $keys as $key ) {1071 1072 foreach ( $new_options as $page => $keys ) { 1073 foreach ( $keys as $key ) { 1074 1074 if ( !isset($whitelist_options[ $page ]) || !is_array($whitelist_options[ $page ]) ) { 1075 1075 $whitelist_options[ $page ] = array(); … … 1082 1082 } 1083 1083 } 1084 1084 1085 return $whitelist_options; 1085 1086 } … … 1095 1096 */ 1096 1097 function remove_option_whitelist( $del_options, $options = '' ) { 1097 if ( $options == '' ) {1098 if ( $options == '' ) 1098 1099 global $whitelist_options; 1099 } else {1100 else 1100 1101 $whitelist_options = $options; 1101 } 1102 foreach ( $del_options as $page => $keys ) {1103 foreach ( $keys as $key ) {1102 1103 foreach ( $del_options as $page => $keys ) { 1104 foreach ( $keys as $key ) { 1104 1105 if ( isset($whitelist_options[ $page ]) && is_array($whitelist_options[ $page ]) ) { 1105 1106 $pos = array_search( $key, $whitelist_options[ $page ] ); … … 1109 1110 } 1110 1111 } 1112 1111 1113 return $whitelist_options; 1112 1114 } -
trunk/wp-admin/options.php
r12789 r12825 23 23 24 24 $whitelist_options = array( 25 'general' => array( 'blogname', 'blogdescription', ' admin_email', 'users_can_register', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'default_role', 'timezone_string' ),25 'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string' ), 26 26 'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ), 27 27 'misc' => array( 'use_linksupdate', 'uploads_use_yearmonth_folders', 'upload_path', 'upload_url_path' ), … … 29 29 'privacy' => array( 'blog_public' ), 30 30 'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ), 31 'writing' => array( 'default_post_edit_rows', 'use_smilies', ' ping_sites', 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'enable_app', 'enable_xmlrpc' ),31 'writing' => array( 'default_post_edit_rows', 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'enable_app', 'enable_xmlrpc' ), 32 32 'options' => array( '' ) ); 33 if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl'; 34 if ( !defined( 'WP_HOME' ) ) $whitelist_options['general'][] = 'home'; 33 34 $mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass'); 35 36 if ( !is_multisite() ) { 37 if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl'; 38 if ( !defined( 'WP_HOME' ) ) $whitelist_options['general'][] = 'home'; 39 $whitelist_options['general'][] = 'admin_email'; 40 $whitelist_options['general'][] = 'users_can_register'; 41 $whitelist_options['general'][] = 'default_role'; 42 43 $whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options); 44 $whitelist_options['writing'][] = 'ping_sites'; 45 } else { 46 $whitelist_options['general'][] = 'new_admin_email'; 47 $whitelist_options['general'][] = 'WPLANG'; 48 $whitelist_options['general'][] = 'language'; 49 50 $whitelist_options[ 'misc' ] = array(); 51 52 if ( defined( 'POST_BY_EMAIL' ) ) 53 $whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options); 54 55 $whitelist_options[ 'misc' ] = array(); 56 } 35 57 36 58 $whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); … … 39 61 wp_die(__('Cheatin’ uh?')); 40 62 41 if ( is_multisite() && is_super_admin() && $_GET[ 'adminhash' ] ) {63 if ( is_multisite() && is_super_admin() && isset($_GET[ 'adminhash' ]) && $_GET[ 'adminhash' ] ) { 42 64 $new_admin_details = get_option( 'adminhash' ); 43 65 if ( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && $new_admin_details[ 'newemail' ] != '' ) {
Note: See TracChangeset
for help on using the changeset viewer.