From d75cca7dcf63da57b6e5096c4c50921befbdc775 Mon Sep 17 00:00:00 2001 From: scribu Date: Sun, 31 Oct 2010 01:29:23 +0000 Subject: [PATCH] WP_List_Table::no_items() consistency fixes. See #14579 git-svn-id: http://svn.automattic.com/wordpress/trunk@16109 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-list-table.php | 12 +++++------- wp-admin/includes/list-table-media.php | 13 ++++++++++++- wp-admin/includes/list-table-posts.php | 6 +++--- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index 90cbfc72c7..4849416edb 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -616,12 +616,10 @@ class WP_List_Table { if ( $this->has_items() ) { $this->display_table(); } else { - echo '
'; - $this->extra_tablenav( 'top' ); - echo '
'; - echo '

'; - $this->no_items(); - echo '

'; +?> +
+

no_items(); ?>

+ \ No newline at end of file +?> diff --git a/wp-admin/includes/list-table-media.php b/wp-admin/includes/list-table-media.php index dcd9b72d53..fc9e359c73 100644 --- a/wp-admin/includes/list-table-media.php +++ b/wp-admin/includes/list-table-media.php @@ -128,6 +128,17 @@ class WP_Media_Table extends WP_List_Table { } function no_items() { + global $detached; + + if ( $detached ) { +?> +
+ extra_tablenav( 'top' ); ?> +
+
+ $column_display_name ) { } } -?> \ No newline at end of file +?> diff --git a/wp-admin/includes/list-table-posts.php b/wp-admin/includes/list-table-posts.php index 188e04aae1..42e1358c3f 100644 --- a/wp-admin/includes/list-table-posts.php +++ b/wp-admin/includes/list-table-posts.php @@ -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 { } } -?> \ No newline at end of file +?>