diff --git a/wp-includes/post.php b/wp-includes/post.php index df509fd114..d8f21403ca 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -5209,7 +5209,7 @@ function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) { * @see wp_set_object_terms() * * @param int $post_id Optional. The Post ID. Does not default to the ID of the global $post. - * @param string|array $tags Optional. An array of terms to set for the post, or a string of terms + * @param string|array $terms Optional. An array of terms to set for the post, or a string of terms * separated by commas. Hierarchical taxonomies must always pass IDs rather * than names so that children with the same names but different parents * aren't confused. Default empty. @@ -5218,23 +5218,23 @@ function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) { * replace the terms with the new terms. Default false. * @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 ) { +function wp_set_post_terms( $post_id = 0, $terms = '', $taxonomy = 'post_tag', $append = false ) { $post_id = (int) $post_id; if ( ! $post_id ) { return false; } - if ( empty( $tags ) ) { - $tags = array(); + if ( empty( $terms ) ) { + $terms = array(); } - if ( ! is_array( $tags ) ) { + if ( ! is_array( $terms ) ) { $comma = _x( ',', 'tag delimiter' ); if ( ',' !== $comma ) { - $tags = str_replace( $comma, ',', $tags ); + $terms = str_replace( $comma, ',', $terms ); } - $tags = explode( ',', trim( $tags, " \n\t\r\0\x0B," ) ); + $terms = explode( ',', trim( $terms, " \n\t\r\0\x0B," ) ); } /* @@ -5242,10 +5242,10 @@ function wp_set_post_terms( $post_id = 0, $tags = '', $taxonomy = 'post_tag', $a * children with the same names but different parents aren't confused. */ if ( is_taxonomy_hierarchical( $taxonomy ) ) { - $tags = array_unique( array_map( 'intval', $tags ) ); + $terms = array_unique( array_map( 'intval', $terms ) ); } - return wp_set_object_terms( $post_id, $tags, $taxonomy, $append ); + return wp_set_object_terms( $post_id, $terms, $taxonomy, $append ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index d10ea9d50c..8ad74a6e3c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53824'; +$wp_version = '6.1-alpha-53825'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.