Call wp_menu_unfold() after user settings have been synchronized

git-svn-id: http://svn.automattic.com/wordpress/trunk@11135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-04-30 07:17:05 +00:00
parent 05e168fd95
commit 0ca846c54d
2 changed files with 2 additions and 2 deletions

View File

@ -12,6 +12,7 @@ if (!isset($_GET["page"])) require_once('admin.php');
get_admin_page_title();
$title = wp_specialchars( strip_tags( $title ) );
wp_user_settings();
wp_menu_unfold();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes();

View File

@ -363,9 +363,8 @@ function set_screen_options() {
}
}
add_action( 'admin_init', 'wp_menu_unfold' );
function wp_menu_unfold() {
if ( isset($_GET['unfoldmenu']) && $user = get_current_user() ) {
if ( isset($_GET['unfoldmenu']) ) {
delete_user_setting('mfold');
wp_redirect( remove_query_arg( 'unfoldmenu', stripslashes($_SERVER['REQUEST_URI']) ) );
exit;