From 93c80ac8964ebc0950474832fb8e6ce1da43ffd0 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 11 Aug 2014 21:17:17 +0000 Subject: [PATCH] Docblock corrections for `get_the_terms()` function and corresponding filter, and `registered_taxonomy` action. Fixes #29183. Built from https://develop.svn.wordpress.org/trunk@29467 git-svn-id: http://core.svn.wordpress.org/trunk@29245 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 8 ++++---- wp-includes/taxonomy.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 962705434d..ff1041f6c2 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -1240,7 +1240,7 @@ 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 or WP_Error on failure. + * @return array|bool|WP_Error Array of term objects on success, false if there are no terms, WP_Error on failure. */ function get_the_terms( $post, $taxonomy ) { if ( ! $post = get_post( $post ) ) @@ -1257,9 +1257,9 @@ function get_the_terms( $post, $taxonomy ) { * * @since 3.1.0 * - * @param array $terms List of attached terms. - * @param int $post_id Post ID. - * @param string $taxonomy Name of the taxonomy. + * @param array|WP_Error $terms List of attached terms, or WP_Error on failure. + * @param int $post_id Post ID. + * @param string $taxonomy Name of the taxonomy. */ $terms = apply_filters( 'get_the_terms', $terms, $post->ID, $taxonomy ); diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index d942734324..d823c59ca6 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -429,7 +429,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) { * * @param string $taxonomy Taxonomy slug. * @param array|string $object_type Object type or array of object types. - * @param array|string $args Array or string of taxonomy registration arguments. + * @param array $args Array of taxonomy registration arguments. */ do_action( 'registered_taxonomy', $taxonomy, $object_type, $args ); }