Tagged Questions
1
vote
3answers
61 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 ...
0
votes
1answer
51 views
My first plugin doesn't save the data in options
This is my entire code. It doesn't save the data I enter on the plugin settings page. I don't have a clue on why this happens! Can somebody please help me?
<?php // add the admin options page
...
0
votes
2answers
242 views
Plugin getting Cannot modify header information errors
I am trying to build my first plugin but am receiving the following error:
Warning: Cannot modify header information - headers already sent by (output started at ...
0
votes
2answers
46 views
How to add options to the plugin page?
I can't find a more or less clear example on how to create additional fields, so may be someone can help me here? Here is my code:
function __construct(){
add_action('admin_init', array($this, ...
0
votes
1answer
68 views
Saving widget options from class method
I have a widget class (derived from WP_Widget) that has a method (called via ajax) to update part of its options(the elements order) without the user to click "Save", to set the handler I do from the ...
1
vote
2answers
36 views
options creation for plugins
I am new to wordpress and learning to create plugins.
I want to know how wordpress itself create options in 'wp_options' table for plugin during plugin installation or activation?
How wordpress decide ...
3
votes
0answers
211 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 ...
1
vote
2answers
869 views
clean wp_options table unused rows
In my Wordpress Blog site i have installed too much plugin and remove also many plugins. In database table "wp_options" size increases approx 13MB and there are many rows which are unused at this ...
1
vote
0answers
144 views
WP-Super-Cache - generate cache programmatically
I wonder if there is possibility to generate WP-Super-Cache programmatically after the cache is being purged ( after I have published a new post ). I thought of writing some kind of crawler that will ...
0
votes
2answers
1k views
Contact form 7 select box different value-text then content-text in option
DSoes anyone know how I can set a different valute in the select-options in contact form 7 plugin? Here is an HTML example of what I'm trying to do
<selct>
<option value="1">My ...
0
votes
1answer
157 views
Default Plugin Settings Not Writing to Database
I have my plugin setup as such:
Main plugin file mouldings.php
<?php
/*
Plugin Name: Moulding Profiles
Plugin URI:
Description: Creates a 'Moulding Profiles' and 'Idea Gallery' custom post ...
0
votes
1answer
66 views
Need to add/remove group of options and display them as rows
I am creating a plugin which has 5 textbox for options. What I need to do is to treat these 5 options as 1 item, and being able to add more items.
I've always worked with static hardcoded options for ...
0
votes
2answers
120 views
Multisite Plugin - Access options (wp_options) on child sites
Is there a way I can access the wp_options table of all the child sites? I want to create a multisite plugin that can be setup at the network level and will populate the child site plugins with ...
1
vote
1answer
455 views
How can I add an options page for my class based plugin?
I'm trying to use the new Settings API with a class based plugin to add a settings page. This is the code I have so far:
class simple_sample_plugin{
function simple_sample_plugin()
{
...
1
vote
2answers
912 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", ...
0
votes
1answer
90 views
How to get values from network settings panel?
I'm using wordpress 3.3. I've created a plugin
My plugin details:
My plugin creates a sub menu under Network settings and create two form fields to define adsense code (200 x 200 ad, 300 x 250 ad).
...
0
votes
1answer
145 views
update_option creates an option, which empties on a blog reload
I am currently writing a plugin that allows all authors to be listed on a page. I've created an options page and wanted to create a function that allows administrators to exclude certain authors from ...
1
vote
1answer
1k 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 am doing it by an array and update option with php serialize functions.
but when I access it ...
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
1answer
174 views
Admin Theme customization
I followed instruction on the wordpress codex site on creating an admin theme via a plugin. I activated the plugin, but my stylesheet isn't being included in the <head>..
Here's my code:
...
7
votes
2answers
760 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 ...
1
vote
3answers
404 views
How to debug register_setting callback function
I am using the following code:
register_setting(
'myplugin_options', //setting group name
'myplugin_options', //option name that will be stored in the database
...
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.
...
0
votes
2answers
1k views
How to find out if option exists but is empty?
I am using something like this on one of my plugins:
$myOption_def = "myOption Default Value";
$myOption = get_option( 'myOption' ) ? get_option( 'myOption' ) : $myOption_def;
That works fine, but ...
1
vote
2answers
391 views
Changing widget options via the functions.php when there are no hooks
The problem: to change a widget's options with a custom function in functions.php, when there are no useful hooks, and where there are multiple occurrences of the same widget (multiwidget).
This ...
0
votes
1answer
51 views
What is the most efficient way of adding additional functionaliy for admin only
I'm trying to figure out the best approach to add additional functionality that will only be utilized by admins via /wp-admin.
What's the best way to implement so that resources aren't being wasted. ...