Skip to main content

Questions tagged [settings-api]

The Settings API, added in WordPress 2.7, allows admin pages containing settings forms to be managed semi-automatically. It lets you define settings pages, sections within those pages and fields within the sections. New settings pages can be registered along with sections and fields inside them. Existing settings pages can also be added to by registering new settings sections or fields inside of them.

1vote
1answer
45views

adding an options menu that allows saving multiple sets of said options

There are several good examples and tutorials on how to add an options menu to a plugin. (Many of these seem confusingly old though, but that's another thing, I'm assuming stuff from 15 years ago ...
Ant Ax's user avatar
0votes
1answer
98views

Do I need to validate the nonce when using the settings api?

I have been developing a plugin. When using the 'Plugin Check' Wordpress plugin to check it before submission, it gave me a warning that 'Processing form data without nonce verification.' Do I need to ...
dading84's user avatar
0votes
2answers
36views

the function do_settings_section($page) generate error "Allowed memory size of ... bytes exhausted"

I'm creating a plugin to auto delete post/event. I created a WP settings page to manage the default settings for auto delete. I followed each step to register_setting, add_settings_field and ...
imagIne's user avatar
0votes
0answers
54views

How can I use the WordPress Settings API to create a settings page for my plugin?

I am currently developing a WordPress plugin called FlexiPress. I've created a settings page in the WordPress dashboard where users can configure various features of the plugin. I initially used a ...
Alexis Grolot WP Pro's user avatar
1vote
2answers
45views

When to store store plugin options as a single database record?

I'm building the analytics script plugin which offers customizations on a settings page. There will be around 20 options in total. Does it affect the performance negatively if I manage these 20 ...
Ostap Brehin's user avatar
3votes
2answers
74views

What is the real purpose of the parameter $option_group in the function register_setting()?

We have the following register_setting() function from the Settings API: register_setting( string $option_group, string $option_name, array $args = array() ) I get what the $option_name and the $args ...
Gerard Reches's user avatar
0votes
2answers
116views

Ignore "empty" fields when saving

My WordPress and PHP knowledge is limited, but I am working on a plugin, and in the admin page I have three settings - two text inputs and one checkbox. On save, the values are stored in the ...
mjlu's user avatar
1vote
0answers
32views

Hooking into button when using Settings API

I'm making use of the Settings API for a WordPress plugin. However, I want to perform some processing after the "Save Settings" button has been pressed (which I'm adding via the ...
dartiss's user avatar
1vote
1answer
68views

How to sanitize settings API value

I am working on a Plugin. I am using Settings API like below. register_setting( 'sports_api_key', 'sports_api_key' ); How can I sanitize settings API Text value here ?
abu abu's user avatar
1vote
1answer
33views

Trouble with WordPress Settings API: Form Submits When Fields Called Directly, Fails When Using Callbacks

0 I'm working on a WordPress plugin and facing an issue with the Settings API. I have a settings page with two forms. The first form uses do_settings_sections() to call fields from a public function (...
user2765920's user avatar
0votes
1answer
39views

how to test for options(fields) in settings API?

I've created an options page in wordpress with this code: <?php add_action( 'admin_menu', 'rtwhc_add_admin_menu' ); add_action( 'admin_init', 'rtwhc_settings_init' ); function rtwhc_add_admin_menu(...
rudtek's user avatar
  • 6,403
0votes
1answer
3kviews

Tab Nav and WordPress Settings API

I created a settings page for my custom theme on WordPress and created the various metaboxes via Settings API. To try to keep the page neater I created Nav Tabs, the only problem is that I can only ...
Matteo Feduzi's user avatar
0votes
0answers
114views

move setting data from wordpress api to codestar freamwork

I am coding a plugin that uses the Star code framework It should be mentioned that I had written this plugin using WordPress API before. Now I want to integrate and make it more advanced, but I ran ...
masoud nkh's user avatar
0votes
1answer
321views

How to use register_setting()

When creating a settings page, each new settings field need to be registered individually with register_setting() or can I pass the slug from the setting section into it to register the fields?
JayDev95's user avatar
0votes
1answer
135views

Settings API not Saving to Database or Display

I am developing a payments gateway, and wanted to have a page with a form to save authentication credentials for reaching out to an external API used for payment. I made a settings page using ...
Evan Kirschenmann's user avatar

153050per page
close