Support » Plugins and Hacks » Options and Manage pages
11 years, 5 months ago
I want to add an options and a manage page for my plugin.
I am aware on the code to create this in WP Admin.
I’ve seen other plugins which have a few settings under the Options page
How do I do this so that I can set / update the variables that the functions in my plugin file uses.
I hope the question is clear.
WordPress provides a few plugin functions for saving and retrieving data in the options table:
Thanks Kaf, got the thing working after lots of trial and error!
Another question on this topic.
How do I pass an Array as the value of $newvalue ??
$newvalue = array('hi', 'test', 'etc');
update_option($option_name, array('hi', 'test', 'etc'));
Just like any php function.
So I assume I can even use $option_name = some_name and then use update_option
$option_name = some_name