Commit 6a547e14 authored by Sergey Biryukov's avatar Sergey Biryukov
Browse files

Taxonomy: Ensure the `child_of` argument of `get_terms()` works as expected...

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: https://core.svn.wordpress.org/trunk@48425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 38736fe4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -620,10 +620,10 @@ class WP_Term_Query {
				$selects = array( 'COUNT(*)' );
				break;
			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;
			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;
		}

+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
 *
 * @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.