﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
20645,'delete_term' action doesn't pass the deleted term object,bigdawggi,ryan,"The 'delete_term' action passes 3 params ($term, $tt_id, $taxonomy), just like the 'create_term' action.  The issue is that the $term passed to 'delete_term' is not a term object, but instead the term ID; and the issue with that, is there's no longer a way to have anything that hooks on this 'delete_term' action reference information about the term while it was still around.

My use case:

I hooked on 'create_term' to perform actions based on the properties of the $term object.  On 'delete_term' I needed to access those properties to perform respective actions counting on $term to be an object (as mentioned in the  DocBlock)

{{{
 * @uses do_action() Calls both 'delete_term' and 'delete_$taxonomy' action
 *	hooks, passing term object, term id. 'delete_term' gets an additional
 *	parameter with the $taxonomy parameter.
}}}

The $term passed to 'delete_term' action was not an object, but instead the ID for the term (which doesn't help b/c the term's deleted and I can't look it up anymore at the point of the action).  

The attached patch stores the deleted $term object prior to the actual deletion of the term, and passes it through to the following actions so they can utilize the old properties of the term. (e.g., slug, name, etc.).",defect (bug),closed,normal,3.5,Taxonomy,,normal,fixed,has-patch,
