The options tag has no wiki summary.
32
votes
6answers
4k views
framework for plugin/theme options panel? [closed]
I found that the longest part of a plugin or theme development is creating the options panel, at least in my case.
So i like to know what's your take on that.
Do you use a ready made framework or ...
26
votes
3answers
4k views
Are transients garbage collected?
This question got me thinking Transient RSS feeds in wp_options not removed automatically?
Transients are supposed to expire and be deleted. However the only way I see this handled is when transient ...
12
votes
4answers
5k views
How do I add CSS options to my plugin without using inline styles?
I recently released a plugin, WP Coda Slider, that uses shortcodes to add a jQuery slider to any post or page. I am adding an options page in the next version and I would like to include some CSS ...
11
votes
3answers
1k views
Multisite: How to add Custom Blog Options to new blog setup form?
Seems like a simple enough requirement, but I'm struggling:
I want to add an option field to the "Add New Site" -- a simple text option is fine.
How do I do this??
I need to save this custom blog ...
10
votes
1answer
297 views
Limit the number of inactive widgets
I'm trying to restrict the number of widgets from the "wp_inactive_widgets" sidebar to maximum 10, because the widgets admin page is incredibly slow:
add_filter('pre_update_option_sidebars_widgets', ...
8
votes
2answers
767 views
How to add field for new site-wide option on Network Settings screen?
I'm working on a plugin, and part of it involves setting an option value that applies to all sites in a WordPress network. I know about the add_site_option and get_site_option functions that let you ...
7
votes
2answers
745 views
Are all options loaded to memory on each request?
Are all options variables fetched from the database and loaded to cache on each request?
6
votes
1answer
65 views
Is it safe to store a user setting you don't want the user to ever modify as a user option?
I have added some custom user options to the profile page on my site, and most are all OK for the user to modify themselves. These options live in their own section. The users have read access and ...
6
votes
3answers
801 views
Options for CDN with WordPress Including Supporting Plugins?
What are the options for Content Distribution Networks for use with WordPress? I'd like to their objective pros and cons, their associated plugins or other ways to utilize them, their relative ...
5
votes
2answers
870 views
WordPress Theme Options Import/Export
I already have a theme options page that saves to wp_options > kittens_options.
I'm looking for a simple way to incorporate an import/export textarea of those options on my options page.
I've ...
5
votes
3answers
179 views
Releasing new plugin version, how to rename old options keys?
I have everything ready for publishing a new version of my plugin but one last issue stands...
The old version had no naming convention for its key option names.
The options grew and I renamed all ...
4
votes
2answers
12k views
How to use checkbox and radio button in options page?
Call me stupid but I coudn't figure out how to do it. For text input I would just:
<input type="text" name="option_name" value="<?php echo get_option( 'option_name' ); ?>" />
and then ...
4
votes
3answers
153 views
Fallback when Transient API fails
I'm trying to figure out how to best solve an issue I have with 3rd party API's (OG, Foursquare, Yelp, etc.). I use the transient API to call and store the various data in order to:
Not exceed any ...
4
votes
1answer
593 views
Confirmation before deleting plugin options via uninstall.php
I'm creating a WordPress plugin and have the uninstall.php file ready. It deletes the options used by the plugin on deletion. What I'd like to do is to popup a dialog box asking whether to delete or ...
3
votes
4answers
2k views
Using widget options 'outside' the widget
I want to save some parameters in the widget options which are then passed into another page.
The widget is a form which calls a webservice.
The options I want to pass are the authentication for the ...
3
votes
1answer
273 views
Why does WordPress use serialize rather than json_encode for the options table?
I have a basic understanding of serialize (I come across it often when I'm migrating WordPress installs) and I just discovered json_encode.
Given that serialize causes so much trouble with replacing ...
3
votes
2answers
590 views
Add on the fly tabs to plugin options
Hi I am building a plugin options page. What I'd really like to do is implement repeatable tabs (which I know is possible with the Settings API), but with a twist I haven't seen in any options panel ...
3
votes
2answers
179 views
WordPress Admin back-end - advanced options page?
Am I losing my mind? I seem to recall that somewhere in the Admin back-end there was a page that basically listed out all the fields within wp_options. Does this ring a bell to anyone else? I thought ...
3
votes
3answers
419 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 ...
3
votes
1answer
643 views
What's the difference between Options & Settings?
And which one should I use?
What's the difference between Options API and Setings API?
I have a theme with over 100 admin options, how should I register & store them? At this moment I'm using ...
3
votes
2answers
411 views
Submenu pages delete settings from options array when saved
I'm writing a theme and adding a menu with several submenu pages. It works fine, except that I'm trying to use only one array to save all the settings into the database and this is causing some ...
3
votes
1answer
57 views
Performance with autoload and the options table
I am playing around with the autoload column of the options table. I didn't find much information about how the autoloaded values are used. I tried a print_r($GLOBALS) and saw that the autoloaded ...
3
votes
1answer
345 views
How do I create my own admin button and theme settings page?
I have some options I want my client to be able to change, and so I need an options page for my theme that I can show for those with "editor" status. How can I do this and utilise the options in my ...
3
votes
1answer
643 views
Settings API - easiest way of validating checkboxes?
I'm using Settings API and I can't get checkboxes to work, if they're set to "false" they're not even being $_POST and that's the point.
Stephen Harris & Chip Bennett explained it, but I believe ...
3
votes
1answer
56 views
Outputting results from select box option in options panel
I'm trying to figure out how to get the results from a select box option and apply them to my theme. When I use a text input or color picker it works fine. But when I use a select box, nothing is ...
3
votes
2answers
603 views
Multiple Custom_Background, is it possible?
Is it possible to create multiple "custom background" administration pages? A site I'm doing now needs 2 different background in 2 different areas, I would really love giving my client the same ...
3
votes
1answer
362 views
Settings API - save an array of options as one setting (array_push?)
1. Basic settings API callback.
Using Settings API my $sanitize_callback validating function looks like:
(...)
if($type == "foo") {
$valid_input[$id] = $option[$id];
}
else ...
3
votes
0answers
217 views
How do I extract the Alt Text from an image attachment upload via the Wordpress Options Framework Plugin?
I'm currently creating a custom WordPress theme and using the WordPress Options Framework plugin to make a custom options page for my client. I'm able to easily create an image upload option and can ...
3
votes
1answer
131 views
Define Wordpress image size in img tag
Is there a way to output a image in a pre-determined size (Ie; using add_image_size) using just the img tag?
For example, how can I make sure that the image that is echoed using this tag is the exact ...
2
votes
4answers
298 views
Long option names fail silently?
This was really driving me crazy. I was debugging some code with code-generated transient names and they were failing like crazy for no apparent reason.
After much much pain and experimentation I ...
2
votes
1answer
156 views
On Install, which code sets the 'home' option?
I'm just doing some wordpress development and wondered for a brand new install, which code within core is generating the first value that get's filled into the home option?
I'm looking for the code ...
2
votes
3answers
172 views
update_option method with support of utf8
I am using a plugin the updates the option table using update_option command.
When I update content with hebrew characters it turns into gibrish.
My database does support hebrew (or any other utf8 ...
2
votes
2answers
133 views
Unified Approach for Placing Option Pages
Currently, it is up to any plugin's author as to where to put a link to the plugin's option page. I have seen at least the following "solutions":
Plugin list
Dashboard menu
Plugins menu
Appearance ...
2
votes
2answers
189 views
Separate backend “Widgets” page for each language
Im currently trying to make my backend work with multiple languages.
Im using qTranslate as my translation plugin.
So far I have accomplished a custom option page with multi-language support. When ...
2
votes
1answer
465 views
WordPress plugin options and jQuery
I'm creating a plugin that uses jQuery to modify some css, but what I can't figure out is how you can control the execution of the jQuery with WordPress plugin options (like checkboxes true/false). ...
2
votes
2answers
172 views
Wordpress Plugin Setting's POST
I've developed a few plugin for Wordpress. Currently I've not been able to replicate the way wp save settings. I've a setting page which I learned from a tutorial. It POST to option.php, and wp take ...
2
votes
1answer
158 views
Site Title and Tagline in Theme Options Page
I'm using the Options Framework Theme to put together an options page. The user(s) I'm building this for would like to be able to edit a few settings directly from this page, including of which - the ...
2
votes
2answers
732 views
How can you upload an image from within a settings page?
Is there an easy way to include an upload box to your settings page?
I am building an Open Graph options page and I like users to upload a standard image directly from that page.
2
votes
1answer
41 views
Is there a limit to the number of options you can store in one settings field of wp_options?
I have a theme with an options page. And on that page there are 1083 options. I've noticed that the last 13 are not saving. They were saving at one point, but after I added new options above them, ...
2
votes
1answer
55 views
How to store widget fields data as an array?
I am creating a widget, it needs to store about 10 IDs. Right now I'm using following field method to store each of the ID in a separate field. It stores data of each field in a separately in the ...
2
votes
2answers
59 views
Plugin options autoloading
In the book 'Professional WordPress Development' I found this tip:
As a rule of thumb, if your options are needed by the public part of the blog,
save them with autoload. If they are only needed in ...
2
votes
2answers
139 views
Custom style on profile options page
is there any way to style the profile page on wordpress ? I will like to add something like:
Start of the page just below the <h2> tag
<div id="normal-sortables" class="meta-box-sortables ...
2
votes
1answer
583 views
How to add multiple checkbox elements to media attachments?
Based on solved question from:
How to add a checkbox element to attachments editor with example
Theres an example of multiple Checkboxes, for example: Colors, patterns, etc... A grouped list but ...
2
votes
1answer
62 views
Environment Specific Options Token
Is it possible to add a token to any wp-option that could be replaced on get where the token being defined in a plugin’s option or the configure file?
E.g.
...
2
votes
3answers
2k views
Where to hook register_settings for Settings API when also want to update options outside of Settings API?
The Settings API is a convenient way to add administrative options. Tutorials on the settings API hook register_setting to admin_init. But what if you also want to programmatically change the same ...
2
votes
1answer
104 views
Best way to Integrate Google Search?
I would like to use Google Search as opposed to the built-in search provided by the Wordpress engine. What would be the best way to integrate Google Search?
2
votes
0answers
52 views
Tab from Settings API resetting all options with INSERT INTO
I have an Options menu created with the code from Chip Bennett tutorial, the old code, though, the one from like a year ago (the new one has a much better validation structure, but still, it works ...
2
votes
2answers
1k views
Get category slug and display it on a query_post
I just read "How to create option page for wordpress theme" in wp.tutsplus.com - I have a problem with getting categories .
there is two parts to my question
- Part A - Get category slug and ...
2
votes
1answer
143 views
Restore a Plugin's Default Settings
Is there a way to code "Restore Defaults" button into a plugin options page?
I'm writing a plugin right now that has sets up some default values on activation (via register_activation_hook), and I'd ...
1
vote
3answers
62 views
Creating a plugin that will add options. Where should the options menu pages go?
I am creating a plugin for a restaurant theme that will provide a few options to add the restaurant hours of operation. Currently, I use a custom post type to control the restaurant hours but have ...