Commit Graph

2 Commits

Author SHA1 Message Date
Adam Silverstein
b76da1fdf3 REST API: Handle api-request query parameters with plain permalinks.
When constructing the request URL, ensure that  `?` is replaced with `&` when the API root  already contains a `?`. Fixes an issue where requests were broken when sites had permalinks set to plain.

Props aduth.
Fixes #42382.


Built from https://develop.svn.wordpress.org/trunk@42965


git-svn-id: http://core.svn.wordpress.org/trunk@42794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-09 13:10:31 +00:00
James Nylen
c91b130b53 REST API: Allow overriding jQuery.ajax calls from within wp-admin
There are now 3 places where we call out to the REST API from within wp-admin.  This commit introduces a small library to allow overriding these calls, centralize nonce-passing logic, and eliminate the need to pass a full REST URL down to client code (this last feature is not yet used and will be explored in a separate ticket).

Fixes #40919.

Built from https://develop.svn.wordpress.org/trunk@41206


git-svn-id: http://core.svn.wordpress.org/trunk@41046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 16:45:44 +00:00