Make WordPress Core

Ticket #49572: 49572.diff

File 49572.diff, 2.5 KB (added by pbiron, 5 years ago)

Add 'term_order' to the description of the $orderby parameter of WP_Term_Query::__construct()

  • src/wp-includes/class-wp-term-query.php

    From f1944a32a464a6a64568402e1b47fe7f724e6138 Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Mon, 1 Jun 2020 16:07:06 -0600
    Subject: [PATCH] Add 'term_order' to the description of the `$orderby`
     parameter of `WP_Term_Query::__construct()`/
    
    ---
     src/wp-includes/class-wp-term-query.php | 10 ++++++----
     1 file changed, 6 insertions(+), 4 deletions(-)
    
    diff --git a/src/wp-includes/class-wp-term-query.php b/src/wp-includes/class-wp-term-query.php
    index 6d4844d173..b62e32c5c8 100644
    a b class WP_Term_Query { 
    9797         *     @type int|array    $object_ids             Optional. Object ID, or array of object IDs. Results will be
    9898         *                                                limited to terms associated with these objects.
    9999         *     @type string       $orderby                Field(s) to order terms by. Accepts term fields ('name',
    100          *                                                'slug', 'term_group', 'term_id', 'id', 'description', 'parent'),
    101          *                                                'count' for term taxonomy count, 'include' to match the
    102          *                                                'order' of the $include param, 'slug__in' to match the
     100         *                                                'slug', 'term_group', 'term_id', 'id', 'description', 'parent',
     101         *                                                'term_order'), 'count' for term taxonomy count, 'include' to
     102         *                                                match the 'order' of the $include param, 'slug__in' to match the
    103103         *                                                'order' of the $slug param, 'meta_value', 'meta_value_num',
    104104         *                                                the value of `$meta_key`, the array keys of `$meta_query`, or
    105          *                                                'none' to omit the ORDER BY clause. Defaults to 'name'.
     105         *                                                'none' to omit the ORDER BY clause. Unless `$object_ids` is
     106         *                                                not empty, 'term_order' is interpreted the same as 'term_id`.
     107         *                                                Defaults to 'name'.
    106108         *     @type string       $order                  Whether to order terms in ascending or descending order.
    107109         *                                                Accepts 'ASC' (ascending) or 'DESC' (descending).
    108110         *                                                Default 'ASC'.