diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 0805520957..f711d094f9 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -1452,6 +1452,10 @@ function unregister_setting($option_group, $option_name, $sanitize_callback = '' */ function add_option_update_handler($option_group, $option_name, $sanitize_callback = '') { global $new_whitelist_options; + + if ( 'misc' == $option_group ) + $option_group = 'general'; + $new_whitelist_options[ $option_group ][] = $option_name; if ( $sanitize_callback != '' ) add_filter( "sanitize_option_{$option_name}", $sanitize_callback ); @@ -1468,6 +1472,10 @@ function add_option_update_handler($option_group, $option_name, $sanitize_callba */ function remove_option_update_handler($option_group, $option_name, $sanitize_callback = '') { global $new_whitelist_options; + + if ( 'misc' == $option_group ) + $option_group = 'general'; + $pos = array_search( $option_name, (array) $new_whitelist_options ); if ( $pos !== false ) unset( $new_whitelist_options[ $option_group ][ $pos ] ); diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 712252d087..5ffbad52c2 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -2980,6 +2980,9 @@ function get_hidden_meta_boxes($screen) { function add_settings_section($id, $title, $callback, $page) { global $wp_settings_sections; + if ( 'misc' == $page ) + $page = 'general'; + if ( !isset($wp_settings_sections) ) $wp_settings_sections = array(); if ( !isset($wp_settings_sections[$page]) ) @@ -3015,6 +3018,9 @@ function add_settings_section($id, $title, $callback, $page) { function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) { global $wp_settings_fields; + if ( 'misc' == $page ) + $page = 'general'; + if ( !isset($wp_settings_fields) ) $wp_settings_fields = array(); if ( !isset($wp_settings_fields[$page]) ) diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 88d28b93d5..a5f497378a 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -193,8 +193,6 @@ $menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', $submenu['options-general.php'][30] = array(__('Media'), 'manage_options', 'options-media.php'); $submenu['options-general.php'][35] = array(__('Privacy'), 'manage_options', 'options-privacy.php'); $submenu['options-general.php'][40] = array(__('Permalinks'), 'manage_options', 'options-permalink.php'); - if ( is_super_admin() ) - $submenu['options-general.php'][45] = array(__('Miscellaneous'), 'manage_options', 'options-misc.php'); $_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group diff --git a/wp-admin/options-misc.php b/wp-admin/options-misc.php deleted file mode 100644 index d4c19a5b1e..0000000000 --- a/wp-admin/options-misc.php +++ /dev/null @@ -1,42 +0,0 @@ - - -