Each widget has a row in the options
table with values for title and other fields. Is there any way we can update those values outside the update
function?
For example, here are some values for a sample widget:
a:2:{i:2;a:23:{s:5:"title";s:19:"Widget Title";.....
now I want to update the title
to another value in the function widget($args, $instance)
and save the value to the database.
I found that options API can handle something like this, but I am not sure if this is the correct way and how to update the info for that specific widget.
// Update the value of an option that was already added.
update_option( $option, $newvalue );
update_option()
?