Changeset 31285 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 01/26/2015 07:03:09 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r31284 r31285 1888 1888 case 'ids': 1889 1889 case 'id=>parent': 1890 $selects = array( 't.term_id', 'tt.parent', 'tt.count' );1890 $selects = array( 't.term_id', 'tt.parent', 'tt.count', 'tt.taxonomy' ); 1891 1891 break; 1892 1892 case 'names': 1893 $selects = array( 't.term_id', 'tt.parent', 'tt.count', 't.name' );1893 $selects = array( 't.term_id', 'tt.parent', 'tt.count', 't.name', 'tt.taxonomy' ); 1894 1894 break; 1895 1895 case 'count': … … 1899 1899 break; 1900 1900 case 'id=>name': 1901 $selects = array( 't.term_id', 't.name', 'tt.count' );1901 $selects = array( 't.term_id', 't.name', 'tt.count', 'tt.taxonomy' ); 1902 1902 break; 1903 1903 case 'id=>slug': 1904 $selects = array( 't.term_id', 't.slug', 'tt.count' );1904 $selects = array( 't.term_id', 't.slug', 'tt.count', 'tt.taxonomy' ); 1905 1905 break; 1906 1906 } … … 1975 1975 } 1976 1976 } 1977 1977 1978 // Make sure we show empty categories that have children. 1978 1979 if ( $hierarchical && $args['hide_empty'] && is_array( $terms ) ) { 1979 1980 foreach ( $terms as $k => $term ) { 1980 1981 if ( ! $term->count ) { 1981 $children = get_term_children( $term->term_id, reset( $taxonomies ));1982 $children = get_term_children( $term->term_id, $term->taxonomy ); 1982 1983 if ( is_array( $children ) ) { 1983 1984 foreach ( $children as $child_id ) { 1984 $child = get_term( $child_id, reset( $taxonomies ));1985 $child = get_term( $child_id, $term->taxonomy ); 1985 1986 if ( $child->count ) { 1986 1987 continue 2;
Note: See TracChangeset
for help on using the changeset viewer.