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.
Built from https://develop.svn.wordpress.org/trunk@48663


git-svn-id: http://core.svn.wordpress.org/trunk@48425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-07-28 14:23:04 +00:00
parent fbebb744b0
commit ba445c0a59
2 changed files with 3 additions and 3 deletions

View File

@ -620,10 +620,10 @@ class WP_Term_Query {
$selects = array( 'COUNT(*)' ); $selects = array( 'COUNT(*)' );
break; break;
case 'id=>name': case 'id=>name':
$selects = array( 't.term_id', 't.name', 'tt.count', 'tt.taxonomy' ); $selects = array( 't.term_id', 't.name', 'tt.parent', 'tt.count', 'tt.taxonomy' );
break; break;
case 'id=>slug': case 'id=>slug':
$selects = array( 't.term_id', 't.slug', 'tt.count', 'tt.taxonomy' ); $selects = array( 't.term_id', 't.slug', 'tt.parent', 'tt.count', 'tt.taxonomy' );
break; break;
} }

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.5-beta4-48662'; $wp_version = '5.5-beta4-48663';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.