From db2a1ba75dff4a19378e58fd978e0ad49dc211fc Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Mon, 26 Oct 2020 23:05:22 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@49316 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 06fa0a0f47..6a49014f0c 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/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 );