mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
Docs: Document parameters that accept an array of integers using typed array notation.
While many of these parameters also technically accept an array of numerical strings, they are all ultimately cast to an array of integers. Documenting them as such assists developers in understanding the expected types. See #51800, #41756 git-svn-id: https://develop.svn.wordpress.org/trunk@49672 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -94,7 +94,7 @@ class WP_Term_Query {
|
||||
*
|
||||
* @type string|array $taxonomy Taxonomy name, or array of taxonomies, to which results should
|
||||
* be limited.
|
||||
* @type int|array $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.
|
||||
* @type string $orderby Field(s) to order terms by. Accepts:
|
||||
* - term fields ('name', 'slug', 'term_group', 'term_id', 'id',
|
||||
@@ -113,12 +113,12 @@ class WP_Term_Query {
|
||||
* Default 'ASC'.
|
||||
* @type bool|int $hide_empty Whether to hide terms not assigned to any posts. Accepts
|
||||
* 1|true or 0|false. Default 1|true.
|
||||
* @type array|string $include Array or comma/space-separated string of term IDs to include.
|
||||
* @type int[]|string $include Array or comma/space-separated string of term IDs to include.
|
||||
* Default empty array.
|
||||
* @type array|string $exclude Array or comma/space-separated string of term IDs to exclude.
|
||||
* @type int[]|string $exclude Array or comma/space-separated string of term IDs to exclude.
|
||||
* If $include is non-empty, $exclude is ignored.
|
||||
* Default empty array.
|
||||
* @type array|string $exclude_tree Array or comma/space-separated string of term IDs to exclude
|
||||
* @type int[]|string $exclude_tree Array or comma/space-separated string of term IDs to exclude
|
||||
* along with all of their descendant terms. If $include is
|
||||
* non-empty, $exclude_tree is ignored. Default empty array.
|
||||
* @type int|string $number Maximum number of terms to return. Accepts ''|0 (all) or any
|
||||
@@ -149,7 +149,7 @@ class WP_Term_Query {
|
||||
* Default empty.
|
||||
* @type string|array $slug Optional. Slug or array of slugs to return term(s) for.
|
||||
* Default empty.
|
||||
* @type int|array $term_taxonomy_id Optional. Term taxonomy ID, or array of term taxonomy IDs,
|
||||
* @type int|int[] $term_taxonomy_id Optional. Term taxonomy ID, or array of term taxonomy IDs,
|
||||
* to match when querying terms.
|
||||
* @type bool $hierarchical Whether to include terms that have non-empty descendants
|
||||
* (even if $hide_empty is set to true). Default true.
|
||||
|
||||
Reference in New Issue
Block a user