Is it possible to run a function every time a post is deleted. The function has to be run when the post is deleted from the admin or by the wp_delete_post() function.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yep, http://codex.wordpress.org/Plugin_API/Action_Reference/delete_post
Put that in functions.php of your theme and you’re set.
Read that link for any special circumstances you might need to account for