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