For various reasons, I find myself in the position of needing to update options read by
get_option() and written by
update_option() in the context of a feed add-on.
How do I accomplish this?
I thought I’d override
update_plugin_settings(), but that doesn’t seem possible.
In the meantime, I’m going to accept the duplicate values. This means the current plugin options will remain. When the options for this feed add-on change, it will update the plugin options too.
Solved by treating the new plugin settings as shadows of the original plugin settings.
is_admin() is true, write the shadowed values from the working ones. on admin page load.
On save, write the working values from the shadowed ones.
get_current_settings() are required for this to work.