I used to be to tried create theme choices admin web page (with out settings API)
on this code I might wish to know why wp_verify_nonce return false:
foremost file
<?php
add_action('admin_menu', 'awesome_page_create');
perform awesome_page_create() {
$page_title = 'My Superior Admin Web page';
$menu_title = 'Superior Admin Web page';
$functionality = 'edit_posts';
$menu_slug = 'awesome_page';
$perform = 'my_awesome_page_display';
$icon_url = '';
$place = 24;
add_menu_page( $page_title, $menu_title, $functionality, $menu_slug, $perform, $icon_url, $place );
}
perform my_awesome_page_display() {
if (!current_user_can('manage_options')) {
wp_die('Unauthorized consumer');
}
if (! wp_verify_nonce( '_wp_nonce', 'wpshout_option_page_example_action' )) {
wp_die('Nonce verification failed');
}
if (isset($_POST['awesome_text'])) {
update_option('awesome_text', $_POST['awesome_text']);
$worth = $_POST['awesome_text'];
}
$worth = get_option('awesome_text', 'hey-ho');
embody 'form-file.php';
}
$worth = get_option('awesome_text');
if (FALSE === $worth) {
$worth = 'hey-ho';
}
form-file
<h1>My Superior Settings Web page</h1>
<kind methodology="POST">
<label for="awesome_text">Superior Textual content</label>
<enter kind="textual content" title="awesome_text" id="awesome_text" worth="<?php echo $worth; ?>" />
<?php echo wp_nonce_field( 'wpshout_option_page_example_action' ); ?>
<enter kind="submit" worth="Save" class="button button-primary button-large" />
</kind>