WP_List_Table::no_items() consistency fixes. See #14579

git-svn-id: http://svn.automattic.com/wordpress/trunk@16109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-10-31 01:29:23 +00:00
parent bb99a95284
commit d75cca7dcf
3 changed files with 20 additions and 11 deletions

View File

@ -616,12 +616,10 @@ class WP_List_Table {
if ( $this->has_items() ) { if ( $this->has_items() ) {
$this->display_table(); $this->display_table();
} else { } else {
echo '<br class="clear">'; ?>
$this->extra_tablenav( 'top' ); <br class="clear">
echo '<br class="clear">'; <p><?php $this->no_items(); ?></p>
echo '<p>'; <?php
$this->no_items();
echo '</p>';
} }
} }

View File

@ -128,6 +128,17 @@ class WP_Media_Table extends WP_List_Table {
} }
function no_items() { function no_items() {
global $detached;
if ( $detached ) {
?>
<div class="tablenav">
<?php $this->extra_tablenav( 'top' ); ?>
</div>
<br class="clear">
<?php
}
_e( 'No media attachments found.' ); _e( 'No media attachments found.' );
} }

View File

@ -122,9 +122,9 @@ class WP_Posts_Table extends WP_List_Table {
global $post_type_object; global $post_type_object;
if ( isset( $_REQUEST['post_status'] ) && 'trash' == $_REQUEST['post_status'] ) if ( isset( $_REQUEST['post_status'] ) && 'trash' == $_REQUEST['post_status'] )
echo $post_type_object->labels->not_found_in_trash; echo $post_type_object->labels->not_found_in_trash . '.';
else else
echo $post_type_object->labels->not_found; echo $post_type_object->labels->not_found . '.';
} }
function get_views() { function get_views() {