Remove one-time loop and redundant isset() checks.

props ipm-frommen.
fixes #30093.

git-svn-id: https://develop.svn.wordpress.org/trunk@30022 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-10-25 16:33:45 +00:00
parent 8e3a90887e
commit 36ee6ba8be
1 changed files with 4 additions and 6 deletions

View File

@ -1111,13 +1111,11 @@ function do_accordion_sections( $screen, $context, $object ) {
<?php
$i = 0;
$first_open = false;
do {
if ( ! isset( $wp_meta_boxes ) || ! isset( $wp_meta_boxes[$page] ) || ! isset( $wp_meta_boxes[$page][$context] ) )
break;
if ( isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
if ( isset( $wp_meta_boxes[$page][$context][$priority] ) ) {
foreach ( $wp_meta_boxes[$page][$context][$priority] as $box ) {
if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
foreach ( $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
if ( false == $box || ! $box['title'] )
continue;
$i++;
@ -1144,7 +1142,7 @@ function do_accordion_sections( $screen, $context, $object ) {
}
}
}
} while(0);
}
?>
</ul><!-- .outer-border -->
</div><!-- .accordion-container -->