Sort screen options for meta boxes according to the meta box's priority.

Props swissspidy.
Fixes #32582.


Built from https://develop.svn.wordpress.org/trunk@32707


git-svn-id: http://core.svn.wordpress.org/trunk@32677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Konstantin Obenland 2015-06-08 12:35:26 +00:00
parent ab1c4329b6
commit 6d56231da3
2 changed files with 7 additions and 4 deletions

View File

@ -77,9 +77,12 @@ function meta_box_prefs( $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][$context]) as $priority ) {
foreach ( $wp_meta_boxes[$screen->id][$context][$priority] as $box ) {
foreach ( array_keys( $wp_meta_boxes[ $screen->id ] ) as $context ) {
foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
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'] )
continue;
// Submit box cannot be hidden

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32706';
$wp_version = '4.3-alpha-32707';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.