Developing Plugin, wp_options data gets erased
-
Forgive me if this has been discussed before, I search around the forums and did not find anyone else that has posted this problem
I am developing a plugin. I stored all my options into an array, serialize it, and save it into a field in the wp_options table using the add_option() function, or the update_option() when updating my plugins options.
This works great. However I have encountered a problem where when I went to reset the time and date on my wordpress blog, after saving it my options in the wp_options table for my plugin were reset to: s:2:”N;”;
It also did this when I changed the privacy settings on my blog. So I’m guessing this happens anytime a WordPress setting is changed.
Is there a hook or something else I need to do to have my options in wp_options saved when a WordPress setting is changed?
I’ve been looking through the source code of other plugins and I don’t see where they may be doing something like that, but there is a lot of code and I could be over looking it.
By the way, I am using wordpress 2.7.1, I don’t know if this occurs on other wordpress versions.
Thanks!
The topic ‘Developing Plugin, wp_options data gets erased’ is closed to new replies.