Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#36250 closed defect (bug) (duplicate)

/wp-json/ using home_url instead of siteurl?

Reported by: compute's profile Compute Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: REST API Keywords:
Focuses: Cc:


Hi there,

The gives an baseurl back. But it seems like its using the home_url instead of siteurl which results in if you have WP installed in a subdirectory. An URL that will just result in a 404.

Is there a reason why its not just using siteurl?

Change History (4)

#1 @Compute
8 years ago

  • Summary changed from WP Rest API: home_url instead of siteurl? to /wp-json/ using home_url instead of siteurl?

#2 @ocean90
8 years ago

  • Keywords reporter-feedback added

Do you really mean home_url here? It's actually using the the value of get_option( 'siteurl' ) but will probably be changed to home_url instead, see #35647.

#3 @Compute
8 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

I think that the 'url' key should be home_url() instead of get_option( 'siteurl' ). But it seems like this is really a duplicate of #35647 so closing this.

#4 @ocean90
8 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.