Don't output empty html wrappers if no page numbers. Fixes #13497 props filosofo.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2010-05-23 07:43:07 +00:00
parent 70d0491c1c
commit 24354ccdb4
1 changed files with 20 additions and 12 deletions

View File

@ -633,9 +633,11 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
<div id="<?php echo $post_type_name; ?>-all" class="tabs-panel tabs-panel-view-all <?php <div id="<?php echo $post_type_name; ?>-all" class="tabs-panel tabs-panel-view-all <?php
echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
?>"> ?>">
<?php if ( ! empty( $page_links ) ) : ?>
<div class="add-menu-item-pagelinks"> <div class="add-menu-item-pagelinks">
<?php echo $page_links; ?> <?php echo $page_links; ?>
</div> </div>
<?php endif; ?>
<ul id="<?php echo $post_type_name; ?>checklist" class="list:<?php echo $post_type_name?> categorychecklist form-no-clear"> <ul id="<?php echo $post_type_name; ?>checklist" class="list:<?php echo $post_type_name?> categorychecklist form-no-clear">
<?php <?php
$args['walker'] = $walker; $args['walker'] = $walker;
@ -648,9 +650,11 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
echo $checkbox_items; echo $checkbox_items;
?> ?>
</ul> </ul>
<?php if ( ! empty( $page_links ) ) : ?>
<div class="add-menu-item-pagelinks"> <div class="add-menu-item-pagelinks">
<?php echo $page_links; ?> <?php echo $page_links; ?>
</div> </div>
<?php endif; ?>
</div><!-- /.tabs-panel --> </div><!-- /.tabs-panel -->
@ -805,18 +809,22 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
<div id="tabs-panel-<?php echo $taxonomy_name; ?>-all" class="tabs-panel tabs-panel-view-all <?php <div id="tabs-panel-<?php echo $taxonomy_name; ?>-all" class="tabs-panel tabs-panel-view-all <?php
echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' ); echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
?>"> ?>">
<?php if ( ! empty( $page_links ) ) : ?>
<div class="add-menu-item-pagelinks"> <div class="add-menu-item-pagelinks">
<?php echo $page_links; ?> <?php echo $page_links; ?>
</div> </div>
<?php endif; ?>
<ul id="<?php echo $taxonomy_name; ?>checklist" class="list:<?php echo $taxonomy_name?> categorychecklist form-no-clear"> <ul id="<?php echo $taxonomy_name; ?>checklist" class="list:<?php echo $taxonomy_name?> categorychecklist form-no-clear">
<?php <?php
$args['walker'] = $walker; $args['walker'] = $walker;
echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $terms), 0, (object) $args ); echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $terms), 0, (object) $args );
?> ?>
</ul> </ul>
<?php if ( ! empty( $page_links ) ) : ?>
<div class="add-menu-item-pagelinks"> <div class="add-menu-item-pagelinks">
<?php echo $page_links; ?> <?php echo $page_links; ?>
</div> </div>
<?php endif; ?>
</div><!-- /.tabs-panel --> </div><!-- /.tabs-panel -->
<p class="button-controls"> <p class="button-controls">