From 6c92704e10752d30efb7737c832b2863cdc557c6 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Mon, 26 Oct 2020 23:07:06 +0000 Subject: [PATCH] Taxonomy: Fix values passed to actions in `wp_modify_term_count_by_now()`. Replace the `WP_Taxonomy` object with the taxonomy slug in the values passed to the actions `edit_term_taxonomy` and `edited_term_taxonomy` within `wp_modify_term_count_by_now()`. Follow up to [49141], [49171]. Props Chouby, lcyh78. Fixes #40351. Built from https://develop.svn.wordpress.org/trunk@49316 git-svn-id: http://core.svn.wordpress.org/trunk@49078 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 06fa0a0f47..6a49014f0c 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -3444,7 +3444,7 @@ function wp_modify_term_count_by_now( $tt_ids, $taxonomy, $modify_by ) { foreach ( $tt_ids as $tt_id ) { /** This action is documented in wp-includes/taxonomy.php */ - do_action( 'edit_term_taxonomy', $tt_id, $taxonomy ); + do_action( 'edit_term_taxonomy', $tt_id, $taxonomy->name ); } $result = $wpdb->query( @@ -3461,7 +3461,7 @@ function wp_modify_term_count_by_now( $tt_ids, $taxonomy, $modify_by ) { foreach ( $tt_ids as $tt_id ) { /** This action is documented in wp-includes/taxonomy.php */ - do_action( 'edited_term_taxonomy', $tt_id, $taxonomy ); + do_action( 'edited_term_taxonomy', $tt_id, $taxonomy->name ); } clean_term_cache( $tt_ids, '', false ); diff --git a/wp-includes/version.php b/wp-includes/version.php index cc934964a7..3d2346b4f7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-beta1-49314'; +$wp_version = '5.6-beta1-49316'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.