Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Clarify usage for plugins #45

Merged
merged 1 commit into from Dec 14, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/guides/extending.md
Expand Up @@ -290,6 +290,11 @@ hooking and more for you:
(Note that this CPT base class handles other things as well, including strict
post type checking and correcting URLs.)

It is important that this class lives in a separate file that is only included
on a WP API hook, as your plugin may load before the WP API plugin. If you get
errors about the `WP_JSON_CustomPostType` class not being loaded, this is
the reason.

The data passed in and returned by the `json_endpoints` filter should be in the
format of an array containing a map of route regular expression to endpoint
lists. An endpoint list is a potentially unlimited array of endpoints' data.
Expand Down