Incorrect wp-json.php URL when in sub-directory
|Reported by:||nikolov.tmw||Owned by:||rmccue|
|Milestone:||2013 Final (1.0)||Priority:||normal|
|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.