The tag has no wiki summary.

learn more… | top users | synonyms

17
votes
2answers
2k views

'Global' settings page for multisite plugin

I'm working on a plugin that will be installed in a multisite instance. How do I create a single settings page that is visible at the "Network admin" level only - most of the guides i've seen relate ...
14
votes
3answers
11k views

How to get WordPress Time Zone setting?

Can someone tell me how to get the time zone that is set in the WordPress Admin? For example, if the blog is set to Eastern time, I need this exact string to print out: US/Eastern This is for a ...
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 ...
11
votes
2answers
2k views

How to pass variable to add_settings_section() callback?

I am attempting to automate, as much as possible, the Settings API function calls for each setting in a Plugin. Looping through the options array, and outputting add_settings_section() and ...
10
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 ...
8
votes
3answers
601 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 ...
8
votes
2answers
294 views

Plugin for editing options on multisite?

does anyone know of a plugin for mass editing of settings on a multisite installation? Something like Plugin Commander for Settings?
7
votes
3answers
9k views

How to get the Date Format and Time Format settings for use in my template?

This is a strange question, but I want to know how I can access the Date and Time settings Admin > Settings > General > Date Format Admin > Settings > General > Time Format I ...
7
votes
2answers
2k views

How to display admin error notice if settings saved succesfully?

Title sounds counter-intuitive but bear with me. :) I have options page, made with Settings API. When user enters invalid data I want to display error notice with add_settings_error() call. But! To ...
6
votes
2answers
519 views

Modifying a JS file with data from plugin settings

I have a plugin that, among other things, has a javascript file that requires a few user specific settings. What would be the best way to get those settings into javascript from the plugin's settings ...
6
votes
1answer
2k views

How to pass arguments from add_settings_field() to the callback function?

I have a function like this: add_settings_field( 'contact_phone', 'Contact Phone', 'settings_callback', 'general'); That works. It calls settings_callback. Cool. The problem I have with this is: ...
5
votes
1answer
989 views

Settings API - creating reusable form elements?

I have a set of settings fields: (...) add_settings_field( 'Option1', 'Option 1', 'textarea', 'page1', 'plugin_options'); add_settings_field( 'Option2', 'Option 2', 'textarea', 'page1', ...
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
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 ...
5
votes
1answer
1k views

Best practices for a Style/CSS based theme options page?

I would like to create a theme options page based only on changing the site wide CSS styling. For instance body/container background colors, font-sizes, font colors, etc. I have accomplished this by ...
4
votes
2answers
247 views

How To Provide Sub-Blogs Their Own Domain Names?

I ran a search that did not yield that many results. Is it possible, and how can each sub-blog of a multi-site installation be given its own domain name?
4
votes
1answer
3k views

Get page ID of page that is set as the posts page

In WordPress settings you can set a page as the Posts Page. This can be found: WP-Admin->Settings->Reading Settings->Front page displays How do I retrieve the page ID that is set in this ...
4
votes
2answers
523 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
2answers
2k views

Moving WordPress.com theme and widget settings to self-hosted site?

Possible Duplicate: Migrating from WordPress.com to self-hosted site and autoforward visitors? How can I move theme and plugin (widget) settings from a WordPress.com site to a self-hosted ...
4
votes
2answers
3k views

Add multiple custom fields to the general settings page

What I would like to do is to add a few custom fields to the general settings. This is the code that Im using. It works allright but I just cant figure how to add more fields. I would like to create ...
4
votes
2answers
421 views

Blog Settings import/export in Wordpress Network environment

I can't use PHPMyAdmin to export/import my blogs from one server to an other because I'm using Wordpress Network. Export/import works pretty well for Posts, custom posts types and their media, but ...
4
votes
3answers
1k views

Add_settings_field() parameterizing callback?

I'm trying to create a rather large and extensive settings page with various options of very similar type. Since there will be about 20 different fields, and the differences between most of those ...
3
votes
1answer
856 views

Is there a hook attached to general settings save?

I want to add a field to the general settings page, but I can not save the field because I can't find a hook for the pages save. Any ideas?
3
votes
2answers
871 views

Theme Options page with tabs

I have a theme that I'm developing from an HTML template I have. I'm also designing an options page along with a plethora of plugins built-into the theme itself. I've chosen a tabbed interface and I'm ...
3
votes
2answers
195 views

Why might $input (Settings API) be coming through empty?

I'm trying to be a good thememaker and pass all my settings through the Settings API, but I'm running into some difficulty in the sanitization callback function. The core of the problem is this: the ...
3
votes
4answers
3k views

How to Create a Custom WordPress Install Package?

I downloaded the latest version of WordPress (3.5) and created a custom theme. I plan to upload and install it for multiple clients. Is it possible to customize the default settings such as not have ...
3
votes
1answer
224 views

Inherit plugin settings to new site in Multisite

I use the Breadcrumb NavXT plugin for a WP Multisite. I activated the plugin for all sites so I can use it throughout my network. My problem is that every time I add a new site I have to change the ...
3
votes
1answer
89 views

How to Save Different Settings Options Using Settings API and/or the Theme Optimizer

I would like to allow users to save different versions in the options panel using the Settings API and/or the Theme Optimzer. For instance, imagine that I have styled my site using via an admin panel ...
3
votes
1answer
716 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
3answers
2k views

Where, When, & How to Properly Flush Rewrite Rules Within the Scope of a Plugin?

I am having a bit of a strange issue with rewrite rules not flushing properly. I have tried using flush_rewrite_rules(); and flush_rewrite_rules(true);. I have also tried globalizing $wp_rewrite ...
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
3answers
1k views

Multisite: setting theme and options when a new blog is created

When a new blog is created in a WP Multisite instance I want to be able to set the default theme and configuration options create 2 menus (main and secondary) and associate them with the 2 slots ...
2
votes
2answers
115 views

How to display some settings for super admin user only using Settings API

I'm developing a plugin with an options page using the Settings API. I'd like to have one options array stored for my plugin, but on the settings page, I'd only like some of the settings to be ...
2
votes
1answer
5k views

How to make WordPress use new Upload Path settings in Multisite Setup

I have a site that is setup for WordPress multisite. The main site works, but the subdomains are not functioning as I would like them to. Here are the settings for the main site: Upload Path: ...
2
votes
2answers
244 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
2answers
263 views

How to mark an option as selected

I want to display post categories in theme settings, and I successfully did that using this code: <?php /* Get the list of categories */ $categories = get_categories(); ...
2
votes
1answer
798 views

Creating Settings Page with dropdowns for Plugin

I am setting up my plugin's settings page and I am able to get the fields I want on the page, but I want them to be dropdowns not textboxes... I have not found any useful info on the web on how to do ...
2
votes
4answers
1k views

Duplicate settings of master blog to slave blogs in WP multi-site installation

Is there any smart way to set a site (blog) as a master, which settings are replicated to the rest of the sites in the network? There are plugins like this one: YD Network-wide WPML that attempt to ...
2
votes
2answers
214 views

Need help understanding/coding with Settings API

So I did something like below, but I get just (I am expecting a Facebook textbox?) I hope its not too messy. I am new to Settings API ... add_action('admin_init', function() { ...
2
votes
1answer
115 views

Making a configurable field translatable

I'm working on a theme right now that gives the admin the possibility to set different texts that are used within the theme, by configuring them in the admin panel (e.g. the text that is displayed, ...
2
votes
1answer
424 views

WordPress (+WPMU) Import/Export ALL settings?

As we all know WordPress does not import Widgets when you import content with [Tools > Import] and I'm wondering what kind of script could do that? Database has more than just 1 single information ...
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
0answers
75 views

Tab from Settings API resetting all options with INSERT INTO [closed]

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
1answer
162 views

Wordpress address URL keeps dropping the www

My Wordpress Address (URL) in general settings keeps losing the www from the URL - I type in http://www.domain.com and it saves and works fine. Next time I go in the address has changed to ...
2
votes
1answer
1k views

How to upload images using Settings API

I want to allow users to upload images for use in a rotating banner. I tried using the media library, but didn't get much help ... So I thought, I'd just implement the upload myself. But I encountered ...
2
votes
3answers
280 views

Clone plugins (and settings) to new installation?

Is it possible to clone the plugins and settings from a WordPress site to a new fresh install? I don't want any of the content from the original site I just want all the plugins used and their ...
1
vote
3answers
5k views

How to change the file upload directory on version 3.5?

The option to change the upload folder for images is gone on version 3.5, any way to make it visible again or a workaround ? From this core ticket: Changing the upload_path and upload_url_path ...
1
vote
1answer
587 views

Enqueue Javascript Correctly for 3.5

I am trying to create tabs for admin settings page in wp, but I think I'm doing it wrong. The example below shows how I did it but I don't know how to change this to use it correctly with no conflict ...
1
vote
2answers
230 views

Good way to store content and settings for an RSS plugin

I am building an RSS reader plugin and I'd like some advice on how to store the data and settings for this plugin. The idea is to be able to enter a set of feed sources and associate each one of ...
1
vote
1answer
120 views

How to tell if plugin has been network activated

I have the following lines of code that add the settings link and setup for my plugin: add_action('admin_menu', array(&$this, 'admin_settings_menu')); // Add menu to options ...