Changeset 8712 for trunk/wp-admin/includes/template.php
- Timestamp:
- 08/22/2008 06:58:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r8699 r8712 1255 1255 do_action('do_meta_boxes', $page, $context, $object); 1256 1256 1257 $hidden = get_user_option( "meta-box-hidden_$page" ); 1258 1257 1259 echo "<div id='$context-sortables' class='meta-box-sortables'>\n"; 1258 1260 … … 1271 1273 break; 1272 1274 1273 1274 1275 foreach ( array('high', 'sorted', 'core', 'default', 'low') as $priority ) { 1275 1276 foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) { … … 1277 1278 continue; 1278 1279 $i++; 1279 echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . '">' . "\n"; 1280 $style = ''; 1281 if ( in_array($box['id'], $hidden) ) 1282 $style = 'style="display:none;"'; 1283 echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . '" ' . $style . '>' . "\n"; 1280 1284 echo "<h3><span class='hndle'>{$box['title']}</span></h3>\n"; 1281 1285 echo '<div class="inside">' . "\n"; … … 1316 1320 } 1317 1321 1322 function meta_box_prefs($page) { 1323 global $wp_meta_boxes; 1324 1325 if ( empty($wp_meta_boxes[$page]) ) 1326 return; 1327 1328 $hidden = get_user_option( "meta-box-hidden_$page" ); 1329 1330 echo '<ul class="metabox-prefs">'; 1331 foreach ( array_keys($wp_meta_boxes[$page]) as $context ) { 1332 foreach ( array_keys($wp_meta_boxes[$page][$context]) as $priority ) { 1333 foreach ( $wp_meta_boxes[$page][$context][$priority] as $box ) { 1334 if ( false == $box || ! $box['title'] ) 1335 continue; 1336 $box_id = $box['id']; 1337 echo '<label for="' . $box_id . '-hide">'; 1338 echo '<input class="hide-postbox-tog" name="' . $box_id . '-hide" type="checkbox" id="' . $box_id . '-hide" value="' . $box_id . '"' . (! in_array($box_id, $hidden) ? ' checked="checked"' : '') . ' />'; 1339 echo "{$box['title']}</label>"; 1340 } 1341 } 1342 } 1343 echo '</ul>'; 1344 } 1318 1345 ?>
Note: See TracChangeset
for help on using the changeset viewer.