From e729294124f4c9d96d611706e5dcaa301d347014 Mon Sep 17 00:00:00 2001 From: scribu Date: Fri, 17 Dec 2010 11:17:41 +0000 Subject: [PATCH] Display categories again. Props garyc40. Fixes #15857 git-svn-id: http://svn.automattic.com/wordpress/trunk@17025 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-terms-list-table.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index c87ae69df6..b41dd6063c 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -117,7 +117,7 @@ class WP_Terms_List_Table extends WP_List_Table { ); } - function display_rows() { + function display_rows_or_placeholder() { global $taxonomy; $args = wp_parse_args( $this->callback_args, array( @@ -134,6 +134,9 @@ class WP_Terms_List_Table extends WP_List_Table { // convert it to table rows $out = ''; $count = 0; + + $terms = array(); + if ( is_taxonomy_hierarchical( $taxonomy ) && !isset( $orderby ) ) { // We'll need the full set of terms then. $args['number'] = $args['offset'] = 0; @@ -152,8 +155,14 @@ class WP_Terms_List_Table extends WP_List_Table { $out .= $this->single_row( $term, 0, $taxonomy ); $count = $number; // Only displaying a single page. } - - echo $out; + + if ( empty( $terms ) ) { + echo ''; + $this->no_items(); + echo ''; + } else { + echo $out; + } } function _rows( $taxonomy, $terms, &$children, $start = 0, $per_page = 20, &$count, $parent = 0, $level = 0 ) {