How to verify the WP nonce after saving a Post
-
I’m writing a function to do some extra things when I save a post. I’m hooking into the ‘post_updated’ action and following examples like this, I want to check the nonce is correct.
if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename( __FILE__ ) ) ) return;
I’m not sure what to do with that. I’m not writing a plugin – my function is just in my theme’s functions.php – and I guess I just want to check whatever the standard nonce is on the WP Post Create/Update page… how do I use wp_verify_nonce() for that? Thanks.
- The topic ‘How to verify the WP nonce after saving a Post’ is closed to new replies.