Skip to content

Commit 47d628d

Browse files
committed
Use correct URL for root JS URL
1 parent 150d718 commit 47d628d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function json_api_deactivation( $network_wide ) {
202202
function json_register_scripts() {
203203
wp_register_script( 'wp-api', 'http://wp-api.github.io/client-js/build/js/wp-api.js', array( 'jquery', 'backbone', 'underscore' ), '1.1', true );
204204

205-
$settings = array( 'root' => esc_url_raw( home_url( 'wp-json' ) ), 'nonce' => wp_create_nonce( 'wp_json' ) );
205+
$settings = array( 'root' => esc_url_raw( get_json_url() ), 'nonce' => wp_create_nonce( 'wp_json' ) );
206206
wp_localize_script( 'wp-api', 'WP_API_Settings', $settings );
207207
}
208208
add_action( 'wp_enqueue_scripts', 'json_register_scripts', -100 );

0 commit comments

Comments
 (0)