Wordpress/tests/qunit
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
..
fixtures WP-API JS Client: Interpret Settings resource as a model. 2017-07-20 20:25:28 +00:00
vendor Customizer: Add QUnit tests for menus. 2015-08-03 19:27:27 +00:00
wp-admin/js Widgets: Add accessibility mode support for TinyMCE-enhanced Text and Media widgets (Video, Audio, Images). 2017-06-25 18:47:13 +00:00
wp-includes/js WP-API JS Client: Interpret Settings resource as a model. 2017-07-20 20:25:28 +00:00
.jshintrc Various JSHint fixes. see #26446. 2014-02-08 00:51:14 +00:00
index.html Widgets: Use "Add Audio" for button in Audio widget instead of generic "Add File". 2017-05-18 18:33:57 +00:00