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