What is `wp_create_nonce()` and what should always accompany its verification?

WordPress Expert Easy

WordPress Expert — Easy

What is `wp_create_nonce()` and what should always accompany its verification?

Key points

  • `wp_create_nonce()` prevents Cross-Site Request Forgery attacks
  • Verification requires `wp_verify_nonce()` or `check_admin_referer()`
  • Always include a capability check for added security

Ready to go further?

Related questions