The tag has no wiki summary.

learn more… | top users | synonyms (1)

37
votes
6answers
6k 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 ...
34
votes
3answers
7k 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 ...
13
votes
4answers
8k 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 ...
12
votes
2answers
2k 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?
12
votes
3answers
2k views

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
397 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', ...
9
votes
2answers
2k 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 ...
6
votes
1answer
77 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
1k 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
20k 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 ...
5
votes
4answers
4k 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 ...
5
votes
3answers
2k views

How does object caching work?

I'm looking for a definitive answer here. When object caching is enabled, where do options and transients end up living? By default, both are stored in the database. But I've heard some references ...
5
votes
1answer
638 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 ...
5
votes
3answers
312 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 ...
5
votes
1answer
1k 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 ...
5
votes
2answers
2k 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
1answer
2k 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 ...
5
votes
1answer
982 views

How To Add New Option Types To Option Tree?

I am using option tree in theme mode and child theme mode and I am trying to add new option types. The new option types will be based off of the post-select option type, but will only list posts from ...
5
votes
1answer
1k 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 ...
4
votes
2answers
2k 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 ...
4
votes
3answers
480 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 ...
4
votes
3answers
211 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
2answers
511 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 ...
4
votes
1answer
973 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
2answers
369 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
1answer
274 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
2k views

Correct way to serialize the data of options table?

I am writing a plugin and it require around 15 different options so I am using php serialization. I'm doing it by an array and update option with php serialize functions. but when I access it from ...
3
votes
1answer
684 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
92 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
781 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
2answers
349 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 ...
3
votes
1answer
446 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
221 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 ...
3
votes
1answer
694 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 ...
2
votes
4answers
413 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
2answers
2k views

How should I use register_setting, add_settings_section, & add_settings_field in my plugin's options page?

I'm working on a settings section for my plugin, and after reading over Wordpress's documentation which is in ROGUH DRAFT status, and also the Creating Options Pages - which is also in "transition", ...
2
votes
1answer
167 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
204 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
2k views

How to set up default values for a plugin?

What is the best way to go about setting up default values for a plugin? Should I just insert those values into the wp_options table? AND...if that's the best way to go about it, I have another ...
2
votes
3answers
429 views

update_option not working in stand-alone PHP script

I have a standalone PHP script in my WordPress theme's directory that I run once every hour through a cron job (or manually if needed). All other WordPress functions are working except the ...
2
votes
2answers
138 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
109 views

Wordpress DB: options-table –> 32 gzipcompression?

I just wondered what this row in the Wordpress Database refers to? 32 gzipcompression 0 I stumbled upon it in the WP options table. What if I set the value to 1. I do already have ...
2
votes
2answers
283 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
726 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
238 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
98 views

What is an “Options Framework” for Wordpress

I am exploring a couple options frameworks for wordpress like the Redux Framework. As a non-developer interested in maintaining my own Wordpress based web app, when would an options framework like ...
2
votes
1answer
506 views

How do I handle multiple Submit buttons in plugin's option page?

I'm developing my first plugin for WordPress and I'm getting a grasp of the whole hook system. I'm now stuck on a (probably) small issue, that I could possibly circumvent, but I'm afraid of coming out ...
2
votes
1answer
61 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
468 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
1answer
2k 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.