Posted on August 23, 2014
$script_source = get_stylesheet_directory_uri() . '/js/my-script.js'; // enqueue wp_enqueue_script( 'my-script-for-wp', $script_source, array( 'jquery' ) ); // 'localize' our data. Just means add it to the dom as a JS variable wp_localize_script( 'my-script-for-wp', 'devEnvironment', get_dev_enviroment() );
Recent Comments