Commit Graph

8 Commits

Author SHA1 Message Date
John Blackbourn
f7f5b64a7e Force the REST API URL to use https for its scheme when the current request is served over HTTPS and the host name matches that of the REST API URL.
This allows sites to use an admin area over HTTPS with the front end over HTTP, and not end up with a cross-protocol problem when using the REST API URL in the admin area.

Fixes #34299

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


git-svn-id: http://core.svn.wordpress.org/trunk@35308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 20:38:50 +00:00
Drew Jaynes
6a51505a23 Docs: Improve the return description in the DocBlock for rest_send_allow_header().
Props danielbachhuber.
Fixes #34374.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 13:48:27 +00:00
Sergey Biryukov
116f59af60 REST API: Change nonce name to _wpnonce.
It's shorter and is compatible with the default name in `wp_nonce_field()`.

Props danielbachhuber.
Fixes #34375.
Built from https://develop.svn.wordpress.org/trunk@35323


git-svn-id: http://core.svn.wordpress.org/trunk@35289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 08:14:24 +00:00
Drew Jaynes
a92d4f6fcb Docs: Update the default scheme for get_rest_url() from 'json' to 'rest'.
Also adds 'rest' to the documented list of schemes for `home_url()`, `get_home_url()`, `set_url_scheme()`, and the `home_url` and `set_url_scheme` hooks.

Props rachelbaker.
Fixes #34300.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-19 22:39:25 +00:00
Drew Jaynes
fd9bcf111d Docs: Fix a typo in the $blog_id parameter name in the rest_url filter doc.
Props rachelbaker.
Fixes #34351.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-18 23:12:25 +00:00
Scott Taylor
c756465146 HTTP/REST API: move WP_HTTP_Response to wp-includes/ with the rest (ha!) of the HTTP classes. This is PHP 5.2, so this class is global, and as per @rmccue, unrelated to REST specifically.
See [34930], #33982.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 19:27:28 +00:00
Sergey Biryukov
45bda3af69 REST API: Add some missing documentation.
Props swissspidy.
Fixes #34215.
Built from https://develop.svn.wordpress.org/trunk@34949


git-svn-id: http://core.svn.wordpress.org/trunk@34914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 18:01:25 +00:00
Ryan McCue
94e2352956 REST API: Introduce baby API to the world.
Baby API was born at 2.8KLOC on October 8th at 2:30 UTC. API has lots
of growing to do, so wish it the best of luck.

Thanks to everyone who helped along the way:

Props rmccue, rachelbaker, danielbachhuber, joehoyle, drewapicture,
adamsilverstein, netweb, tlovett1, shelob9, kadamwhite, pento,
westonruter, nikv, tobych, redsweater, alecuf, pollyplummer, hurtige,
bpetty, oso96_2000, ericlewis, wonderboymusic, joshkadis, mordauk,
jdgrimes, johnbillion, jeremyfelt, thiago-negri, jdolan, pkevan,
iseulde, thenbrent, maxcutler, kwight, markoheijnen, phh, natewr,
jjeaton, shprink, mattheu, quasel, jmusal, codebykat, hubdotcom,
tapsboy, QWp6t, pushred, jaredcobb, justinsainton, japh, matrixik,
jorbin, frozzare, codfish, michael-arestad, kellbot, ironpaperweight,
simonlampen, alisspers, eliorivero, davidbhayes, JohnDittmar, dimadin,
traversal, cmmarslender, Toddses, kokarn, welcher, and ericpedia.

Fixes #33982.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 02:31:25 +00:00