Where are you calling wp_applugin_options_process()
?
If you call it, and $_POST["excludeid"]
isn’t set, then you’re effectively calling:
update_option("wp_applugin_excludeids", null );
So if you’re calling this function on every page load, or even just when your admin page is loaded, then you’re automatically deleting your option. You should put a check in your function to make sure that the variable is set before doing anything with it:
function wp_applugin_options_process() {
if(!isset($_POST["excludeid"])) return;
$arr = $_POST["excludeid"];
$excludeid = implode(" ",$arr);
$excludeid = esc_html( $excludeid);
update_option("wp_applugin_excludeids", $excludeid );
}
Related Posts:
- clean wp_options table unused rows
- Remove obsolete plugins artifacts from database tables
- Default Plugin Settings Not Writing to Database
- Where does WordPress store plugin (enabled/disabled) status for multisite?
- How to remove traces from widget during uninstallation
- wp_editor content in plugin options page
- Gathering and logging data from a plugin: how to do it without race conditions?
- Updating options into the wp database performance
- How to add a custom form to a plugin’s setting page
- Enable plugins that are “not supported”
- database – multiple wordpress installations using same database – can they share plugin settings?
- Is saving multiple options or saving multiple items in one option better?
- How to find an option in the database?
- Is it bad practice to create own table for a plugin?
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- What are these entries in the database? Looks similar to JSON
- How to properly insert data into custom table via plugin
- How does WordPress handle MySQL row lock errors?
- Inherit plugin settings to new site in Multisite
- How to empty wordpress custom post Database table
- insert data in database table from plugin with WP3.1
- How to tell if plugin has been network activated
- $wpdb->get_results leaking memory
- Is it a bad practice to go directly to the mysql database while developing a plugin?
- How to create a Page alias in WordPress
- Custom database table for plugin not creating on activation
- Some Plugin Settings Are Kept After Removal and Reinstall of the Plugin
- While Using Static Pages, How Can I Get /blog into the URL of Each Post?
- Should I global $wpdb outside of any of my plugin’s functions scope?
- Get all options saved by another plugin
- Is it ok to call get_option without hooks?
- Enable/Disable WP options programmatically
- Settings API – input always updates over validation
- How to edit/delete single row items in a table on my own menu page
- Is there a reliable way to keep track of how long a WordPress theme has been active?
- Restore a Plugin’s Default Settings
- greatest() function returns undefined property
- Unable to create new database table upon plugin activation using dbDelta
- Serialize data for wp options
- Why slash is removed after domain?
- How to add a default value to get_option if it’s used as a variable?
- Plugin Options Not Saving to Database in WP 4.5
- Doubt using $wpbd->get_col for a single column
- Get plugin option in another PHP file
- Access WordPress database outside of WordPress
- WordPress Settings Lost After Site Migration
- import posts with dutch/special letters
- options creation for plugins
- “Master” WordPress Multisite – Database Sync
- Better ads plugin has 500.000 entries in wp_postmeta
- How to create multiple database tables on plugin activation?
- get_option error plugin development
- Does deleting a Plugin via the WordPress admin ‘completely’ remove the code?
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- WordPress error: Options page Setting_ not found in the allowed options list
- Allowed memory size exhausted problem
- Saving widget options from class method
- Best/Correct way to add an option to a category
- OceanWP settings are missing from Add New Post [closed]
- DB Query not working in Plugin
- Plugin scheduled event not working
- Where do plugin variables live in the db?
- How to make a textarea accept javascript in my settings apge?
- Plugin: connect to external database without showing password
- How do you add a settings page to another menu?
- Storing Form data in a different database
- More than one WordPress site using the same database – how to disable plugin for one site?
- How to make sure settings are not lost when plugin is updated?
- how to show new field if option selected?
- What database state changes happen after a post is manually “updated” with no changes?
- Can i stream data to a custom_post_type?
- How do I add a medium to the WordPress database with my own plugin?
- Changing the CSS with a plugin
- Get Shortcode output to database for static post_content
- My wp database has been hacked
- How to update a database entry with a wordpress plugin?
- Optimized PHP & WordPress settings for speed/performance?
- How can I store user preferences in WordPress and retreive them later?
- one admin for 2 wordpress websites
- Why is the WordPress update_option not working in this code?
- My plugin can’t see my files
- WordPress update plugin through Dashboard/Plugins displaying error
- Need help for creating custom table on wordpress
- Show a table from data submitted by a form from a user
- Option page not updating multiple records in settings api
- get_option returning old value for non-admin users
- Validating values using Settings API?
- how to protect wordpress website
- homepage olderposts link showing page not found
- Insert data in custom table during new post creation
- WP e-commerce sales-view
- My first plugin doesn’t save the data in options
- Managing database tables in WordPress multisite
- How to submit the custom form data in database in WordPress without plugin?
- Duplicator live to wamp https to http
- Is it possible to recover Deleted users?
- User register hook can’t access form request
- How to access values from your own settings page in javascript?
- Does anyone recognize these table names?
- Edit a page/post DB data?