Created
June 13, 2014 19:41
-
-
Save jonathanhudak/94f6520a4a2a2a1e3a76 to your computer and use it in GitHub Desktop.
localize script wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$THEME_DIRECTORY = array( 'path' => get_bloginfo('template_url')); | |
$WP_DIRECTORY = array( 'path' => home_url()); | |
wp_localize_script( 'app', 'site', $WP_DIRECTORY ); | |
wp_localize_script( 'app', 'theme', $THEME_DIRECTORY ); | |
wp_localize_script( 'app', 'posts', $posts_w_meta) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment