Save toggle box open/closed state. Props nbachiyski. fixes #5610

git-svn-id: https://develop.svn.wordpress.org/trunk@6584 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-01-09 17:46:13 +00:00
parent 6445622ec2
commit 90d8fb5f30
5 changed files with 48 additions and 17 deletions

View File

@@ -513,4 +513,11 @@ function wp_edit_posts_query( $q = false ) {
return array($post_stati, $avail_post_stati);
}
function postbox_classes( $id ) {
$current_user = wp_get_current_user();
$closed = get_usermeta( $current_user->ID, 'closedpostboxes' );
if ( !is_array( $closed ) ) return '';
return in_array( $id, $closed )? 'closed' : '';
}
?>