From 23aa6afccb23e1bc2dc041f48f1dbc281096de2f Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 1 Jun 2016 22:45:19 +0000 Subject: [PATCH] Docs: Improve return descriptions for `get_the_category()` and `get_the_term()` to specifically notate that an array of `WP_Term` objects is returned on success. See #32246. git-svn-id: https://develop.svn.wordpress.org/trunk@37615 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index 42dee7535e..8bba6b4678 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -74,7 +74,7 @@ function get_category_parents( $id, $link = false, $separator = '/', $nicename = * @since 0.71 * * @param int $id Optional, default to current post ID. The post ID. - * @return array Array of objects, one for each category assigned to the post. + * @return array Array of WP_Term objects, one for each category assigned to the post. */ function get_the_category( $id = false ) { $categories = get_the_terms( $id, 'category' ); @@ -1185,7 +1185,7 @@ function term_description( $term = 0, $taxonomy = 'post_tag' ) { * * @param int|object $post Post ID or object. * @param string $taxonomy Taxonomy name. - * @return array|false|WP_Error Array of term objects on success, false if there are no terms + * @return array|false|WP_Error Array of WP_Term objects on success, false if there are no terms * or the post does not exist, WP_Error on failure. */ function get_the_terms( $post, $taxonomy ) {