Manipulate javascript code from custom made admin page menu
Manipulate javascript code from custom made admin page menu
Manipulate javascript code from custom made admin page menu
The plugin does not save data
The 2nd example isn’t a different type of setting, it’s just an array of data that the plugin will probably turn into settings somewhere else in the code. I can’t tell from just this code exactly what type of settings it will use or how it does that. The actual two types of settings are … Read more
I think I understand what you’re trying to accomplish, but correct me if this is off base. You have an array that being specified in another file. You want users to be able to append values to that default array by using an options form. Here’s what I would do: When you’re preparing this array … Read more
Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
Show admin notice on incorrect value on form field
The example in Settings API documentation uses admin_init and admin_menu for registering custom settings and admin pages. https://developer.wordpress.org/plugins/settings/custom-settings-page/ There’s also an old Codex entry on actions typically run on front and back end requests, which can help pick a suitable action hook. https://codex.wordpress.org/Plugin_API/Action_Reference I also highly recommend the excellent old Q&A about instantiating classes in … Read more
At the moment, this is not possible. Just create your own custom settings page and place your options to it. More details and examples: https://blog.templatetoaster.com/wordpress-settings-api-creating-theme-options/
The problem is that you’re not passing the correct database option name: register_setting( ‘wcs_settings_page’, // option group ‘front-page-slogan’, // database option name ); So looking at the get_option() call and the HTML input name in your front_page_slogan_callback(), the correct option name is wcs_settings: register_setting( ‘wcs_settings_page’, // option group ‘wcs_settings’, // database option name ); Check … Read more
How I can Make two input field at add_settings_section