JSON-based REST API for WordPress, developed as part of GSoC 2013.
The response handler object is now passed into the endpoint objects via the constructor, allowing you to avoid excess global state where possible. It's recommended to use this where possible rather than the global object.
(props @rmccue, #2)
Fix undefined variables and indices (props @pippinsplugins, #5)
Correct call to deactivation hook (props @ericpedia, #9)
Check metadata access correctly rather than always hiding for users without
(props @kokarn, #10)
Return all term metadata, rather than just the last one (props @afurculita, #13)
Access post metadata from cache where possible - Note, this is a backwards compatibility break, as the format of the metadata has changed. This may change again in the near future, so don't rely on it until 1.0. (props @afurculita, #14)
Add term_link to prepare_term (props @afurculita, #15)
/pages references in
(props @thenbrent, #26)
Sanitize headers for newlines (props @kokarn, #7)
Register rewrite rules during plugin activation (props @pippinsplugins, #17)
WP_JSON_CustomPostTypeand get free hooking for common actions. This removes most of the boilerplate that you needed to write for new CPT-based routes and endpoints (#380)
/posts/types/post/taxonomies/categoryfor example), but the intention is to future-proof them as much as possible(#275)
Separate the post-related endpoints - Post-related endpoints are now located
WP_JSON_Posts class. When implementing custom post type support,
it's recommended to subclass this.
The various types are now also only registered via hooks, rather than directly in the server class, which should make it easier to override them as well (#348)
X-WP-TotalPagesheaders for information on post/pagination counts (#266)
json_routebefore using it (#336)
plugin.php- This allows using both outside of the API itself (#343)
getPost(0)now returns an error rather than the latest post (#344)
json_dispatch_argsfilter for input as well as the
json_serve_requestfilter for output to serve up alternative formats (e.g. MsgPack, XML (if you're insane))
profilelink in the index, to indicate the JSON Schema that the API conforms to. In the future, this will be versioned.
pageargument without messing with WP Query syntax (#266)
If-Unmodified-Sinceheader. Pass this in to avoid conflicting edits (#294)
*_rawkey, which is only available to users with
Requires: 3.5 or higher
Compatible up to: 3.7.1
Last Updated: 2013-12-2
2 of 10 support threads in the last two months have been resolved.
Got something to say? Need help?