Nonce best practices: hidden input vs. wp_localize_script?

Depends, will the form work with AJAX turned off?

If so use an input and degrade gracefully.

Otherwise, define nonces used by JS using JS for consistency, and to prevent grabbing stuff from the DOM

Leave a Comment

techhipbettruvabetnorabahisbahis forumueduseduedueduedusedueduseduedusedus