Make WordPress Core

Changeset 9891


Ignore:
Timestamp:
11/26/2008 12:36:25 AM (17 years ago)
Author:
ryan
Message:

Don't show tables when no posts or pages are found. fixes #8346

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-pages.php

    r9887 r9891  
    166166<?php endif; ?>
    167167
     168<?php if ($posts) { ?>
     169
    168170<div class="tablenav">
    169171
     
    209211<div class="clear"></div>
    210212
    211 <?php
    212 
    213 if ($posts) {
    214 ?>
    215213<table class="widefat page fixed" cellspacing="0">
    216214  <thead>
     
    249247</div>
    250248
     249<?php } else { ?>
     250<div class="clear"></div>
     251<p><?php _e('No pages found.') ?></p>
     252<?php
     253} // end if ($posts)
     254?>
     255
    251256</form>
    252257
     
    254259
    255260<div id="ajax-response"></div>
    256 
    257 <?php
    258 } else {
    259 ?>
    260 </form>
    261 <p><?php _e('No pages found.') ?></p>
    262 <?php
    263 } // end if ($posts)
    264 ?>
    265261
    266262
  • trunk/wp-admin/edit-post-rows.php

    r9735 r9891  
    2323
    2424    <tbody>
    25 <?php
    26 if ( have_posts() ) {
    27     post_rows();
    28 } else {
    29 ?>
    30   <tr>
    31     <td colspan="8"><?php _e('No posts found.') ?></td>
    32   </tr>
    33 <?php
    34 } // end if ( have_posts() )
    35 ?>
     25<?php post_rows(); ?>
    3626    </tbody>
    3727</table>
  • trunk/wp-admin/edit.php

    r9807 r9891  
    120120
    121121<form id="posts-filter" action="" method="get">
     122
    122123<ul class="subsubsub">
    123124<?php
     
    159160<?php endif; ?>
    160161<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
     162
     163<?php if ( have_posts() ) { ?>
    161164
    162165<div class="tablenav">
     
    264267<br class="clear" />
    265268</div>
     269
     270<?php } else { // have_posts() ?>
     271<div class="clear"></div>
     272<p><?php _e('No posts found') ?></p>
     273<?php } ?>
    266274
    267275</form>
Note: See TracChangeset for help on using the changeset viewer.