You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can see the localisation of the script in wpoa_init_frontend_scripts_styles() but the file is empty when it reaches the browser even though the wpoa_cvars JS object is populated. Is this normal for WordPress script 'localisation' ? I thought the file gets populated before it hits the browser. I'm using Chrome devtools
The text was updated successfully, but these errors were encountered:
I never looked into that further. I also don't know if it's supposed to populate the .js script with vars, but from what I have experienced it outputs a dynamic <script> block right after the script itself. Maybe wpoa_cvars can be localized via the wp-oauth.js script instead...I'll try that out later.
As you say, the variable actually gets injected into the page within a <script> block but in this case it is doing that before the file is included. So you may as well inject it into another js file and save an http request. If you need to include it later, you could use the in_footer argument set to true.
Is cvars.js actually used?
I can see the localisation of the script in
wpoa_init_frontend_scripts_styles()
but the file is empty when it reaches the browser even though thewpoa_cvars
JS object is populated. Is this normal for WordPress script 'localisation' ? I thought the file gets populated before it hits the browser. I'm using Chrome devtoolsThe text was updated successfully, but these errors were encountered: