[wp-gsoc] [Summer of Code] #375: Incorrect wp-json.php URL when in sub-directory
Summer of Code
noreply at wordpress.org
Tue Sep 17 11:47:19 UTC 2013
#375: Incorrect wp-json.php URL when in sub-directory
------------------------------+---------------------------
Reporter: nikolov.tmw | Type: defect
Status: new | Priority: normal
Milestone: 2013 Final (1.0) | Component: JSON REST API
Keywords: |
------------------------------+---------------------------
If you have your WordPress files situated in a sub-directory(let's say
/wordpress/) all of the URL's that come from `get_json_url()` would be
like http://example.com/wordpress/wp-json.php - that's obviously not
correct, since the rewrite rules don't include the "wordpress/" part.
The solution to this is really simple - just switch `get_site_url()` for
`get_home_url()` in `plugin.php#126` - pretty much the same function, but
it returns the URL for the home page of the site, thus making the location
of wp-json.php correct.
PS: I hope that's the correct place for this bug report, even though it's
almost the end of GSoC.
--
Ticket URL: <https://gsoc.trac.wordpress.org/ticket/375>
Summer of Code <https://gsoc.trac.wordpress.org>
My example project
More information about the wp-gsoc
mailing list