Display categories again. Props garyc40. Fixes #15857
git-svn-id: https://develop.svn.wordpress.org/trunk@17025 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e58993fe2e
commit
a2d38faed6
|
@ -117,7 +117,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function display_rows() {
|
function display_rows_or_placeholder() {
|
||||||
global $taxonomy;
|
global $taxonomy;
|
||||||
|
|
||||||
$args = wp_parse_args( $this->callback_args, array(
|
$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
|
// convert it to table rows
|
||||||
$out = '';
|
$out = '';
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|
||||||
|
$terms = array();
|
||||||
|
|
||||||
if ( is_taxonomy_hierarchical( $taxonomy ) && !isset( $orderby ) ) {
|
if ( is_taxonomy_hierarchical( $taxonomy ) && !isset( $orderby ) ) {
|
||||||
// We'll need the full set of terms then.
|
// We'll need the full set of terms then.
|
||||||
$args['number'] = $args['offset'] = 0;
|
$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.
|
$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 ) {
|
function _rows( $taxonomy, $terms, &$children, $start = 0, $per_page = 20, &$count, $parent = 0, $level = 0 ) {
|
||||||
|
|
Loading…
Reference in New Issue