Docs: Correct and improve the readability of some parameters of `WP_Term_Query`.

See #48303

Built from https://develop.svn.wordpress.org/trunk@46652


git-svn-id: http://core.svn.wordpress.org/trunk@46452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2019-11-04 17:50:02 +00:00
parent 43ed67661a
commit 2e22c8292d
2 changed files with 15 additions and 15 deletions

View File

@ -121,20 +121,20 @@ class WP_Term_Query {
* not return accurate results when coupled with $object_ids. * not return accurate results when coupled with $object_ids.
* See #41796 for details. * See #41796 for details.
* @type int $offset The number by which to offset the terms query. Default empty. * @type int $offset The number by which to offset the terms query. Default empty.
* @type string $fields Term fields to query for. Accepts 'all' (returns an array of * @type string $fields Term fields to query for. Accepts:
* complete term objects), 'all_with_object_id' (returns an * - 'all' Returns an array of complete term objects (`WP_Term[]`).
* array of term objects with the 'object_id' param; works only * - 'all_with_object_id' Returns an array of term objects with the 'object_id'
* when the `$object_ids` parameter is populated), 'ids' * param (`WP_Term[]`). Works only when the `$object_ids` parameter is populated.
* (returns an array of ids), 'tt_ids' (returns an array of * - 'ids' Returns an array of term IDs (`int[]`).
* term taxonomy ids), 'id=>parent' (returns an associative * - 'tt_ids' Returns an array of term taxonomy IDs (`int[]`).
* array with ids as keys, parent term IDs as values), 'names' * - 'names' Returns an array of term names (`string[]`).
* (returns an array of term names), 'count' (returns the number * - 'slugs' Returns an array of term slugs (`string[]`).
* of matching terms), 'id=>name' (returns an associative array * - 'count' Returns the number of matching terms (`int`).
* with ids as keys, term names as values), or 'id=>slug' * - 'id=>parent' Returns an associative array of parent term IDs, keyed by term ID (`int[]`).
* (returns an associative array with ids as keys, term slugs * - 'id=>name' Returns an associative array of term names, keyed by term ID (`string[]`).
* as values). Default 'all'. * - 'id=>slug' Returns an associative array of term slugs, keyed by term ID (`string[]`).
* @type bool $count Whether to return a term count (true) or array of term objects * Default 'all'.
* (false). Will take precedence over `$fields` if true. * @type bool $count Whether to return a term count. Will take precedence over `$fields` if true.
* Default false. * Default false.
* @type string|array $name Optional. Name or array of names to return term(s) for. * @type string|array $name Optional. Name or array of names to return term(s) for.
* Default empty. * Default empty.

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-alpha-46651'; $wp_version = '5.4-alpha-46652';
/** /**
* 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.