Allow users to manage some options without granting ‘manage_options’ capability
Allow users to manage some options without granting ‘manage_options’ capability
Allow users to manage some options without granting ‘manage_options’ capability
The $option_group parameter of register_setting should match the $option_group parameter of settings_fields, which is typically used as part of creating a custom settings page. When you use register settings with register_setting(), your registered settings are added to a global variable of allowed options, where they are grouped by the $option_group parameter. When you submit your … Read more
You can use update_user_option to update user options. Read more here: https://developer.wordpress.org/reference/functions/update_user_option/
What setting can I change as my email forms don’t work with some phones or ESIMs?
First you need to catch the input then you can save it from $_POST So i assume your input fields names are myplugin_id , myplugin_api_key and myplugin_checkbox what you are currently doing is just going to replace the option with myplugin_checkbox You can try function register_myplugin_settings() { if ( isset( $_POST[‘myplugin_id’] ) && ! empty( … 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
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
I seen lot of Templates using custom theme panels. Giving you separate page into your theme settings will make it easy to find the all the customizations inside one page. Therefore I will go for a custom panel.
I don’t see any get_option() function on line 9 or anywhere else in your code. After quick googling, my guess would be that your problem is the same as this question on stackoverflow EDIT As @Ray proposed at the linked question, paste this in your code to check if wp-includes/option.php is included: $includedStuff = get_included_files(); … Read more
In anybody needs this in the future I found a quick and easy workaround: you could just adjust the slider interval in the shortcode. First you have to switch to the “classic mode” (turn the Visual Composer off) and then find the shortcode that defines the interval: [vc_gallery interval=”10″ images=”22390,23006″ img_size=”full”] You can then set … Read more