Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Commit

Permalink
Merge pull request #730 from tlovett1/feature/merge-js
Browse files Browse the repository at this point in the history
Merge JS into main repo
  • Loading branch information
rachelbaker committed Dec 19, 2014
2 parents 2260922 + 43f66a5 commit ad9688f
Show file tree
Hide file tree
Showing 2 changed files with 988 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.php
Expand Up @@ -238,7 +238,7 @@ function json_api_deactivation( $network_wide ) {
* @see wp_register_scripts()
*/
function json_register_scripts() {
wp_register_script( 'wp-api', 'http://wp-api.github.io/client-js/build/js/wp-api.js', array( 'jquery', 'backbone', 'underscore' ), '1.1', true );
wp_register_script( 'wp-api', esc_url_raw( plugins_url( 'wp-api.js', __FILE__ ) ), array( 'jquery', 'backbone', 'underscore' ), '1.1', true );

$settings = array( 'root' => esc_url_raw( get_json_url() ), 'nonce' => wp_create_nonce( 'wp_json' ) );
wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
Expand Down

0 comments on commit ad9688f

Please sign in to comment.