[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?

Caio Rogerio

Enviado via iPhone

Em 03/11/2011, às 12:46, Bjorn Wijers <burobjorn at gmail.com> escreveu:

> Hi,
> 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.
> Usage:
> 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,
> grtz
> BjornW
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list