Docs: Reformat the `orderby` section of `WP_Term_Query::__construct()` for better readability.
This makes it more consistent with the `fields` section. See #49572. Built from https://develop.svn.wordpress.org/trunk@47897 git-svn-id: http://core.svn.wordpress.org/trunk@47671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f22e113e95
commit
5636fb886b
|
@ -96,13 +96,17 @@ class WP_Term_Query {
|
|||
* be limited.
|
||||
* @type int|array $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', 'description', 'parent'),
|
||||
* 'count' for term taxonomy count, 'include' to match the
|
||||
* 'order' of the $include param, 'slug__in' to match the
|
||||
* 'order' of the $slug param, 'meta_value', 'meta_value_num',
|
||||
* the value of `$meta_key`, the array keys of `$meta_query`, or
|
||||
* 'none' to omit the ORDER BY clause. Defaults to 'name'.
|
||||
* @type string $orderby Field(s) to order terms by. Accepts:
|
||||
* - term fields ('name', 'slug', 'term_group', 'term_id', 'id',
|
||||
* 'description', 'parent').
|
||||
* - 'count' for term taxonomy count.
|
||||
* - 'include' to match the 'order' of the $include param.
|
||||
* - 'slug__in' to match the 'order' of the $slug param.
|
||||
* - 'meta_value', 'meta_value_num'.
|
||||
* - the value of `$meta_key`.
|
||||
* - the array keys of `$meta_query`.
|
||||
* - 'none' to omit the ORDER BY clause.
|
||||
* Defaults to 'name'.
|
||||
* @type string $order Whether to order terms in ascending or descending order.
|
||||
* Accepts 'ASC' (ascending) or 'DESC' (descending).
|
||||
* Default 'ASC'.
|
||||
|
@ -142,8 +146,8 @@ class WP_Term_Query {
|
|||
* Default empty.
|
||||
* @type int|array $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.
|
||||
* @type bool $hierarchical Whether to include terms that have non-empty descendants
|
||||
* (even if $hide_empty is set to true). Default true.
|
||||
* @type string $search Search criteria to match terms. Will be SQL-formatted with
|
||||
* wildcards before and after. Default empty.
|
||||
* @type string $name__like Retrieve terms with criteria by which a term is LIKE
|
||||
|
@ -396,6 +400,7 @@ class WP_Term_Query {
|
|||
if ( 'term_order' === $_orderby && empty( $this->query_vars['object_ids'] ) ) {
|
||||
$_orderby = 'term_id';
|
||||
}
|
||||
|
||||
$orderby = $this->parse_orderby( $_orderby );
|
||||
|
||||
if ( $orderby ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-alpha-47896';
|
||||
$wp_version = '5.5-alpha-47897';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue