Skip to content

Commit

Permalink
Merge pull request #3778 from donnapep/update/withAPIData-all-root-na…
Browse files Browse the repository at this point in the history
…mespace

Components: withAPIData: Don't restrict endpoints to /wp/v2
  • Loading branch information
aduth authored Dec 3, 2017
2 parents 88af5a9 + b55b078 commit 499b320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ function gutenberg_extend_wp_api_backbone_client() {
wp_add_inline_script( 'wp-api', $script );

// Localize the wp-api settings and schema.
$schema_response = rest_do_request( new WP_REST_Request( 'GET', '/wp/v2' ) );
$schema_response = rest_do_request( new WP_REST_Request( 'GET', '/' ) );
if ( ! $schema_response->is_error() ) {
wp_add_inline_script( 'wp-api', sprintf(
'wpApiSettings.cacheSchema = true; wpApiSettings.schema = %s;',
Expand Down

0 comments on commit 499b320

Please sign in to comment.