From 0729c70e034edd046ad32227f953572f76ed39a1 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Fri, 17 Jul 2015 22:58:25 +0000 Subject: [PATCH] Update the description for `get_the_category()` with helpful information for the proper function to use for custom taxonomies. Also adds a missing return description. See #32246. Built from https://develop.svn.wordpress.org/trunk@33318 git-svn-id: http://core.svn.wordpress.org/trunk@33290 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 7 ++++++- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 9f4e1ac74a..d29ae479ec 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -65,10 +65,15 @@ function get_category_parents( $id, $link = false, $separator = '/', $nicename = /** * Retrieve post categories. * + * This tag may be used outside The Loop by passing a post id as the parameter. + * + * Note: This function only returns results from the default "category" taxonomy. + * For custom taxonomies use get_the_terms(). + * * @since 0.71 * * @param int $id Optional, default to current post ID. The post ID. - * @return array + * @return array Array of objects, one for each category assigned to the post. */ function get_the_category( $id = false ) { $categories = get_the_terms( $id, 'category' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index c2bfc5cece..2b014002c5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-beta3-33317'; +$wp_version = '4.3-beta3-33318'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.