Go to file
K. Adam White 79bbfd19c9 WP-API JS Client: Interpret Settings resource as a model.
The REST API does not provide a mechanism to distinguish between endpoints representing models and those representing collections, so the Backbone client must make that distinction internally. Previously wp-api.js accounted for `/users/me`, but not for `/settings`. This patch updates the logic so that `/settings` is properly registered as a Backbone model.

When calling `wp.api.init`, additional endpoints can be specified to be models using the `modelEndpoints` argument.

Props @adamsilverstein.
Fixes #41056.


git-svn-id: https://develop.svn.wordpress.org/trunk@41112 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-20 20:25:28 +00:00
src WP-API JS Client: Interpret Settings resource as a model. 2017-07-20 20:25:28 +00:00
tests WP-API JS Client: Interpret Settings resource as a model. 2017-07-20 20:25:28 +00:00
tools/i18n
.editorconfig
.gitignore Build/Test Tools: Facilitate SVN and Git being co-located in the same directory. 2016-12-12 05:11:27 +00:00
.jshintrc Build/Test Tools: After [29858], update `.jsintrc` to use spaces, not tabs. 2017-01-13 04:44:53 +00:00
.travis.yml Build: Switch PHP 5.2 and 5.3 to Travis' Ubuntu `precise` image 2017-07-18 08:24:35 +00:00
Gruntfile.js Update autoprefixer browser support matrix 2017-07-16 01:14:36 +00:00
package.json Emoji: Port the Twemoji regex to PHP. 2017-07-14 05:46:19 +00:00
phpunit.xml.dist Build/Test Tools: Be strict about tests that do not test anything. 2017-04-23 01:24:41 +00:00
wp-cli.yml
wp-config-sample.php
wp-tests-config-sample.php