WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#36250 closed defect (bug) (duplicate)

/wp-json/ using home_url instead of siteurl?

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

Description

Hi there,

The domain.com/wp-json/ gives an baseurl back. But it seems like its using the home_url instead of siteurl which results in domain.com/wp/ 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
3 years ago

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

#2 @ocean90
3 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
3 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
3 years ago

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