Make sure the browser nag in shown first on the dashboard no matter what! See #17323
git-svn-id: http://svn.automattic.com/wordpress/trunk@18295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -943,9 +943,17 @@ function do_meta_boxes($page, $context, $object) {
|
||||
// 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 )
|
||||
$_ids = explode(',', $ids);
|
||||
|
||||
if ( $k = array_search('dashboard_browser_nag', $_ids, true) ) { // it's ok if this is the first value, i.e. $k == 0
|
||||
unset($_ids[$k]);
|
||||
array_unshift($_ids, 'dashboard_browser_nag');
|
||||
}
|
||||
|
||||
foreach ( $_ids as $id ) {
|
||||
if ( $id )
|
||||
add_meta_box( $id, null, null, $page, $box_context, 'sorted' );
|
||||
}
|
||||
}
|
||||
$already_sorted = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user