From 6cd2a49a409477200a83a7b055d6da82837d934f Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 25 Apr 2010 15:59:03 +0000 Subject: [PATCH] Fix back compat for hidden columns and layout screen options. Change meta baox order to be per user, rather than per blog. This breaks back compat for box order but the previous behavior was wrong. see #13032 git-svn-id: http://svn.automattic.com/wordpress/trunk@14235 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-ajax.php | 6 +++--- wp-admin/includes/template.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 7c98208f3e..745678c76a 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -1029,7 +1029,7 @@ case 'hidden-columns' : die('-1'); if ( is_array($hidden) ) - update_user_option($user->ID, "manage-$page-columns-hidden", $hidden); + update_user_option($user->ID, "manage{$page}columnshidden", $hidden, true); die('1'); break; @@ -1046,10 +1046,10 @@ case 'meta-box-order': die('-1'); if ( $order ) - update_user_option($user->ID, "meta-box-order_$page", $order); + update_user_option($user->ID, "meta-box-order_$page", $order, true); if ( $page_columns ) - update_user_option($user->ID, "screen_layout_$page", $page_columns); + update_user_option($user->ID, "screen_layout_$page", $page_columns, true); die('1'); break; diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 206ac87abe..6aaf307538 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -834,7 +834,7 @@ function get_hidden_columns($screen) { if ( is_string($screen) ) $screen = convert_to_screen($screen); - return (array) get_user_option( 'manage-' . $screen->id. '-columns-hidden' ); + return (array) get_user_option( 'manage' . $screen->id. 'columnshidden' ); } /**