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

git-svn-id: https://develop.svn.wordpress.org/trunk@16109 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu 2010-10-31 01:29:23 +00:00
parent 9142cadca4
commit e20f409fd6
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>';
} }
} }
@ -861,4 +859,4 @@ function require_list_table( $class ) {
return false; return false;
} }
?> ?>

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.' );
} }
@ -445,4 +456,4 @@ foreach ( $columns as $column_name => $column_display_name ) {
} }
} }
?> ?>

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() {
@ -999,4 +999,4 @@ class WP_Posts_Table extends WP_List_Table {
} }
} }
?> ?>