You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update README for 4.7, re-point links to reference developer.w.org
Fixes#293
The documentation in the README (and therefore the node-wpapi.wp-api.org
site) is out-of-date: it points to the legacy wp-api.org instead of
the new developer.wordpress.org/rest-api handbook, and it references
plugin-era methods instead of the new, standardized core methods for
cookie authentication.
Props @bkirby989 for reporting this discrepancy.
It is also possible to leverage the [capability discovery](http://v2.wp-api.org/guide/discovery/) features of the API to automatically detect and add setter methods for your custom routes, or routes added by plugins.
107
+
It is also possible to leverage the [capability discovery](https://developer.wordpress.org/rest-api/using-the-rest-api/discovery/) features of the API to automatically detect and add setter methods for your custom routes, or routes added by plugins.
108
108
109
109
To utilize the auto-discovery functionality, call `WPAPI.discover()` with a URL within a WordPress REST API-enabled site:
110
110
@@ -200,7 +200,7 @@ wp.posts().create({
200
200
})
201
201
```
202
202
203
-
This will work in the same manner for resources other than `post`: you can see the list of required data parameters for each resource on the [WP REST API Documentation Website](http://v2.wp-api.org/reference/).
203
+
This will work in the same manner for resources other than `post`: you can see the list of required data parameters for each resource on the [WP REST API Documentation Website](https://developer.wordpress.org/rest-api/reference/).
This will work in the same manner for resources other than `post`: you can see the list of required data parameters for each resource on the [WP REST API Documentation Website](http://v2.wp-api.org/reference/).
228
+
This will work in the same manner for resources other than `post`: you can see the list of required data parameters for each resource on the [WP REST API Documentation Website](https://developer.wordpress.org/rest-api/reference/).
The `?filter` query parameter is not natively supported within the WordPress core REST API endpoints, but can be added to your site using a plugin.`filter` is a special query parameter that lets you directly specify many WP_Query arguments, including `tag`, `author_name`, and other [public query vars](https://codex.wordpress.org/WordPress_Query_Vars). Even more parameters are available for use with `filter`if you [authenticate with the API](http://v2.wp-api.org/guide/authentication/).
464
+
The `?filter` query parameter is not natively supported within the WordPress core REST API endpoints, but can be added to your site using the [rest-filter plugin](https://github.com/wp-api/rest-filter).`filter` is a special query parameter that lets you directly specify many WP_Query arguments, including `tag`, `author_name`, and other [public query vars](https://codex.wordpress.org/WordPress_Query_Vars). Even more parameters are available for use with `filter`once you [authenticate with the API](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/).
465
465
466
466
If your environment supports this parameter, other filtering methods will be available if you initialize your site [using auto-discovery](http://wp-api.org/node-wpapi/using-the-client/#auto-discovery), which will auto-detect the availability of `filter`:
467
467
@@ -664,18 +664,18 @@ This will include an `._embedded` object in the response JSON, which contains al
664
664
"_embedded": {
665
665
"author": [ /* ... */ ],
666
666
"replies": [ /* ... */ ],
667
-
"http://v2.wp-api.org/attachment": [ /* ... */ ],
668
-
"http://v2.wp-api.org/term": [
667
+
"wp:attachment": [ /* ... */ ],
668
+
"wp:term": [
669
669
[ {}, {} /* category terms */ ],
670
670
[ {} /* tag terms */ ],
671
671
/* etc... */
672
672
],
673
-
"http://v2.wp-api.org/meta": [ /* ... */ ]
673
+
"wp:meta": [ /* ... */ ]
674
674
}
675
675
}
676
676
```
677
677
678
-
For more on working with embedded data, [check out the WP-API documentation](http://v2.wp-api.org/).
678
+
For more on working with embedded data, [check out the WP-API documentation](https://developer.wordpress.org/rest-api/using-the-rest-api/linking-and-embedding/).
679
679
680
680
## Collection Pagination
681
681
@@ -851,17 +851,17 @@ More robust authentication methods will hopefully be added; we would welcome con
851
851
852
852
### Cookie Authentication
853
853
854
-
When the library is loaded from the frontend of the WordPress site you are querying against, you can utilize the build in [Cookie authentication](http://wp-api.org/guides/authentication.html) supported by WP REST API.
854
+
When the library is loaded from the frontend of the WordPress site you are querying against, you can utilize the build in [Cookie authentication](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/#cookie-authentication) supported by WP REST API.
855
855
856
856
First localize your scripts with an object with root-url and nonce in your theme's `functions.php` or your plugin:
0 commit comments