mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Add option defaults. Add arg to get_user_option() to avoid querying options table if user option is missing. see #8229
git-svn-id: https://develop.svn.wordpress.org/trunk@9871 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -869,7 +869,7 @@ function postbox_classes( $id, $page ) {
|
||||
if ( isset( $_GET['edit'] ) && $_GET['edit'] == $id )
|
||||
return '';
|
||||
$current_user = wp_get_current_user();
|
||||
if ( $closed = get_usermeta( $current_user->ID, 'closedpostboxes_'.$page ) ) {
|
||||
if ( $closed = get_user_option('closedpostboxes_'.$page, 0, false ) ) {
|
||||
if ( !is_array( $closed ) ) return '';
|
||||
return in_array( $id, $closed )? 'if-js-closed' : '';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user