Nonce failing on form submission
Okay, not sure what was wrong with my original code, but this post put me on the right path. To generate the nonce, use: wp_nonce_field( plugin_basename( __FILE__ ), ‘my_reset_nonce’,true,false); To verify, use: if ( ! isset( $_POST[‘my_reset_nonce’] ) || ! wp_verify_nonce( ( $_POST[‘my_reset_nonce’] ), plugin_basename( __FILE__ ) ) ) { die; } else { // … Read more