From e032560e6b427c038d5f0d4e253c7e4c0e1f063c Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 9 Mar 2016 16:17:28 +0000 Subject: [PATCH] Correct `@return` annotation for `wp_set_object_terms()` and related functions. The return value is an array of term taxonomy IDs, not term IDs. Fixes #36182. Built from https://develop.svn.wordpress.org/trunk@36896 git-svn-id: http://core.svn.wordpress.org/trunk@36864 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 6 +++--- wp-includes/taxonomy.php | 4 ++-- wp-includes/version.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index be08ae39e4..d5f4f0e0ba 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3866,7 +3866,7 @@ function wp_add_post_tags( $post_id = 0, $tags = '' ) { * separated by commas. Default empty. * @param bool $append Optional. If true, don't delete existing tags, just add on. If false, * replace the tags with the new tags. Default false. - * @return array|false|WP_Error Array of affected term IDs. WP_Error or false on failure. + * @return array|false|WP_Error Array of term taxonomy IDs of affected terms. WP_Error or false on failure. */ function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) { return wp_set_post_terms( $post_id, $tags, 'post_tag', $append); @@ -3885,7 +3885,7 @@ function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) { * @param string $taxonomy Optional. Taxonomy name. Default 'post_tag'. * @param bool $append Optional. If true, don't delete existing terms, just add on. If false, * replace the terms with the new terms. Default false. - * @return array|false|WP_Error Array of affected term IDs. WP_Error or false on failure. + * @return array|false|WP_Error Array of term taxonomy IDs of affected terms. WP_Error or false on failure. */ function wp_set_post_terms( $post_id = 0, $tags = '', $taxonomy = 'post_tag', $append = false ) { $post_id = (int) $post_id; @@ -3928,7 +3928,7 @@ function wp_set_post_terms( $post_id = 0, $tags = '', $taxonomy = 'post_tag', $a * Default empty array. * @param bool $append If true, don't delete existing categories, just add on. * If false, replace the categories with the new categories. - * @return array|bool|WP_Error + * @return array|false|WP_Error Array of term taxonomy IDs of affected categories. WP_Error or false on failure. */ function wp_set_post_categories( $post_ID = 0, $post_categories = array(), $append = false ) { $post_ID = (int) $post_ID; diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 43f10db455..d9930e21e4 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2973,7 +2973,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { * Will replace all existing related terms in this taxonomy. * @param string $taxonomy The context in which to relate the term to the object. * @param bool $append Optional. If false will delete difference of terms. Default false. - * @return array|WP_Error Affected Term IDs. + * @return array|WP_Error Term taxonomy IDs of the affected terms. */ function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) { global $wpdb; @@ -3094,7 +3094,7 @@ function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) { * @param int $object_id The ID of the object to which the terms will be added. * @param array|int|string $terms The slug(s) or ID(s) of the term(s) to add. * @param array|string $taxonomy Taxonomy name. - * @return array|WP_Error Affected Term IDs + * @return array|WP_Error Term taxonomy IDs of the affected terms. */ function wp_add_object_terms( $object_id, $terms, $taxonomy ) { return wp_set_object_terms( $object_id, $terms, $taxonomy, true ); diff --git a/wp-includes/version.php b/wp-includes/version.php index d5e6ad99c0..ea5afa6833 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-beta2-36895'; +$wp_version = '4.5-beta2-36896'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.