Change meta-box-hidden to metaboxhidden to adjust for new key sanitization rules and maintain the same key name as 2.9. fixes #13032

git-svn-id: http://svn.automattic.com/wordpress/trunk@14113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-04-16 17:44:38 +00:00
parent 06d1f0b78f
commit e9dae8c287
3 changed files with 4 additions and 4 deletions

View File

@ -1007,7 +1007,7 @@ case 'closed-postboxes' :
if ( is_array($hidden) ) { if ( is_array($hidden) ) {
$hidden = array_diff( $hidden, array('submitdiv', 'linksubmitdiv', 'manage-menu', 'create-menu') ); // postboxes that are always shown $hidden = array_diff( $hidden, array('submitdiv', 'linksubmitdiv', 'manage-menu', 'create-menu') ); // postboxes that are always shown
update_user_option($user->ID, "meta-box-hidden_$page", $hidden, true); update_user_option($user->ID, "metaboxhidden_$page", $hidden, true);
} }
die('1'); die('1');

View File

@ -18,7 +18,7 @@ function wp_nav_menu_metaboxes_setup() {
function wp_initial_nav_menu_meta_boxes() { function wp_initial_nav_menu_meta_boxes() {
global $wp_meta_boxes; global $wp_meta_boxes;
if ( !get_user_option( 'meta-box-hidden_nav-menus' ) && is_array($wp_meta_boxes) ) { if ( !get_user_option( 'metaboxhidden_nav-menus' ) && is_array($wp_meta_boxes) ) {
$initial_meta_boxes = array( 'manage-menu', 'create-menu', 'add-custom-links', 'add-page', 'add-category' ); $initial_meta_boxes = array( 'manage-menu', 'create-menu', 'add-custom-links', 'add-page', 'add-category' );
$hidden_meta_boxes = array(); $hidden_meta_boxes = array();
@ -35,7 +35,7 @@ function wp_initial_nav_menu_meta_boxes() {
} }
} }
$user = wp_get_current_user(); $user = wp_get_current_user();
update_user_meta( $user->ID, 'meta-box-hidden_nav-menus', $hidden_meta_boxes ); update_user_meta( $user->ID, 'metaboxhidden_nav-menus', $hidden_meta_boxes );
// returns all the hidden metaboxes to the js function: wpNavMenu.initial_meta_boxes() // returns all the hidden metaboxes to the js function: wpNavMenu.initial_meta_boxes()
return join( ',', $hidden_meta_boxes ); return join( ',', $hidden_meta_boxes );

View File

@ -2967,7 +2967,7 @@ function get_hidden_meta_boxes($screen) {
if ( is_string($screen) ) if ( is_string($screen) )
$screen = convert_to_screen($screen); $screen = convert_to_screen($screen);
$hidden = get_user_option( "meta-box-hidden_$screen->id" ); $hidden = get_user_option( "metaboxhidden_$screen->id" );
// Hide slug boxes by default // Hide slug boxes by default
if ( !is_array($hidden) ) if ( !is_array($hidden) )