From ecc0ba7fb45bf7e0e2197afa6195217564387fbc Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 12 Aug 2014 23:48:16 +0000 Subject: [PATCH] Additional @return clarifications for get_the_terms(), get_the_tag_list(), and get_the_term_list(). see #29183. Built from https://develop.svn.wordpress.org/trunk@29475 git-svn-id: http://core.svn.wordpress.org/trunk@29253 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index ff1041f6c2..7369fda909 100644 --- a/wp-includes/category-template.php +++ b/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 );