[wp-hackers] Does a widget save hook exist or do I need to create a ticket in Trac?
Caio Rogerio Ribeiro
caiorogerio at gmail.com
Thu Nov 3 16:13:12 UTC 2011
If you want to update this widget for ALL your blogs in a MU/Network,
you could use update_site_option.
Have you tried that?
Enviado via iPhone
Em 03/11/2011, às 12:46, Bjorn Wijers <burobjorn at gmail.com> escreveu:
> I'm looking for a hook to use just after a widget has saved it's options.
> For example:
> I have a widget W whose options I have changed in the Appearance->Widgets screen. I press save and after the save a hook H is being called. My code hooks into the hook and does its thing.
> Clearing a site transient which is set in site X and also being used in all the other sites of my WordPress Multisite installation. Basically it saves me from (ab)using switch_to_blog()
> I've used the 'widget_update_callback' which in fact is called before the update (is this a bug or feature?) as well as the 'widget_form_callback', which gets called repeatedly something I would like to prevent. Any ideas for a better hook to use?
> Afaik there is not (yet?) a hook directly after saving a widget's options. Or is there? If not shall I create a ticket for this?
> Thanks in advance,
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers