WordPress.org

Make WordPress Core

Changeset 21939


Ignore:
Timestamp:
09/21/12 13:27:56 (19 months ago)
Author:
ryan
Message:

Pass a term object to the delete_term actions. Props bigdawggi. fixes #20645

File:
1 edited

Legend:

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

    r21863 r21939  
    18181818        clean_object_term_cache( $objects, $object_type ); 
    18191819 
     1820    // Get the object before deletion so we can pass to actions below 
     1821    $deleted_term = get_term( $term, $taxonomy ); 
     1822 
    18201823    do_action( 'delete_term_taxonomy', $tt_id ); 
    18211824    $wpdb->delete( $wpdb->term_taxonomy, array( 'term_taxonomy_id' => $tt_id ) ); 
     
    18281831    clean_term_cache($term, $taxonomy); 
    18291832 
    1830     do_action('delete_term', $term, $tt_id, $taxonomy); 
    1831     do_action("delete_$taxonomy", $term, $tt_id); 
     1833    do_action( 'delete_term', $term, $tt_id, $taxonomy, $deleted_term ); 
     1834    do_action( "delete_$taxonomy", $term, $tt_id, $deleted_term ); 
    18321835 
    18331836    return true; 
Note: See TracChangeset for help on using the changeset viewer.