[wp-hackers] delete_user action hook
Rob Miller
r at robm.me.uk
Fri Jun 2 16:10:20 GMT 2006
Ryan Scheuermann wrote:
> Austin Matzko wrote:
>> The delete_user action hook fires off right *after* the user has been
>> deleted from the users and usermeta tables.
>>
> In this same thread of thought, I'm also looking to move the
> delete_attachment action hook before the actual deletion in
> wp_delete_attachment. I create 2 thumbnails and I can't delete the
> 2nd one because I have no way of accessing the attachment's meta
> data. Or a "pre_delete_attachment" hook would be fine, too. I'm
> wondering how many other functions present a similar plugin capability
> issue?
>
> I'll submit a patch for my issue, but have we decided on the accepted
> route? Do I move the delete_attachment action or add a new action for
> pre_delete_attachment? IMHO, having delete_attachment after the
> delete code really serves no purpose. How do I grep the Plugin
> Repository to see if it's being used? Thanks!
>
> Ryan Scheuermann
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
It does serve a purpose - like Arne said, you might want your code only
to execute if the deletion was successful, whereas a pre_delete_user
hook would be useful if you want your code executing regardless of
whether the deletion is successful.
Since there's no practical reason why there should be two hooks, why not
just add 'em?
--
Rob Miller
http://robm.me.uk/ | http://kantian.co.uk/
More information about the wp-hackers
mailing list