Tag Info

New answers tagged

0

You will have to create a settings page on which you will have to register your settings. Unfortunately this is no easy task, but it has been very well documented on tutsplus. Once you have implemented the settings api, you can check for the options that have been set with your settings page. Depending on the values of the options that have been specified, ...


0

You can't. If you're using the settings API correctly, here's what happens when you try to save your options: Form posts to options.php WordPress handles $_POST and runs update_option on your registered settings Your sanitize callback from register_setting is applied Any data that fails/you don't return in your callback isn't saved WordPress redirects ...


0

What works for me for just css styling or js scripts is using admin_enqueue_scripts: function my_plugin_enqueue($hook) { if ( 'settings_page_my-plugin/my-plugin' != $hook ) { return; } wp_register_style( 'my_plugin_admin_css', plugin_dir_url( __FILE__ ) . 'css/my_style_admin.css', false, '1.0.0' ); wp_enqueue_style( ...


0

Given that "I just want to fix my own post types to be up to date with 4.2+", you need to register your settings with register_setting() The warning you are seeing is generated in wp-admin/options.php: 180 if ( $options ) { 181 foreach ( $options as $option ) { 182 if ( $unregistered ) 183 ...



Top 50 recent answers are included