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. ...

learn more… | top users | synonyms

3
votes
1answer
22 views

do_settings_sections() doesn't escape quotes

I'm using the Settings API on a custom settings page: <form action='options.php' method='post'> <?php settings_fields('myplugin_settingsPage'); do_settings_sections('...
1
vote
1answer
90 views

Can I use the different settings sections over different pages using the save options group?

I registered one options group with few different options sections. Each section is meant for different page. register_setting( // http://codex.wordpress.org/Function_Reference/...
0
votes
1answer
23 views

WP Page Options Array

I'm creating a page options which contain some multiple checkboxes with specific values. Here is a snippet of my checkboxes form code: <label>Global Checkboxes</label> <input ...
0
votes
1answer
81 views

What exactly is the purpose of settings_fields()?

In the API description for settings_fields() it reads: Output nonce, action, and option_page fields for a settings page. And a look in the includes/plugin.php file turns this up: function ...
0
votes
1answer
133 views

how to get wp_editor to save data in plugin admin page

I'm trying to use plugin settings api to add wp_editor, but the text is not saving. // add the admin settings and such add_action('admin_init', 'my_plugin_admin_init'); function my_plugin_admin_init()...
0
votes
1answer
157 views

Customizer_register not saving custom setting to database

I'm currently trying to work on a WordPress theme based on Sage. The stage I'm at is creating custom controls to display on the customize screen for WordPress where you typically change things like ...
0
votes
1answer
22 views

WordPress Setting API - There is no field in options.php

I am creating a small WordPress plugin. I created setting page and there are two user inputs in setting page. I created two option types. Those are rmpm_post_newcount and rmpm_post_newname. After ...
3
votes
0answers
196 views

Custom Post Type Settings page, choose page to display archive

So, I followed the accepted answer of this post Possible to add another setting to 'Front page displays' setting for Custom Post Type but didn't entirely work, had to compare against the ...
3
votes
0answers
1k views

How can I save a multiple select array with the settings API for a plug-in options page?

I'm thinking this may be more of a problem with my PHP rather than my use of the settings API, but I can't seem to get Wordpress to save an array of data for a multi-select box. The multi-select box ...
3
votes
0answers
1k views

Settings API - adding setting fields dynamically?

Is there a way of adding settings fields dynamically? I have my own Settings API options generator just like in Chip Bennet's Oenology Theme, everything works perfect but I can't find a way to create ...
2
votes
0answers
89 views

Determining the compatibility of Settings API & Multisite

New to this forum so forgive any protocol infringements on my part and feel free to criticize so in the future I don't again. Down to the nitty gritty. I'm working on a project and am very new to ...
2
votes
0answers
508 views

Settings API store serialized data in the database (The Right Way)

Im trying to learn Settings API and I'd appreciate if someone could clarify this for me. I want to store serialized data in the database. Im using a class to do all the work for me. Heres what I ...
1
vote
0answers
37 views

Save & Publish disabled for two dimensional array Customizer

I am developing custom control in customizer. Control Its 4-5 textboxes that I can sort internally. Its a foreach loop. textbox1 textbox2 textbox3 .. The data stored is in array. $theme['textbox'][...
1
vote
0answers
78 views

Cannot update my options using wp_ajax

I have implemented wp_ajax in on my options page but the value of my options are not getting saved or updated. Here is my form: public function email_settings_form(){ // Set class property $...
1
vote
0answers
75 views

Tabbed navigation for plugin options using same row in database for all?

I'm trying to use WordPress' native tabbed navigation on my plugin's options page, but I'm having trouble. I've managed to get the options to display, though it displays every plugin option on every ...
1
vote
0answers
85 views

Settings API: Change position of custom setting field

I've searched high and low on Google and this site for an answer to this and am quite surprised to find nothing about it anywhere I've added a custom setting to the General settings tab using ...
1
vote
0answers
404 views

Bulk update all posts from plugin settings screen

I'm writing a plugin right now that will populate custom metadata for all posts on the site based on a certain rule. I've already created a Plugin's settings page and a logic that should be triggered ...
1
vote
0answers
990 views

Using multiple settings_fields() on 1 settings page

I have been struggling with this one for about a week now. I would like to have 2 variables available on a settings page, but I cannot figure out how to do this using the Settings API. Perhaps there ...
1
vote
0answers
195 views

Letting user dynamically create fields using Settings API

I created a settings page, using the Settings API, following this tutorial. Now I want to have a button that lets users dynamically add fields, similar to the way it is done in this other one. I don'...
0
votes
0answers
15 views

Correct way check nonce (security) using old Options API

I am developing plugin for Wordpress. Firstly I started using Settings API it looks good, but it is little bit complex and it doesn't provide the way to handle options manually. I have quite ...
0
votes
0answers
30 views

Is It Possible to Use the Wordpress Settings API Without Having the Settings put into a Table Tag?

It seems that when using the Wordpress Settings API that all settings are placed inside a table with a class=form-table. Is it possible to override that? That is to say, to simply have the settings ...
0
votes
0answers
15 views

plugin settings - multiple upload buttons in sections: how does sanitize_callback work?

my plugin' settings page includes a series of sections, each one contains an upload button: // create the input with the *exact* setting's name function myplugin_upload_cb($args) { echo "<input ...
0
votes
0answers
20 views

Multiple checkboxes sanitization using the WordPress Settings API

Dear All I have a problem in sanitizing a value for a group of checkboxes, using the Settings API. I am using the following - just for demonstration purposes: add_settings_field( '...
0
votes
0answers
27 views

Upload file via settings page

Question: Is there a secure way to upload files via a plugin settings page? Context: Hello world! A feature of my plugin requires the user to upload one or more files. More precisely, JSON files ...
0
votes
0answers
13 views

Multiple page plugin settings

I am building a plugin and I have made a single setting page that is working without any issue. Since it is becoming very long, and that it is made of 3 distinct sections, I wanted to split it in 3 ...
0
votes
0answers
64 views

Setting API - Default values for options when active the plugin

I have registered two options called test33_header_logo and test33_advertising_code. I need to set default options(test33_header_logo="logo1",test33_advertising_code=123456" when activate the plugin....
0
votes
0answers
14 views

update_post() on all databases of a multisite wordpress

I want to change a certain option from every single site of a multisite networks. I wrote the following that I hope will update all databases $allSites = wp_get_sites(); foreach (allSites as ...
0
votes
0answers
18 views

WordPress Settings API - Create Groups of Settings

I am building a plugin that will utilize the WordPress Settings API for its settings for the first time (I've used option frameworks in the past). I have already created and registered the settings ...
0
votes
0answers
11 views

Turn on certain plugin options after plugin install

I'm having issues in finding a way to auto-activate certain plugin settings on plugin activation. So for example , after you install the plugin "Option 1", "Option 2" will be automaticly ON. Here's ...
0
votes
0answers
40 views

Select fields on a settings page

I'm trying to do it in the style of 'Example #2' on this page: https://codex.wordpress.org/Creating_Options_Pages as it seems the tidiest way I have come across to do it. The problem is I want to ...
0
votes
0answers
49 views

Custom Settings Page not uploading Image

I am creating a custom settings page for a wordpress theme (i.e. a Theme panel). To display all the editable fields I do as follows: Create the Section for the current set of options with ...
0
votes
0answers
101 views

How to add a 'Save Changes' button to this custom options page?

I have recently created a custom options page for my plugin. It has 2 sub menus, one of which doesn't contain any options but that's correct. On the main menu area (where the options are) I have 2 ...
0
votes
0answers
17 views

Settings API Tabs overriding each other and not saving

I am using the Settings API to create custom options as well as tabbed navigation to organize those options on the screen. All the tabs use the same option group, but each tab is saved under its own ...
0
votes
0answers
106 views

WordPress Settings - Custom Button actions

I'm building a settings page of a plugin using the WP Settings API. So far so good, every fields are saved fine. Finally I need 2 extra custom buttons (besides the original submit button) which ...
0
votes
0answers
625 views

Saving plugin settings - ERROR: options page not found

I've created a form for my plugin settings and set the action attribute of the form to "options.php" but when I submit the form I get "ERROR: options page not found." add_action('admin_menu', '...
0
votes
0answers
40 views

When using an options array the Settings API isn't creating the database record

At the moment i am building my first plugin. So far i've saved as well as successfully uninstalled the options with single db records; everything worked like a charm. At the moment i try to improve ...
0
votes
0answers
98 views

Dropdown pages in Settings API

I am working with theme option. There is dropdown option like this. 'memory' => array( 'type' => 'select', 'label' => __('Memory', 'fw'), ...
0
votes
0answers
82 views

Creating a register settings class that supports extended classes

I am having some trouble implementing a class structure to use for plugins I am developing. What I am trying to do is create a class I can just re-use for each plugin. I want it to be able to be ...
0
votes
0answers
147 views

Data not saved Wordpress Custom Admin Page

I try to create an option page for a Wordpress theme. I manage to create the page, the Metaboxes , but when I send the form, the data are not saved. Before I show you my code , I specify that I use a ...
0
votes
0answers
50 views

Let users to add any number of input fields in the theme option page

I've been creating a custom settings page for my own theme according to this article. What I want to know is how to let users to add any number of input fields. Just like this image I have ...
0
votes
0answers
111 views

Dynamically Update Key in Associative Array When Saving Settings

I'm updating a WordPress plugin that I've built and realized that I've made a fairly large error in my original design. This is somewhat confusing, but I'll try to explain it as best I can. On the ...
0
votes
0answers
127 views

Undefined index notice when using the $args parameter in add_settings_field()

I'm using the Settings API to provide my admin-user with some options for a plugin I'm writing. I have about 30 text fields to output on the plugin options page so I have created a very general ...
0
votes
0answers
18 views

How do I build a settings panel under the plugin

I'm trying to build a settings panel for my plugin that is located under the plugin on the plugin page and slides down when the user clicks the settings link like other plugins (WP Maintenance Mode) ...
0
votes
0answers
46 views

how can I detect that option value has changed?

I am working on a plugin and I want to fire a different action based on each option value change. so how can I do that ? example: $options = get_option('ACP_settings'); if $options['acp-select'] has ...
0
votes
0answers
87 views

Options not saving

My options were saving properly then I edited the files and it's not saving anymore. I undo the changes on the files and I'm sure that those were the only files that I edited. One section saved ...
0
votes
0answers
158 views

File input returns null in theme options array

Trying to work out a rather complex array situation with a theme options page. While working with file upload I can't seem to get it to work. Any idea what I might be missing? Simplified example ...
0
votes
0answers
234 views

Custom options - register, defaults and delete empty fields (Settings API)

I cant figure out how to register all of my setting fields into 1 database option. Code for my menu page: add_menu_page('Custom options', 'Custom Options', 'manage_options', 'rm_options', '...
0
votes
0answers
312 views

Settings API Multiple Checkbox in General Settings

I am trying to add a custom setting at General Settings page with checkboxes. My plan to this is for users to select appropriate categories for their blog based on a list of categories through ...
0
votes
0answers
395 views

Plugin settings checkbox

I am creating catagory checkbox select. My code to render the category checkbox is: // CHECKBOX - Name: plugin_options[chkbox2] function setting_chk2_fn() { $options = get_option('...
0
votes
0answers
84 views

Theme options: Display ID of page options

I am building a theme options page and everything is great. There is a function to display the list of page options. $all_pages = get_pages(); $page_options = array(); $page_list = array(); $...