mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Docs: Fix indentation for wp_term_query->construct
method parameters.
The `fields` and `orderby` properties in `WP_Term_Query` are arrays and each accepts a variety of keys. To properly indent each key in the docblock, a `*` should be used, not `-`. Props whyisjake, audrasjb, SergeyBiryukov. Fixes #52839. git-svn-id: https://develop.svn.wordpress.org/trunk@50614 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1dafd53d20
commit
32e8cd1c2d
@ -97,16 +97,16 @@ class WP_Term_Query {
|
|||||||
* @type int|int[] $object_ids Optional. Object ID, or array of object IDs. Results will be
|
* @type int|int[] $object_ids Optional. Object ID, or array of object IDs. Results will be
|
||||||
* limited to terms associated with these objects.
|
* limited to terms associated with these objects.
|
||||||
* @type string $orderby Field(s) to order terms by. Accepts:
|
* @type string $orderby Field(s) to order terms by. Accepts:
|
||||||
* - term fields ('name', 'slug', 'term_group', 'term_id', 'id',
|
* * term fields ('name', 'slug', 'term_group', 'term_id', 'id',
|
||||||
* 'description', 'parent', 'term_order'). Unless `$object_ids`
|
* 'description', 'parent', 'term_order'). Unless `$object_ids`
|
||||||
* is not empty, 'term_order' is treated the same as 'term_id'.
|
* is not empty, 'term_order' is treated the same as 'term_id'.
|
||||||
* - 'count' to use the number of objects associated with the term.
|
* * 'count' to use the number of objects associated with the term.
|
||||||
* - 'include' to match the 'order' of the $include param.
|
* * 'include' to match the 'order' of the $include param.
|
||||||
* - 'slug__in' to match the 'order' of the $slug param.
|
* * 'slug__in' to match the 'order' of the $slug param.
|
||||||
* - 'meta_value', 'meta_value_num'.
|
* * 'meta_value', 'meta_value_num'.
|
||||||
* - the value of `$meta_key`.
|
* the value of `$meta_key`.
|
||||||
* - the array keys of `$meta_query`.
|
* the array keys of `$meta_query`.
|
||||||
* - 'none' to omit the ORDER BY clause.
|
* * 'none' to omit the ORDER BY clause.
|
||||||
* Defaults to 'name'.
|
* Defaults to 'name'.
|
||||||
* @type string $order Whether to order terms in ascending or descending order.
|
* @type string $order Whether to order terms in ascending or descending order.
|
||||||
* Accepts 'ASC' (ascending) or 'DESC' (descending).
|
* Accepts 'ASC' (ascending) or 'DESC' (descending).
|
||||||
@ -127,20 +127,20 @@ class WP_Term_Query {
|
|||||||
* 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:
|
* @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
|
* * 'all_with_object_id' Returns an array of term objects
|
||||||
* with the 'object_id' param (`WP_Term[]`). Works only
|
* with the 'object_id' param (`WP_Term[]`). Works only
|
||||||
* when the `$object_ids` parameter is populated.
|
* 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,
|
* * 'id=>parent' Returns an associative array of parent term IDs,
|
||||||
* keyed by term ID (`int[]`).
|
* keyed by term ID (`int[]`).
|
||||||
* - 'id=>name' Returns an associative array of term names,
|
* * 'id=>name' Returns an associative array of term names,
|
||||||
* keyed by term ID (`string[]`).
|
* keyed by term ID (`string[]`).
|
||||||
* - 'id=>slug' Returns an associative array of term slugs,
|
* * 'id=>slug' Returns an associative array of term slugs,
|
||||||
* keyed by term ID (`string[]`).
|
* keyed by term ID (`string[]`).
|
||||||
* Default 'all'.
|
* Default 'all'.
|
||||||
* @type bool $count Whether to return a term count. If true, will take precedence
|
* @type bool $count Whether to return a term count. If true, will take precedence
|
||||||
|
Loading…
x
Reference in New Issue
Block a user