Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to do some action at the time of deleting a category using that category id. Is it possible to get the category id?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Use the delete_category action, which passes category id as an argument:

function my_category_delete_function( $id ){
    // do something with category $id
}
add_action( 'delete_category', 'my_category_delete_function', 10, 1 );
share|improve this answer
    
Thanks, it's work and similarly it's possible to get the slug of the deleted category? –  Chella Durai May 4 '12 at 15:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.