[wp-hackers] Widget Save hook

Nathan Rice ncrice at gmail.com
Fri Mar 12 15:27:04 UTC 2010


The update() method will work for what I need, fortunately. But it would be
nice to have an actual hook that fires every time ANY widget is saved (kind
of like the save_post hook).

anyway, thanks for the info!

------------------
Nathan Rice
WordPress and Web Development
www.nathanrice.net | twitter.com/nathanrice


On Thu, Mar 11, 2010 at 7:53 PM, Mike Schinkel
<mikeschinkel at newclarity.net>wrote:

> Depends on what you need.  As John said there's update() method of widget
> class.
>
> There's 'admin_init' with $_POST['action']='save-widget'
>
> There's 'check_ajax_referer' with an $arg of 'save-sidebar-widgets' (yes,
> it would be a hack)
>
> Lastly (of note) there's 'widget_update_callback' with the new values as
> $arg (not sure when else it's called.)
>
> There may be more but that's a start...
>
>
>
>
> On Mar 11, 2010, at 6:57 PM, Nathan Rice wrote:
>
> > Is there a hook that fires whenever a user saves a widget (drags a widget
> to
> > a widget area, or clicks the save button in a widget)???
> >
> > ------------------
> > Nathan Rice
> > WordPress and Web Development
> > www.nathanrice.net | twitter.com/nathanrice
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> 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