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() ) {
$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
}
}

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.' );
}

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() {