Changeset 28390
- Timestamp:
- 05/13/2014 05:36:22 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-terms-list-table.php
r28360 r28390 155 155 ) ); 156 156 157 extract( $args, EXTR_SKIP ); 157 $page = $args['page']; 158 // set variable because $args['number'] can be subsequently overridden 159 $number = $args['number']; 158 160 159 161 $args['offset'] = $offset = ( $page - 1 ) * $number; … … 162 164 $count = 0; 163 165 164 $terms = array(); 165 166 if ( is_taxonomy_hierarchical( $taxonomy ) && !isset( $orderby ) ) { 166 if ( is_taxonomy_hierarchical( $taxonomy ) && ! isset( $args['orderby'] ) ) { 167 167 // We'll need the full set of terms then. 168 168 $args['number'] = $args['offset'] = 0; … … 171 171 172 172 if ( empty( $terms ) ) { 173 list( $columns, $hidden ) = $this->get_column_info();174 173 echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">'; 175 174 $this->no_items(); … … 178 177 } 179 178 180 if ( is_taxonomy_hierarchical( $taxonomy ) && ! isset( $orderby) ) {181 if ( ! empty( $search ) )// Ignore children on searches.179 if ( is_taxonomy_hierarchical( $taxonomy ) && ! isset( $args['orderby'] ) ) { 180 if ( ! empty( $args['search'] ) ) {// Ignore children on searches. 182 181 $children = array(); 183 else182 } else { 184 183 $children = _get_term_hierarchy( $taxonomy ); 185 184 } 186 185 // Some funky recursion to get the job done( Paging & parents mainly ) is contained within, Skip it for non-hierarchical taxonomies for performance sake 187 186 $this->_rows( $taxonomy, $terms, $children, $offset, $number, $count ); 188 187 } else { 189 188 $terms = get_terms( $taxonomy, $args ); 190 foreach ( $terms as $term ) 189 foreach ( $terms as $term ) { 191 190 $this->single_row( $term ); 191 } 192 192 $count = $number; // Only displaying a single page. 193 193 }
Note: See TracChangeset
for help on using the changeset viewer.