mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Display categories again. Props garyc40. Fixes #15857
git-svn-id: http://svn.automattic.com/wordpress/trunk@17025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c1e19baef8
commit
e729294124
@ -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;
|
||||
@ -153,7 +156,13 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
$count = $number; // Only displaying a single page.
|
||||
}
|
||||
|
||||
echo $out;
|
||||
if ( empty( $terms ) ) {
|
||||
echo '<tr class="no-items"><td colspan="2">';
|
||||
$this->no_items();
|
||||
echo '</td></tr>';
|
||||
} else {
|
||||
echo $out;
|
||||
}
|
||||
}
|
||||
|
||||
function _rows( $taxonomy, $terms, &$children, $start = 0, $per_page = 20, &$count, $parent = 0, $level = 0 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user