Skip to content

Commit

Permalink
Register the correct URL for the JS library
Browse files Browse the repository at this point in the history
Fixes WP-API#376

git-svn-id: http://gsoc.svn.wordpress.org/2013/rmccue/trunk@2343 f69abe3c-2ee2-4550-9a6d-17bd458115be
  • Loading branch information
rmccue committed Sep 21, 2013
1 parent 043946a commit e2498aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function json_api_deactivation() {
* Register our API Javascript helpers
*/
function json_register_scripts() {
wp_register_script( 'wp-api', plugins_url( dirname( __FILE__ ) . '/wp-api.js' ), array( 'jquery', 'backbone', 'underscore' ), '0.5', true );
wp_register_script( 'wp-api', plugins_url( '/wp-api.js', __FILE__ ), array( 'jquery', 'backbone', 'underscore' ), '0.5', true );
wp_localize_script( 'wp-api', 'wpApiOptions', array( 'base' => json_url() ) );
}
add_action( 'wp_enqueue_scripts', 'json_register_scripts', -100 );
Expand Down

0 comments on commit e2498aa

Please sign in to comment.