Skip to content

Instantly share code, notes, and snippets.

@vanaf1979
Last active January 3, 2020 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanaf1979/99ec5bfd84f4bb7c6ca31208abbc5595 to your computer and use it in GitHub Desktop.
Save vanaf1979/99ec5bfd84f4bb7c6ca31208abbc5595 to your computer and use it in GitHub Desktop.
Add a action to enqueue stylesGist for my "WorpdPress: Css Styles and Javascripts in theme development (In depth)" article: https://since1979.dev/wordpress-css-styles-and-javascripts-in-theme-development-in-depth/
<script type='text/javascript'>
/* <![CDATA[ */
var object_name = {"some_string":"Some string to translate","themepath":"http:\/\/example.com\/wp-content\/themes\/themename"};
/* ]]> */
</script>
<script id='my-theme-scripts' async defer src='http://example.com/wp-content/themes/themename/public/js/app.js?ver=1.0.0'></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment