EvanAgee / vuejs-wordpress-theme-starter

A WordPress theme with the guts ripped out and replaced with Vue.
https://vuewp.com/
1.6k stars 282 forks source link

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

Open simplenotezy opened 4 years ago

simplenotezy commented 4 years ago

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.

EvanAgee commented 4 years ago

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

simplenotezy commented 4 years ago

Hmmm.. Not for me? image