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. 

Built from https://develop.svn.wordpress.org/trunk@37615


git-svn-id: http://core.svn.wordpress.org/trunk@37583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2016-06-01 22:46:28 +00:00
parent c70e3246e2
commit 5e5f5dd4e9
2 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@ function get_category_parents( $id, $link = false, $separator = '/', $nicename =
* @since 0.71 * @since 0.71
* *
* @param int $id Optional, default to current post ID. The post ID. * @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 ) { function get_the_category( $id = false ) {
$categories = get_the_terms( $id, 'category' ); $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 int|object $post Post ID or object.
* @param string $taxonomy Taxonomy name. * @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. * or the post does not exist, WP_Error on failure.
*/ */
function get_the_terms( $post, $taxonomy ) { function get_the_terms( $post, $taxonomy ) {

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.6-alpha-37614'; $wp_version = '4.6-alpha-37615';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.