From c943d6d816d3b900887a4fece714efde8497552b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 12 Aug 2014 23:47:23 +0000 Subject: [PATCH] Additional @return clarifications for get_the_terms(), get_the_tag_list(), and get_the_term_list(). see #29183. git-svn-id: https://develop.svn.wordpress.org/trunk@29475 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-template.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index ff1041f6c2..7369fda909 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -1167,7 +1167,7 @@ function get_the_tags( $id = 0 ) { * @param string $sep Optional. Between tags. * @param string $after Optional. After tags. * @param int $id Optional. Post ID. Defaults to the current post. - * @return string|bool|WP_Error A list of tags on success, false or WP_Error on failure. + * @return string|bool|WP_Error A list of tags on success, false if there are no terms, WP_Error on failure. */ function get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) { @@ -1240,7 +1240,8 @@ function term_description( $term = 0, $taxonomy = 'post_tag' ) { * * @param int|object $post Post ID or object. * @param string $taxonomy Taxonomy name. - * @return array|bool|WP_Error Array of term objects on success, false if there are no terms, WP_Error on failure. + * @return array|bool|WP_Error Array of 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 ) { if ( ! $post = get_post( $post ) ) @@ -1279,7 +1280,7 @@ function get_the_terms( $post, $taxonomy ) { * @param string $before Optional. Before list. * @param string $sep Optional. Separate items using this. * @param string $after Optional. After list. - * @return string|bool|WP_Error A list of terms on success, false or WP_Error on failure. + * @return string|bool|WP_Error A list of terms on success, false if there are no terms, WP_Error on failure. */ function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = '' ) { $terms = get_the_terms( $id, $taxonomy );