From 0974640a7c21fcd840e2e341d0f85bfdb90932b3 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 20 Sep 2022 18:53:09 +0000 Subject: [PATCH] Taxonomy: Standardise the format used to describe arguments passed to actions and filters inside `wp_insert_term()` and `wp_update_term()`. Props SergeyBiryukov, mboynes Fixes #55441 Built from https://develop.svn.wordpress.org/trunk@54266 git-svn-id: http://core.svn.wordpress.org/trunk@53825 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 20 ++++++++++---------- wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index c52ed8dc01..c3153c752a 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2347,7 +2347,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { * * @param string|WP_Error $term The term name to add, or a WP_Error object if there's an error. * @param string $taxonomy Taxonomy slug. - * @param array|string $args Array or query string of arguments for inserting a term. + * @param array|string $args Array or query string of arguments passed to wp_insert_term(). */ $term = apply_filters( 'pre_insert_term', $term, $taxonomy, $args ); @@ -2547,7 +2547,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { * @param object $duplicate_term Duplicate term row from terms table, if found. * @param string $term Term being inserted. * @param string $taxonomy Taxonomy name. - * @param array $args Term arguments passed to the function. + * @param array $args Arguments passed to wp_insert_term(). * @param int $tt_id term_taxonomy_id for the newly created term. */ $duplicate_term = apply_filters( 'wp_insert_term_duplicate_term_check', $duplicate_term, $term, $taxonomy, $args, $tt_id ); @@ -2578,7 +2578,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { * @param int $term_id Term ID. * @param int $tt_id Term taxonomy ID. * @param string $taxonomy Taxonomy slug. - * @param array $args Term arguments passed to the function. + * @param array $args Arguments passed to wp_insert_term(). */ do_action( 'create_term', $term_id, $tt_id, $taxonomy, $args ); @@ -2598,7 +2598,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { * * @param int $term_id Term ID. * @param int $tt_id Term taxonomy ID. - * @param array $args Term arguments passed to the function. + * @param array $args Arguments passed to wp_insert_term(). */ do_action( "create_{$taxonomy}", $term_id, $tt_id, $args ); @@ -2610,7 +2610,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { * * @param int $term_id Term ID. * @param int $tt_id Term taxonomy ID. - * @param array $args Term arguments passed to the function. + * @param array $args Arguments passed to wp_insert_term(). */ $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id, $args ); @@ -2628,7 +2628,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { * @param int $term_id Term ID. * @param int $tt_id Term taxonomy ID. * @param string $taxonomy Taxonomy slug. - * @param array $args Term arguments passed to the function. + * @param array $args Arguments passed to wp_insert_term(). */ do_action( 'created_term', $term_id, $tt_id, $taxonomy, $args ); @@ -2648,7 +2648,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { * * @param int $term_id Term ID. * @param int $tt_id Term taxonomy ID. - * @param array $args Term arguments passed to the function. + * @param array $args Arguments passed to wp_insert_term(). */ do_action( "created_{$taxonomy}", $term_id, $tt_id, $args ); @@ -2665,7 +2665,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { * @param int $tt_id Term taxonomy ID. * @param string $taxonomy Taxonomy slug. * @param bool $update Whether this is an existing term being updated. - * @param array $args Term arguments passed to the function. + * @param array $args Arguments passed to wp_insert_term(). */ do_action( 'saved_term', $term_id, $tt_id, $taxonomy, false, $args ); @@ -2686,7 +2686,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { * @param int $term_id Term ID. * @param int $tt_id Term taxonomy ID. * @param bool $update Whether this is an existing term being updated. - * @param array $args Term arguments passed to the function. + * @param array $args Arguments passed to wp_insert_term(). */ do_action( "saved_{$taxonomy}", $term_id, $tt_id, false, $args ); @@ -3218,7 +3218,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) { * @param int $term_id Term ID. * @param string $taxonomy Taxonomy slug. * @param array $parsed_args An array of potentially altered update arguments for the given term. - * @param array $args An array of update arguments for the given term. + * @param array $args Arguments passed to wp_update_term(). */ $parent = (int) apply_filters( 'wp_update_term_parent', $args['parent'], $term_id, $taxonomy, $parsed_args, $args ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 1f8be4d531..1b7b8ed0f1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-54265'; +$wp_version = '6.1-alpha-54266'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.