When to store store plugin options as a single database record?
If you are looking for performance and have 20 options so yes it is better to store in 1 option key in serialize() manner.
If you are looking for performance and have 20 options so yes it is better to store in 1 option key in serialize() manner.
You seem to be creating a recursive loop. In stm_addmenu_auto_delete_event(), you register an admin page via add_menu_page() that has a callback of auto_delete_settings_callback: function stm_addmenu_auto_delete_event() { add_menu_page( ‘Automatic deletion’, ‘Automatic <br/> deletion’, ‘manage_options’, ‘manage-auto-delete-page’, ‘auto_delete_settings_callback’, In new_settings_auto_delete you register a settings field with a callback of auto_delete_settings_callback: function new_settings_auto_delete() { // … add_settings_field( ‘default_auto_delete_field’, ‘By … Read more
Following the history on GitHub, it appears that this behaviour has existed since wp_load_alloptions() was introduced, 17 years ago. It was added as part of code that was introduced to address this ticket, and seems to be intended to fix issues related to object caching. The full explanation for the entire change is given as: … Read more
Multiple plugins settings of same developer into ONE settings page linked together
Is it possible to dynamically change the “page_for_posts” option?
WP-Rocket was deactivated, but the wp-content/object-cache.php file was still present. This file redefined the wp_cache_add in such a way that the method didn’t work, so all requests to get a single option value were resulting in a query to the wp_options table. I deleted the wp-content/object-cache.php file and the page response time dropped to 2 … Read more
move setting data from wordpress api to codestar freamwork
Excuse me if I’m misunderstanding you, but aren’t the functions add_site_option(), update_site_option() and get_site_option() pretty much, they fall back to single site functions, if not used in a multisite environment, only there for the purpose of having network-wide options. Update: Regarding your need to change a single site option for all sites in your network. … Read more
wp_options Table keeps growing
It sounds like you’re looking for: if ( ! is_home() && ! is_front_page() ) { // the stuff you don’t want to show on the front/home page } where we use that ! ( A || B ) = ! A && ! B. But it also depends where in the theme you are using … Read more