Sort screen options for meta boxes according to the meta box's priority.
Props swissspidy. Fixes #32582. git-svn-id: https://develop.svn.wordpress.org/trunk@32707 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
11de1cedaa
commit
99d0d85fb0
@ -77,9 +77,12 @@ function meta_box_prefs( $screen ) {
|
|||||||
|
|
||||||
$hidden = get_hidden_meta_boxes($screen);
|
$hidden = get_hidden_meta_boxes($screen);
|
||||||
|
|
||||||
foreach ( array_keys($wp_meta_boxes[$screen->id]) as $context ) {
|
foreach ( array_keys( $wp_meta_boxes[ $screen->id ] ) as $context ) {
|
||||||
foreach ( array_keys($wp_meta_boxes[$screen->id][$context]) as $priority ) {
|
foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
|
||||||
foreach ( $wp_meta_boxes[$screen->id][$context][$priority] as $box ) {
|
if ( ! isset( $wp_meta_boxes[ $screen->id ][ $context ][ $priority ] ) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
foreach ( $wp_meta_boxes[ $screen->id ][ $context ][ $priority ] as $box ) {
|
||||||
if ( false == $box || ! $box['title'] )
|
if ( false == $box || ! $box['title'] )
|
||||||
continue;
|
continue;
|
||||||
// Submit box cannot be hidden
|
// Submit box cannot be hidden
|
||||||
|
Loading…
Reference in New Issue
Block a user