Ticket #9960: 9960.diff
| File 9960.diff, 1.1 KB (added by Denis-de-Bernardy, 4 years ago) |
|---|
-
wp-includes/taxonomy.php
630 630 $args['number'] = absint( $args['number'] ); 631 631 $args['offset'] = absint( $args['offset'] ); 632 632 if ( !$single_taxonomy || !is_taxonomy_hierarchical($taxonomies[0]) || 633 '' != $args['parent'] ) {633 '' !== $args['parent'] ) { 634 634 $args['child_of'] = 0; 635 635 $args['hierarchical'] = false; 636 636 $args['pad_counts'] = false; … … 745 745 if ( !empty($name__like) ) 746 746 $where .= " AND t.name LIKE '{$name__like}%'"; 747 747 748 if ( '' != $parent ) {748 if ( '' !== $parent ) { 749 749 $parent = (int) $parent; 750 750 $where .= " AND tt.parent = '$parent'"; 751 751 } … … 754 754 $where .= ' AND tt.count > 0'; 755 755 756 756 // don't limit the query results when we have to descend the family tree 757 if ( ! empty($number) && ! $hierarchical && empty( $child_of ) && '' == $parent ) {757 if ( ! empty($number) && ! $hierarchical && empty( $child_of ) && '' === $parent ) { 758 758 if( $offset ) 759 759 $limit = 'LIMIT ' . $offset . ',' . $number; 760 760 else
