New answers tagged


This is just a typo Wrong //wvdh-startpoint add_submenu_page( 'wvdh-startpoint', 'page-from-plugin', 'menu-from-plugin', 'manage_options', 'plugin-slug', 'wvdh_settings_page' ); Correct //wdvh-startpoint add_submenu_page( 'wdvh-startpoint', 'page-from-plugin', 'menu-from-plugin', 'manage_options', 'plugin-slug', 'wvdh_settings_page' );


I found the problem. You need to escape the values in the _render functions, using esc_attr, like this: function my_setting_render() { $options = get_option('my_option_name'); ?><input name='my_option_name[my_setting]' value="<?php echo esc_attr($options['my_setting']);?>"> <?php }


Very simply put it puts some hidden fields into the form on an option page. Those hidden fields are then used to check if the request made to the browser are valid. For some more in dept information you could read the Codex about WP Nonces

Top 50 recent answers are included