WordPress.org

Make WordPress Core

Changeset 34530


Ignore:
Timestamp:
09/25/2015 04:04:06 AM (4 years ago)
Author:
boonebgorges
Message:

After [34529], normalize documentation for get_terms() and wp_get_object_terms().

See #10142.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy-functions.php

    r34529 r34530  
    967967 *     Optional. Array or string of arguments to get terms.
    968968 *
    969  *     @type string       $orderby           Field(s) to order terms by. Accepts term fields ('name', 'slug',
    970  *                                           'term_group', 'term_id', 'id', 'description'), 'count' for term
    971  *                                           taxonomy count, 'include' to match the 'order' of the $include param,
    972  *                                           or 'none' to skip ORDER BY. Defaults to 'name'.
    973  *     @type string       $order             Whether to order terms in ascending or descending order.
    974  *                                           Accepts 'ASC' (ascending) or 'DESC' (descending).
    975  *                                           Default 'ASC'.
    976  *     @type bool|int     $hide_empty        Whether to hide terms not assigned to any posts. Accepts
    977  *                                           1|true or 0|false. Default 1|true.
    978  *     @type array|string $include           Array or comma/space-separated string of term ids to include.
    979  *                                           Default empty array.
    980  *     @type array|string $exclude           Array or comma/space-separated string of term ids to exclude.
    981  *                                           If $include is non-empty, $exclude is ignored.
    982  *                                           Default empty array.
    983  *     @type array|string $exclude_tree      Array or comma/space-separated string of term ids to exclude
    984  *                                           along with all of their descendant terms. If $include is
    985  *                                           non-empty, $exclude_tree is ignored. Default empty array.
    986  *     @type int|string   $number            Maximum number of terms to return. Accepts ''|0 (all) or any
    987  *                                           positive number. Default ''|0 (all).
    988  *     @type int          $offset            The number by which to offset the terms query. Default empty.
    989  *     @type string       $fields            Term fields to query for. Accepts 'all' (returns an array of complete
    990  *                                           term objects), 'ids' (returns an array of ids), 'id=>parent' (returns
    991  *                                           an associative array with ids as keys, parent term IDs as values),
    992  *                                           'names' (returns an array of term names), 'count' (returns the number
    993  *                                           of matching terms), 'id=>name' (returns an associative array with ids
    994  *                                           as keys, term names as values), or 'id=>slug' (returns an associative
    995  *                                           array with ids as keys, term slugs as values). Default 'all'.
    996  *     @type string|array $name              Optional. Name or array of names to return term(s) for. Default empty.
    997  *     @type string|array $slug              Optional. Slug or array of slugs to return term(s) for. Default empty.
    998  *     @type bool         $hierarchical      Whether to include terms that have non-empty descendants (even
    999  *                                           if $hide_empty is set to true). Default true.
    1000  *     @type string       $search            Search criteria to match terms. Will be SQL-formatted with
    1001  *                                           wildcards before and after. Default empty.
    1002  *     @type string       $name__like        Retrieve terms with criteria by which a term is LIKE $name__like.
    1003  *                                           Default empty.
    1004  *     @type string       $description__like Retrieve terms where the description is LIKE $description__like.
    1005  *                                           Default empty.
    1006  *     @type bool         $pad_counts        Whether to pad the quantity of a term's children in the quantity
    1007  *                                           of each term's "count" object variable. Default false.
    1008  *     @type string       $get               Whether to return terms regardless of ancestry or whether the terms
    1009  *                                           are empty. Accepts 'all' or empty (disabled). Default empty.
    1010  *     @type int          $child_of          Term ID to retrieve child terms of. If multiple taxonomies
    1011  *                                           are passed, $child_of is ignored. Default 0.
    1012  *     @type int|string   $parent            Parent term ID to retrieve direct-child terms of. Default empty.
    1013  *     @type bool         $childless         True to limit results to terms that have no children. This parameter has
    1014  *                                           no effect on non-hierarchical taxonomies. Default false.
    1015  *     @type string       $cache_domain      Unique cache key to be produced when this query is stored in an
    1016  *                                           object cache. Default is 'core'.
     969 *     @type string       $orderby                Field(s) to order terms by. Accepts term fields ('name', 'slug',
     970 *                                                'term_group', 'term_id', 'id', 'description'), 'count' for term
     971 *                                                taxonomy count, 'include' to match the 'order' of the $include param,
     972 *                                                or 'none' to skip ORDER BY. Defaults to 'name'.
     973 *     @type string       $order                  Whether to order terms in ascending or descending order.
     974 *                                                Accepts 'ASC' (ascending) or 'DESC' (descending).
     975 *                                                Default 'ASC'.
     976 *     @type bool|int     $hide_empty             Whether to hide terms not assigned to any posts. Accepts
     977 *                                                1|true or 0|false. Default 1|true.
     978 *     @type array|string $include                Array or comma/space-separated string of term ids to include.
     979 *                                                Default empty array.
     980 *     @type array|string $exclude                Array or comma/space-separated string of term ids to exclude.
     981 *                                                If $include is non-empty, $exclude is ignored.
     982 *                                                Default empty array.
     983 *     @type array|string $exclude_tree           Array or comma/space-separated string of term ids to exclude
     984 *                                                along with all of their descendant terms. If $include is
     985 *                                                non-empty, $exclude_tree is ignored. Default empty array.
     986 *     @type int|string   $number                 Maximum number of terms to return. Accepts ''|0 (all) or any
     987 *                                                positive number. Default ''|0 (all).
     988 *     @type int          $offset                 The number by which to offset the terms query. Default empty.
     989 *     @type string       $fields                 Term fields to query for. Accepts 'all' (returns an array of complete
     990 *                                                term objects), 'ids' (returns an array of ids), 'id=>parent' (returns
     991 *                                                an associative array with ids as keys, parent term IDs as values),
     992 *                                                'names' (returns an array of term names), 'count' (returns the number
     993 *                                                of matching terms), 'id=>name' (returns an associative array with ids
     994 *                                                as keys, term names as values), or 'id=>slug' (returns an associative
     995 *                                                array with ids as keys, term slugs as values). Default 'all'.
     996 *     @type string|array $name                   Optional. Name or array of names to return term(s) for. Default empty.
     997 *     @type string|array $slug                   Optional. Slug or array of slugs to return term(s) for. Default empty.
     998 *     @type bool         $hierarchical           Whether to include terms that have non-empty descendants (even
     999 *                                                if $hide_empty is set to true). Default true.
     1000 *     @type string       $search                 Search criteria to match terms. Will be SQL-formatted with
     1001 *                                                wildcards before and after. Default empty.
     1002 *     @type string       $name__like             Retrieve terms with criteria by which a term is LIKE $name__like.
     1003 *                                                Default empty.
     1004 *     @type string       $description__like      Retrieve terms where the description is LIKE $description__like.
     1005 *                                                Default empty.
     1006 *     @type bool         $pad_counts             Whether to pad the quantity of a term's children in the quantity
     1007 *                                                of each term's "count" object variable. Default false.
     1008 *     @type string       $get                    Whether to return terms regardless of ancestry or whether the terms
     1009 *                                                are empty. Accepts 'all' or empty (disabled). Default empty.
     1010 *     @type int          $child_of               Term ID to retrieve child terms of. If multiple taxonomies
     1011 *                                                are passed, $child_of is ignored. Default 0.
     1012 *     @type int|string   $parent                 Parent term ID to retrieve direct-child terms of. Default empty.
     1013 *     @type bool         $childless              True to limit results to terms that have no children. This parameter
     1014 *                                                has no effect on non-hierarchical taxonomies. Default false.
     1015 *     @type string       $cache_domain           Unique cache key to be produced when this query is stored in an
     1016 *                                                object cache. Default is 'core'.
    10171017 *     @type bool         $update_term_meta_cache Whether to prime meta caches for matched terms. Default true.
    10181018 *     @type array        $meta_query             Meta query clauses to limit retrieved terms by.
     
    21772177 * @param array|string $args {
    21782178 *     Array of arguments.
    2179  *     @type string $orderby Field by which results should be sorted. Accepts 'name', 'count', 'slug', 'term_group',
    2180  *                           'term_order', 'taxonomy', 'parent', or 'term_taxonomy_id'. Default 'name'.
    2181  *     @type string $order   Sort order. Accepts 'ASC' or 'DESC'. Default 'ASC'.
    2182  *     @type string $fields  Fields to return for matched terms. Accepts 'all', 'ids', 'names', and
    2183  *                           'all_with_object_id'. Note that 'all' or 'all_with_object_id' will result in an array of
    2184  *                           term objects being returned, 'ids' will return an array of integers, and 'names' an array
    2185  *                           of strings.
    2186  *     @type int    $parent  Optional. Limit results to the direct children of a given term ID.
     2179 *     @type string $orderby                Field by which results should be sorted. Accepts 'name', 'count', 'slug',
     2180 *                                          'term_group', 'term_order', 'taxonomy', 'parent', or 'term_taxonomy_id'.
     2181 *                                          Default 'name'.
     2182 *     @type string $order                  Sort order. Accepts 'ASC' or 'DESC'. Default 'ASC'.
     2183 *     @type string $fields                 Fields to return for matched terms. Accepts 'all', 'ids', 'names', and
     2184 *                                          'all_with_object_id'. Note that 'all' or 'all_with_object_id' will result
     2185 *                                          in an array of term objects being returned, 'ids' will return an array of
     2186 *                                          integers, and 'names' an array of strings.
     2187 *     @type int    $parent                 Optional. Limit results to the direct children of a given term ID.
    21872188 *     @type bool   $update_term_meta_cache Whether to prime termmeta cache for matched terms. Only applies when
    21882189 *                                          `$fields` is 'all', 'all_with_object_id', or 'term_id'. Default true.
Note: See TracChangeset for help on using the changeset viewer.