Fix Media Library when empty, fixes #8430

git-svn-id: http://svn.automattic.com/wordpress/trunk@9980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-11-30 13:17:27 +00:00
parent 5a81f18aa2
commit 80e0aebc12

View File

@ -7,7 +7,8 @@
*/ */
if ( ! defined('ABSPATH') ) die(); if ( ! defined('ABSPATH') ) die();
?>
if ( have_posts() ) { ?>
<table class="widefat fixed" cellspacing="0"> <table class="widefat fixed" cellspacing="0">
<thead> <thead>
<tr> <tr>
@ -23,7 +24,6 @@ if ( ! defined('ABSPATH') ) die();
<tbody id="the-list" class="list:post"> <tbody id="the-list" class="list:post">
<?php <?php
if ( have_posts() ) {
add_filter('the_title','wp_specialchars'); add_filter('the_title','wp_specialchars');
$alt = ''; $alt = '';
$posts_columns = get_column_headers('upload'); $posts_columns = get_column_headers('upload');
@ -195,15 +195,14 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
} }
?> ?>
</tr> </tr>
<?php <?php endwhile; ?>
endwhile; </tbody>
} else { </table>
?> <?php } else { ?>
<tr>
<td colspan="8"><?php _e('No posts found.') ?></td> <p><?php _e('No posts found.') ?></p>
</tr>
<?php <?php
} // end if ( have_posts() ) } // end if ( have_posts() )
?> ?>
</tbody>
</table>