Changeset 17857
- Timestamp:
- 05/11/2011 04:57:00 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r17856 r17857 1022 1022 1023 1023 /** 1024 * {@internal Missing Short Description}}1024 * Returns the list of classes to be used by a metabox 1025 1025 * 1026 1026 * @uses get_user_option() … … 1032 1032 */ 1033 1033 function postbox_classes( $id, $page ) { 1034 if ( isset( $_GET['edit'] ) && $_GET['edit'] == $id ) 1035 return ''; 1036 1037 if ( $closed = get_user_option('closedpostboxes_'.$page ) ) { 1034 if ( isset( $_GET['edit'] ) && $_GET['edit'] == $id ) { 1035 $classes = array( '' ); 1036 } elseif ( $closed = get_user_option('closedpostboxes_'.$page ) ) { 1038 1037 if ( !is_array( $closed ) ) { 1039 return '';1040 } 1041 return in_array( $id, $closed )? 'closed' : '';1038 $classes = array( '' ); 1039 } 1040 $classes = in_array( $id, $closed ) ? array( 'closed' ) : array( '' ); 1042 1041 } else { 1043 return ''; 1044 } 1042 $classes = array( '' ); 1043 } 1044 1045 $classes = apply_filters( "postbox_classes_{$page}_{$id}", $classes ); 1046 return implode( ' ', $classes ); 1045 1047 } 1046 1048
Note: See TracChangeset
for help on using the changeset viewer.