Ticket #54181: 54181.patch
File 54181.patch, 1.1 KB (added by , 3 years ago) |
---|
-
class-wp-terms-list-table.php
22 22 private $level; 23 23 24 24 /** 25 * Total items 26 */ 27 private $total_items = 0; 28 29 /** 25 30 * Constructor. 26 31 * 27 32 * @since 3.1.0 … … 127 132 128 133 $this->callback_args = $args; 129 134 135 $this->total_items = wp_count_terms( 136 array( 137 'taxonomy' => $this->screen->taxonomy, 138 'search' => $search, 139 ) 140 ); 141 130 142 $this->set_pagination_args( 131 143 array( 132 'total_items' => wp_count_terms( 133 array( 134 'taxonomy' => $this->screen->taxonomy, 135 'search' => $search, 136 ) 137 ), 144 'total_items' => $this->total_items, 138 145 'per_page' => $tags_per_page, 139 146 ) 140 147 ); … … 141 148 } 142 149 143 150 /** 151 * Determines if the current screen has results 152 * 144 153 * @return bool 145 154 */ 146 155 public function has_items() { 147 // @todo Populate $this->items in prepare_items(). 148 return true; 156 return (int) $this->total_items > 0 ? true : false; 149 157 } 150 158 151 159 /**