0

I have a widget which I want to add a couple of options. The options are effectively 'global' for the widget - username and password details to a secured web service.

So in effect, wherever the widget is used the same parameters will be used.

I presume I should use an add_options_page? Or ...

Add options on the widget itself? Or ...

can you do both?

0

I have answered this myself by adding an options page and adding options to the database. The functions are

add_option('yourpluginoption1','value');
add_option('yourpluginoption2','value');

add_action('admin_menu', 'yourplugin_menu_');

function yourplugin_menu_() {
    add_options_page('etc etc...
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.