id; $hidden = get_hidden_meta_boxes( $screen ); $i = 0; do { // Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose if ( ! $already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) foreach ( $sorted as $box_context => $ids ) foreach ( explode(',', $ids ) as $id ) if ( $id && 'dashboard_browser_nag' !== $id ) add_meta_box( $id, null, null, $screen, $box_context, 'sorted' ); $already_sorted = true; if ( ! isset( $wp_meta_boxes ) || ! isset( $wp_meta_boxes[$page] ) || ! isset( $wp_meta_boxes[$page][$context] ) ) break; foreach ( array( 'high', 'sorted', 'core', 'default', 'low' ) as $priority ) { if ( isset( $wp_meta_boxes[$page][$context][$priority] ) ) { foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) { if ( false == $box || ! $box['title'] ) continue; $i++; $hidden_class = in_array($box['id'], $hidden) ? ' hide-if-js' : ''; ?>