Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use a function to inset post at front_end. There are 3 different types of actions may trigger this function. So, in this function, should I write 3 verify_nonce?

share|improve this question
add comment

1 Answer

Nonce generated is product of:

  • user ID
  • time
  • $action argument

The action is important part and needs to precisely describe what kind of event you are verifying. So if your actions are create something and delete something, your nonces should be generated for example like my_prefix_create and my_prefix_delete and verified accordingly.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.