mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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' : '';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user