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() ) {
$this->display_table();
} else {
echo '<br class="clear">';
$this->extra_tablenav( 'top' );
echo '<br class="clear">';
echo '<p>';
$this->no_items();
echo '</p>';
?>
<br class="clear">
<p><?php $this->no_items(); ?></p>
<?php
}
}
@ -861,4 +859,4 @@ function require_list_table( $class ) {
return false;
}
?>
?>

View File

@ -128,6 +128,17 @@ class WP_Media_Table extends WP_List_Table {
}
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.' );
}
@ -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;
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
echo $post_type_object->labels->not_found;
echo $post_type_object->labels->not_found . '.';
}
function get_views() {
@ -999,4 +999,4 @@ class WP_Posts_Table extends WP_List_Table {
}
}
?>
?>