Make WordPress Core

Ticket #40351: 40351.4.diff

File 40351.4.diff, 893 bytes (added by Chouby, 4 years ago)

Fixes the $taxonomy parameter for the actions edit_term_taxonomy and edited_term_taxonomy

  • src/wp-includes/taxonomy.php

    diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
    index 06fa0a0f47..6a49014f0c 100644
    a b function wp_modify_term_count_by_now( $tt_ids, $taxonomy, $modify_by ) { 
    34443444
    34453445        foreach ( $tt_ids as $tt_id ) {
    34463446                /** This action is documented in wp-includes/taxonomy.php */
    3447                 do_action( 'edit_term_taxonomy', $tt_id, $taxonomy );
     3447                do_action( 'edit_term_taxonomy', $tt_id, $taxonomy->name );
    34483448        }
    34493449
    34503450        $result = $wpdb->query(
    function wp_modify_term_count_by_now( $tt_ids, $taxonomy, $modify_by ) { 
    34613461
    34623462        foreach ( $tt_ids as $tt_id ) {
    34633463                /** This action is documented in wp-includes/taxonomy.php */
    3464                 do_action( 'edited_term_taxonomy', $tt_id, $taxonomy );
     3464                do_action( 'edited_term_taxonomy', $tt_id, $taxonomy->name );
    34653465        }
    34663466
    34673467        clean_term_cache( $tt_ids, '', false );