WordPress.org

Make WordPress Core

Ticket #11429: 11429.diff

File 11429.diff, 1.5 KB (added by Denis-de-Bernardy, 5 years ago)
  • wp-includes/taxonomy.php

     
    14211421        $wpdb->insert( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent') + array( 'count' => 0 ) ); 
    14221422        $tt_id = (int) $wpdb->insert_id; 
    14231423 
    1424         do_action("create_term", $term_id, $tt_id); 
     1424        do_action("create_term", $term_id, $tt_id, $taxonomy); 
    14251425        do_action("create_$taxonomy", $term_id, $tt_id); 
    14261426 
    14271427        $term_id = apply_filters('term_id_filter', $term_id, $tt_id); 
    14281428 
    14291429        clean_term_cache($term_id, $taxonomy); 
    14301430 
    1431         do_action("created_term", $term_id, $tt_id); 
     1431        do_action("created_term", $term_id, $tt_id, $taxonomy); 
    14321432        do_action("created_$taxonomy", $term_id, $tt_id); 
    14331433 
    14341434        return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id); 
     
    16931693        $wpdb->update( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ), array( 'term_taxonomy_id' => $tt_id ) ); 
    16941694        do_action( 'edited_term_taxonomy', $tt_id ); 
    16951695 
    1696         do_action("edit_term", $term_id, $tt_id); 
     1696        do_action("edit_term", $term_id, $tt_id, $taxonomy); 
    16971697        do_action("edit_$taxonomy", $term_id, $tt_id); 
    16981698 
    16991699        $term_id = apply_filters('term_id_filter', $term_id, $tt_id); 
    17001700 
    17011701        clean_term_cache($term_id, $taxonomy); 
    17021702 
    1703         do_action("edited_term", $term_id, $tt_id); 
     1703        do_action("edited_term", $term_id, $tt_id, $taxonomy); 
    17041704        do_action("edited_$taxonomy", $term_id, $tt_id); 
    17051705 
    17061706        return array('term_id' => $term_id, 'term_taxonomy_id' => $tt_id);