WordPress.org

Make WordPress Core

Changeset 31525


Ignore:
Timestamp:
02/23/2015 09:07:34 PM (7 years ago)
Author:
boonebgorges
Message:

Pass taxonomy name, not object, to 'edit_term_taxonomy' and 'edited_term_taxonomy' actions.

These actions are fired in a number of different places, and in some cases
the tax name is passed, while in others the taxonomy object is passed. This
inconsistency made it difficult for plugins to use the $taxonomy value.

Props ipm-frommen.
Fixes #30999.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r31449 r31525  
    40634063
    40644064        /** This action is documented in wp-includes/taxonomy.php */
    4065         do_action( 'edit_term_taxonomy', $term, $taxonomy );
     4065        do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
    40664066        $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
    40674067
    40684068        /** This action is documented in wp-includes/taxonomy.php */
    4069         do_action( 'edited_term_taxonomy', $term, $taxonomy );
     4069        do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
    40704070    }
    40714071}
     
    40904090
    40914091        /** This action is documented in wp-includes/taxonomy.php */
    4092         do_action( 'edit_term_taxonomy', $term, $taxonomy );
     4092        do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
    40934093        $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
    40944094
    40954095        /** This action is documented in wp-includes/taxonomy.php */
    4096         do_action( 'edited_term_taxonomy', $term, $taxonomy );
     4096        do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
    40974097    }
    40984098}
Note: See TracChangeset for help on using the changeset viewer.