Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [add-options]

A safe way of adding a named option/value pair to the options database table.

0
votes
1answer
29 views

Is there a limit to size of data stored in update_option()?

I've checked out several* questions and WP docs and I have some idea of the answer but am looking for a specific number on the following questions: 1- Is there a limit to the size of data (kb,mb, ect)...
0
votes
1answer
77 views

Button to clear transients

I would like to add a button on the admin page to clear the transients I use. See my code below: <?php // If this file is called directly, abort. defined('ABSPATH') or exit(); /* * Generate the ...
1
vote
1answer
197 views

possible to make sections in theme customizer sortable and saveable at publish button clicked?

We do have kirki(a theme customizer toolkit) sortable field. But i want to apply the same logic on the sections itself instead of creating another section with sortable fields. I'm using options ...
0
votes
0answers
33 views

Protect WordPress option value

I'm working on a plugin and users need to create and store some unencrypted credentials in wp-options. The credentials in question are service keys for google server to server API which is just a json ...
0
votes
3answers
98 views

How can I style my theme admin page?

I made a large-scale research. But there are no anything what I want. I want to style my options page in a static style file. How can I do that? Sources /* *Create A Simple Theme Options Panel *Exit ...
1
vote
2answers
449 views

Extend plugin options page

I had recently installed Post Views Counter plugin, which created an options page under the Wordpress Settings menu. Now, I'd like to extend plugin functionalities by adding few more options. It will ...
1
vote
1answer
816 views

Admin page repeatable fields

I have a submenu page set up and I want to add repeatable fields to it. The submenu page is to add staff holidays (fields will be Start Date, End Date and a multi select to pick the staff members ...
1
vote
2answers
7k views

Passing array in add_option()

I have to create a option page in my custom theme wordpress. here is is a sample of code <?php function bguru_register_settings(){ $default_options=array( 'bguru_logo'=>'http://...
1
vote
3answers
721 views

How to get option values set from all sites within a Multisite setup?

I created a plugin that is used on every site within my Multisite setup. Within this plugin I have an admin setting page that allows each site to set the options according to the sites needs. Each ...
3
votes
2answers
1k views

Editor role cannot save custom theme options

There's a few questions on this site referencing this issue and I've read them and applied the proposed solutions to no avail. I've made a very simple theme options page that appears for the Editor ...
0
votes
1answer
1k views

how can i add_option as array from a form with just a text input

I have the following function: function si_ad_call_models(){ // title of the page echo '<h2>Add new ad call model</h2>'; ?> <form action="" method="post"> ...
0
votes
2answers
82 views

meta fields for the whole wordpress site

Is there a simple way to store additional information related to the whole website in a meta field? For users, comments or posts, I learned how to use meta fields to store their additional related ...
0
votes
1answer
115 views

Can I use add_option for a plugin categories and how?

So I am creating my first plugin for positioning ads around my site. I created one separate table where I store ads with all their options, such as position, expire date, active, name, type etc... But ...
-1
votes
1answer
56 views

illegal offset in option add

I downloaded a plugin to dissect that I could use to learn the settings api with. It's a simple background uploader and as you can see fairly straight forward. When trying to recreate it however using ...
0
votes
2answers
167 views

update_option using variable name

Title may not be clear but I'm using update_option($my_option, $new_order); and for some reason it would not work but if instead I change to update_option('my-option-name' $new_order); it works. I ...
-1
votes
1answer
224 views

Modify a Themes Appearance >> Header admin screen from a plugin

I have been attempting to build a plugin(my very first) that adds some functionality for use with the Custom Header admin screen. I would like to have my plugin add an anchor link to the Appearance >>...
0
votes
1answer
3k views

Save Option on Database

Sorry for the question but can you help me? I have this form in a widget: <form> <fieldset> <legend>Counter Position:</legend> </br> <p> Right <...
25
votes
3answers
4k 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?
8
votes
1answer
7k views

Add update notification bubble to admin menu item?

I have re-worded this to make more sense. Ok, I have a plugin that uses a remote service that check for updates, much like default WordPress plugins, in this case it just checks an XML file. I want ...