From 8447683474ebdee773fc4fca7b3e44dea45060f4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 16 Oct 2021 02:38:58 +0000 Subject: [PATCH] Docs: Improve documentation for the `tax_input` parameter of `wp_insert_post()`. Follow-up to [10222], [13217], [33922]. Props dingo_d. Fixes #54264. Built from https://develop.svn.wordpress.org/trunk@51913 git-svn-id: http://core.svn.wordpress.org/trunk@51506 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 9 ++++++++- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 7073328c0d..fb90f626f4 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3823,7 +3823,14 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) { * @type int[] $post_category Array of category IDs. * Defaults to value of the 'default_category' option. * @type array $tags_input Array of tag names, slugs, or IDs. Default empty. - * @type array $tax_input Array of taxonomy terms keyed by their taxonomy name. Default empty. + * @type array $tax_input An array of taxonomy terms keyed by their taxonomy name. + * If the taxonomy is hierarchical, the term list needs to be + * either an array of term IDs or a comma-separated string of IDs. + * If the taxonomy is non-hierarchical, the term list can be an array + * that contains term names or slugs, or a comma-separated string + * of names or slugs. This is because, in hierarchical taxonomy, + * child terms can have the same names with different parent terms, + * so the only way to connect them is using ID. Default empty. * @type array $meta_input Array of post meta values keyed by their post meta key. Default empty. * } * @param bool $wp_error Optional. Whether to return a WP_Error on failure. Default false. diff --git a/wp-includes/version.php b/wp-includes/version.php index 7c7da6bdf0..20088aca95 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51912'; +$wp_version = '5.9-alpha-51913'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.