WP Widget instances and options

When I activate my plugin I add some values to the options database, e.g.

add_option('code','55');

How do I update that value or use it in the widget? I only see “instances” now, like the example on this page:

Read More

http://wpcoderz.com/creating-a-multi-instance-widget-with-wordpress-2-8/

I’ve gone through all of the widget API, but no go.

Related posts

Leave a Reply

1 comment

  1. Ryan, the code for a widget isn’t special, so to obtain the value of options set with add_option(), just use get_option() as usual – and update_option() to update it.

    Not sure what you meant by ‘instances’ – the link seems broken.