From 797b6c4d7c15a3fe7835bcff81eedc7faf3d94de Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 23 Aug 2015 17:39:07 +0000 Subject: [PATCH] Docs: Add better documentation for all accepted values for the `fields` argument in `get_terms()`. See #32246. git-svn-id: https://develop.svn.wordpress.org/trunk@33715 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 63c3c844c1..76db653237 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -1627,9 +1627,13 @@ function get_term_to_edit( $id, $taxonomy ) { * @type int|string $number Maximum number of terms to return. Accepts ''|0 (all) or any * positive number. Default ''|0 (all). * @type int $offset The number by which to offset the terms query. Default empty. - * @type string $fields Term fields to query for. Accepts 'all' (returns an array of - * term objects), 'ids' or 'names' (returns an array of integers - * or strings, respectively. Default 'all'. + * @type string $fields Term fields to query for. Accepts 'all' (returns an array of complete + * term objects), 'ids' (returns an array of ids), 'id=>parent' (returns + * an associative array with ids as keys, parent term IDs as values), + * 'names' (returns an array of term names), 'count' (returns the number + * of matching terms), 'id=>name' (returns an associative array with ids + * as keys, term names as values), or 'id=>slug' (returns an associative + * array with ids as keys, term slugs as values). Default 'all'. * @type string|array $name Optional. Name or array of names to return term(s) for. Default empty. * @type string|array $slug Optional. Slug or array of slugs to return term(s) for. Default empty. * @type bool $hierarchical Whether to include terms that have non-empty descendants (even