1
vote
1answer
58 views

Saving Plugin settings to the database

I'm not a complete novice with php or wordpress but am wanting to approach this problem the most efficient way so believe asking here will help. I've got a plugin that randomly generates a quote - ...
2
votes
1answer
107 views

“Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin

I am developing a plugin using Tom McFarlin's Boilerplate repository as a template, which utilizes OOP practices. I've been trying to figure out exactly why I'm unable to correctly submit my settings. ...
3
votes
1answer
51 views

How to Loop Plugin Option Field Set?

Problem/Background Currently, I'm creating a plugin for a client that will enable them to mark and modify predetermined Google Map polygons (displayed on the site) in the dashboard. I want to let ...
0
votes
0answers
60 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 = ...
0
votes
0answers
16 views

Wordpress Option Api:Using Image in Checkbox

I am using radio in settings api.I want to replace "Left" and "Right" with image.My code is function menu_position() { $options = get_option('plugin_options'); $items = array("Left", "Right"); ...
0
votes
1answer
26 views

Plugin development: can't update settings with multiple settings sections

I've got my plugin options set up to be in multiple sections, for ease of use and more efficient database calls. However, since reorganizing my Options page I can only seem so save changes made in the ...
1
vote
1answer
72 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( // ...
2
votes
1answer
35 views

Does settings API create settings on run time?

I'm tweaking a plugin and I'd like to have an option value different for each backoffice user. Currently the options are defined using the add_settings_field method that is performed in the ...
2
votes
1answer
52 views

Generating User(s) with Settings API

I am trying to create a plugin that will generate users. I am pretty new to Wordpress and my PHP is ehhhh. The idea for it is for the plugin to generate multiple users when its finished. Right now ...
1
vote
2answers
118 views

Remove Internal Style Sheet if no Value Provided?

I am using this code to add my options inside head section code works but my problem is that if no values are provided my function still echoes an empty <style type="text/css"><style> into ...
0
votes
1answer
48 views

Add_menu_page and saving settings

I am working on an WP plugin and have my settings in a created menu page. When I save the page my settings are saved without any problems, but I don't return to the settings page but to a page where ...
0
votes
2answers
85 views

Issue on Checkbox with Custom Option Page

I am trying to use a checkbox on Custom Option page by using Setting API. Every thing works fine at back-end and I can update the checkbox states by registering the settings.But when I would like to ...
0
votes
1answer
880 views

How to Use Checkbox in Custom Option Page Using The Setting API

Can you please let me know how I can add a checkbox to Setting API in creating Custom Options Page? I am using the following code to add a txt box which is working perfectly but I am totally confused ...
0
votes
1answer
31 views

Update plugin settings option_name for big plugin update

I am working on a plugin update and have changed the settings option_name and key. I would like that the old options are transferred to the new option_name. The old option name is: plugin_options ...
1
vote
0answers
222 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 ...
1
vote
2answers
362 views

Is get_option function cached?

In my plugin, I use the following code to retrieve an option from the database: $options = get_option('my_plugin_options'); If I use this 10 times in various functions of my plugin, does WordPress ...
1
vote
2answers
199 views

Wp die causing 500 Internal Server Error?

I have function to upload images inside my settings API ,it uploads images as expected but the problem comes when user chooses to upload non-image file to stop users from uploading other files ...
13
votes
1answer
2k views

Settings API with arrays example

I'm using the Wrox WordPress plugin development book as a primary reference for getting started with a new plugin and I understand all settings can be saved as 1 array but the book does't give an ...
2
votes
1answer
173 views

Add Admin Menu Inside Construct or Init

I thought I was making headway in my WordPress Development education until I ran across the Boilerplate for WordPress plugins and it uses a class object. I'm fine with that and understand those ...
2
votes
1answer
370 views

How to use the settings API to set multidimensional arrays

I'm writing a course information plugin. Most course info is related to to a post (a custom post type of 'course'), so I have put the majority of info in the postmeta table. But some info isn't ...
0
votes
1answer
242 views

Combo/Drop down box on plugin settings page that allows additional options to be added

I'm not sure what this is called and have not had much success searching for it yet. In a plugin settings page, I would like a 'combo box' or 'drop down box' that also includes the ability to add an ...
0
votes
1answer
296 views

Options don't save, validation callback not executed

I have been using settings API for my plugins for some time and it used to work well. Now it is broken and I can not figure out why. Apparently, the option validation function is not even called. Form ...
3
votes
2answers
100 views

Which to use to execute code during the saving of a plugin settings page?

I'm writing a plugin with a settings/option page and I want some php code to be executed whenever someone saves the settings on that page and that page alone. Which actions do I need to hook into to ...
1
vote
2answers
458 views

Wordpress Settings API: saving multiple rows of similar data

I've been experimenting with the plugin options starter kit but can't find a way to save multiple rows of similar data using the Settings API. Example of what I'm trying to save: ...
-1
votes
1answer
143 views

How can I include a setting that has a variable number of values in a settings page using register_setting?

I have one option on a settings page that can have between 1 and 5 values. I have a basic understanding on how to set up single value settings using the Settings API, but how do I go about generating ...
0
votes
1answer
838 views

Change the display of Settings API (do_settings_sections)

I am working on a plugin which uses Wordpress Settings API. I notice that the functions do_settings_sections (and do_settings_fields) display the fields using TABLE. How do I change its formatting? (I ...
-1
votes
1answer
237 views

How to delete all the options in an option group

I have created a few options with with the register_setting function: <?php register_setting( $option_group, $option_name, $sanitize_callback ); ?> Is there a way to clear the whole content ...
0
votes
1answer
54 views

Pause plugin option page until all data manipulation is complete

I have an option on my plugin page where I load content into all the posts in the blog. Now this takes some time, esp when there are a log of posts. Now the way is it set up now, when you press ...
7
votes
3answers
559 views

What are the advantages to the Settings API?

Let me preface this by saying that I hardly ever work with WordPress - in fact, the last time I did a site in WordPress was back during 2.2. Yesterday I made quite a mess of everything and asked ...
4
votes
3answers
470 views

What's the best method for emptying an option created with the Settings API?

I'm trying to empty an option created with the Settings API and failing. update_option ( 'my_option', '' ); appears to do nothing, whereas delete_option ( 'my_option' ); destroys the whole option ...
1
vote
3answers
258 views

Using the Settings API, how should I add multiple values to an option?

I'm trying to add/ update additional values to an option created with the Settings API. I'm trying to do this with my validation callback function, but I'm not getting very far. Here is my code: ...
0
votes
1answer
123 views

Why isn't the Settings API designed to work for plugins using custom admin menus? [duplicate]

Possible Duplicate: How should one implement add_settings_error on custom menu pages? The Settings API offers all sorts of labour saving features and future proof code. I find it really odd ...
4
votes
3answers
1k views

How should one implement add_settings_error on custom menu pages?

The Professional WordPress Plugin Development book explains in detail how to properly use the Settings API, and it also demonstrates how to add Menus and Submenus, but unfortunately it doesn't provide ...
1
vote
1answer
730 views

Plugin settings not saving

I'm having a devil of a time getting my plugin settings to save. I've gone through the code so many times I have to think I've simply missed something. I'm following the Setting API, but any changes ...
1
vote
1answer
427 views

GET parameters interfere with my plugin settings

I have my plugin all set-up using the Settings API and working but what I have is two manual functions in my plugin that can be run by the admin user by visiting the following URL's <?php echo ...