[wp-hackers] delete_user action hook

Arne Brachhold himself at arnebrachhold.de
Thu Jun 1 09:52:57 GMT 2006


> Before adding another one a quick grep (actually it's usually a slow 
> grep) of the wp-plugins repo can tell you if in reality anyone has 
> actually used it.

what speaks against two hooks? IMHO, every action such as deleting 
or creating a user, deleting or editing a post etc should have 
at least two actions. 

- user_delete 
Activated before the user gets deleted so plugins may cancel the action

- user_deleted 
Activated after the user has been deleted, but only on success so 
plugins can remove additional user data. The old userinfo should be 
given as a parameter

Better example for posts:

- post_save
Plugins may modify the content of the post

- post_saved
Plugins may perform a pingback (not the best example, I know) with the 
final post data (permalink and so on)

Best regards,

  Arne Brachhold

mail  himself at arnebrachhold.de
web   http://www.arnebrachhold.de/

More information about the wp-hackers mailing list