Make WordPress Core


Ignore:
Timestamp:
07/28/2020 02:21:54 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Taxonomy: Ensure the child_of argument of get_terms() works as expected with 'fields' => 'id=>name' or 'id=>slug'.

Props Howdy_McGee, deepaklalwani, planvova.
Fixes #46768.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-term-query.php

    r48586 r48663  
    621621                break;
    622622            case 'id=>name':
    623                 $selects = array( 't.term_id', 't.name', 'tt.count', 'tt.taxonomy' );
     623                $selects = array( 't.term_id', 't.name', 'tt.parent', 'tt.count', 'tt.taxonomy' );
    624624                break;
    625625            case 'id=>slug':
    626                 $selects = array( 't.term_id', 't.slug', 'tt.count', 'tt.taxonomy' );
     626                $selects = array( 't.term_id', 't.slug', 'tt.parent', 'tt.count', 'tt.taxonomy' );
    627627                break;
    628628        }
Note: See TracChangeset for help on using the changeset viewer.