vuejs-wordpress-theme-starter icon indicating copy to clipboard operation
vuejs-wordpress-theme-starter copied to clipboard

How/where does `window.WordPress.csrfToken` gets set?

Open simplenotezy opened this issue 5 years ago • 2 comments

I noticed that bootstrap.js gets the CSRF token like this:

window.WordPress.csrfToken

But upon initial review of the code, I don't seem to find where this is set.

simplenotezy avatar Feb 06 '20 11:02 simplenotezy

@simplenotezy this is defined by WordPress on the window object.

EvanAgee avatar Feb 06 '20 13:02 EvanAgee

Hmmm.. Not for me? image

simplenotezy avatar Feb 06 '20 14:02 simplenotezy