The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
12 views

Updating options into the wp database performance

I have a question about the performance of my plugin. On the settings page of my plugin I have about 20 options the user can change (checkboxes, dropdown and normal text inputs). Currently I just ...
0
votes
0answers
20 views

Category custom fields - checkbox not updating

/* ** Category custom fields */ add_action ( 'edit_category_form_fields', 'extra_category_fields'); function extra_category_fields($tag) { $t_id = $tag->term_id; $cat_meta = ...
0
votes
1answer
25 views

Changing plugin options from theme functions file?

I am making a starting-point Wordpress theme that will be used on dev projects. In this theme, I am automating common plugin installs that are used on every project. I have been able to automate ...
0
votes
1answer
35 views

Using update_option() and get_option() is echoing escaped strings

I'm using the Option API for my theme settings page. I use the $_POST data to update the options when the changes are saved. My issue is that the strings I send get escaped and when I use this code: ...
0
votes
1answer
51 views

Theme settings Page: Settings Api vs Update_Options

I’m a new WordPress developer trying to start a carrier selling Premium Themes. In the last week, I’ve been confronted to many difficulties trying to understand how to create a theme options page. At ...
0
votes
0answers
30 views

Edit a custom admin page

I have created a custom admin menu page with: add_menu_page This page uploads a form to the wp_options table in the database. Basic save with update_option like: function addressbook_save (){ ...
0
votes
1answer
74 views

delete_option() and update_option() returning false

I know that when delete_option() or update_option() fail to perform their respective database interactions, they return false. Does anyone know why they wouldn't be able to perform these actions? ...
1
vote
0answers
35 views

Is there an atomic way to update_option in Wordpress (to ensure data integrity)?

I want to update an option which is an array by adding a new value, but there's no atomicity or guarantee of data integrity. EXAMPLE //Get the option value (an array) $val = get_option( ...
0
votes
0answers
38 views

Excessive memory used by update_option()

I'm a newer WP developer trying to wrap his head around how to store information in the options table to support a plugin that I am writing. Unfortunately, trying to UPDATE the options table is making ...
0
votes
0answers
18 views

Save automatically data to user profile once or twice a day [duplicate]

The main goal : I am working on a panel which will display statistics of my user websites (external website). For that, I use the Google Analytics API. I save the Google Analytics profile number in a ...
2
votes
1answer
182 views

How do I setup nested repeatable option fields?

I'm trying to wrap my head around how to create a set of option fields that should be able to repeat for as many times as possible. But I'm having a hard time to figure out how to proceed. Currently ...
0
votes
0answers
152 views

update_option() updating the option with an empty value?

I have a call to update_option() inside a class which edits some keys from the options array passed to it and then saves the updated array to the database, I don't have any fancy code, the function is ...
1
vote
1answer
355 views

Save wp_editor() content as option

I'm having some troubles with a extra feature i'm writing for my theme. The admin should be able to make some special posts, those posts are stored as an option. The options are atored as an array ...
0
votes
2answers
68 views

How do I use update_option to give me a new option name each time a form is submitted? [duplicate]

How do I use update_option to give me a new option name each time a form is submitted? The code I'm using now overwrites the database value. Instead I need to have a new address saved each time. The ...
0
votes
1answer
214 views

save new data to wp_options non-post form

I have a form on my front-page. It sends the entered address to Google API and returns the JSON to wp_options. That works fine. I am using update_option to do that, so it rewrites the meta_key each ...
1
vote
1answer
148 views

Settings API - how to update multiple options manually?

I'm storing all my options using Settings API: function registerSettings() { register_setting('XX_theme_settings', 'XX_theme_settings', 'setting_validate' ); add_settings_section('theme_options', ...
0
votes
1answer
22 views

How to delete orphan userdata from array in wp-options

I have an option that subscribes members to forum email notifications. The list of emails is in an array as an option value. All is working fine and all subscribing and unsubscribing is done using ...
0
votes
1answer
43 views

Update field in database for users

I have made a frontend form for the admins where they can check a checkbox for each user and submit the form data by post. For all the users that are checked, a value should be changed in a field in ...
2
votes
1answer
216 views

update_option in javascript

So there's function in wordpress to update a named option/value pair to the options database table: <?php update_option( $option, $new_value ); ?>. And what I'm trying to do implement this ...
-1
votes
1answer
156 views

update_option onclick

I'm trying to add a update_option value when I click a text link. I came up with the following code, but I don't know how to make it "clickable", like <?php function ...
0
votes
1answer
58 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 ...
5
votes
1answer
1k views

Adding Widget form fields dynamically

I am trying to add form field to a WordPress widget dynamically. So if the user want to add another date to an event they can click a button to get more fields. The question is: How do save newly ...
1
vote
1answer
1k views

Why isn't get_option array contents displaying?

I've been to countless posts looking for the answer to this and have tried nearly every combination. So obviously, I'm missing a step so small that it's likely unfathomable to the Wordpress ...
0
votes
1answer
42 views

Plugin options page - save two related options as one entry

I created an options page for my plugin where the user can specify image dimensions which will be saved for later use. So far the image dimensions are entered by the user in one input field like ...
0
votes
2answers
92 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 ...
0
votes
1answer
180 views

update_options and unique filenames

I was able to temporarily disable an automatic task of wordpress during a specific file type upload which is nice. For instance, I changed the usual upload path for the pdf uploads by doing this: ...
0
votes
3answers
427 views

Add Option if Not Exists

I need to see if an option, and if does, get the value. If not, I need to add it. The Codex provides: <?php $option_name = 'myhack_extraction_length' ; $new_value = '255' ; if ( get_option( ...
-1
votes
2answers
252 views

How to display update message only to admin

How can I show the update message only to super admin in the network wordpress ? I don't want the other admins/users see the update message that shows the current version. Is there any plugin to do ...
1
vote
0answers
178 views

Multi-select field for Taxonomy can't save the value

I'm trying to create a multi select field for Taxonomy pages, and the problem is in saving all the selected values, for example if I choose couple of elements in the select field and save it, it will ...
0
votes
2answers
227 views

[Multisite]How can I update custom blog option?

I wanted to update custom blog option created thru Settings Api using the function update_blog_option. I created this code. $country_base = get_blog_option($blog_id, 'mytheme_options');//retrieve ...
1
vote
1answer
92 views

Insert/Update values to a table after blogname option etc. is updated

Im trying to update into another table the values blogname, blog description options when the user updated them from General Settings page. I use this code, $hook_array = ...
0
votes
2answers
826 views

update_option is not saving an array, but saving the string 'Array'

I have come across quite an odd problem when using the update_option function, and I am sure that I've tried everything I can think of to get it working, but unfortunately it isn't. I'm using AJAX to ...
2
votes
1answer
3k views

Update Option Stored in Multi-Dimensional Array

I have data in the wp_options table currently stored as a multi-dimensional array (profile_element_order): ...
0
votes
1answer
271 views

Settings API - how to update options manually?

I'm storing all my options using Settings API: function registerSettings() { register_setting('XX_theme_settings', 'XX_theme_settings', 'setting_validate' ); add_settings_section('theme_options', ...