Docs: Improve formatting of the $fields
parameter description in WP_Term_Query::__construct()
.
See #44305, #49572. git-svn-id: https://develop.svn.wordpress.org/trunk@48562 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3d2cd19b4f
commit
e88e84c662
@ -128,19 +128,23 @@ class WP_Term_Query {
|
|||||||
* @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:
|
* @type string $fields Term fields to query for. Accepts:
|
||||||
* - 'all' Returns an array of complete term objects (`WP_Term[]`).
|
* - 'all' Returns an array of complete term objects (`WP_Term[]`).
|
||||||
* - 'all_with_object_id' Returns an array of term objects with the 'object_id'
|
* - 'all_with_object_id' Returns an array of term objects
|
||||||
* param (`WP_Term[]`). Works only when the `$object_ids` parameter is populated.
|
* with the 'object_id' param (`WP_Term[]`). Works only
|
||||||
|
* when the `$object_ids` parameter is populated.
|
||||||
* - 'ids' Returns an array of term IDs (`int[]`).
|
* - 'ids' Returns an array of term IDs (`int[]`).
|
||||||
* - 'tt_ids' Returns an array of term taxonomy IDs (`int[]`).
|
* - 'tt_ids' Returns an array of term taxonomy IDs (`int[]`).
|
||||||
* - 'names' Returns an array of term names (`string[]`).
|
* - 'names' Returns an array of term names (`string[]`).
|
||||||
* - 'slugs' Returns an array of term slugs (`string[]`).
|
* - 'slugs' Returns an array of term slugs (`string[]`).
|
||||||
* - 'count' Returns the number of matching terms (`int`).
|
* - 'count' Returns the number of matching terms (`int`).
|
||||||
* - 'id=>parent' Returns an associative array of parent term IDs, keyed by term ID (`int[]`).
|
* - 'id=>parent' Returns an associative array of parent term IDs,
|
||||||
* - 'id=>name' Returns an associative array of term names, keyed by term ID (`string[]`).
|
* keyed by term ID (`int[]`).
|
||||||
* - 'id=>slug' Returns an associative array of term slugs, keyed by term ID (`string[]`).
|
* - 'id=>name' Returns an associative array of term names,
|
||||||
|
* keyed by term ID (`string[]`).
|
||||||
|
* - 'id=>slug' Returns an associative array of term slugs,
|
||||||
|
* keyed by term ID (`string[]`).
|
||||||
* Default 'all'.
|
* Default 'all'.
|
||||||
* @type bool $count Whether to return a term count. Will take precedence over `$fields` if true.
|
* @type bool $count Whether to return a term count. If true, will take precedence
|
||||||
* Default false.
|
* over `$fields`. 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.
|
||||||
* @type string|array $slug Optional. Slug or array of slugs to return term(s) for.
|
* @type string|array $slug Optional. Slug or array of slugs to return term(s) for.
|
||||||
|
Loading…
Reference in New Issue
Block a user