This is a list of features that our WP Plugin can contain. Bear in mind that these are for the WP.org REST API and don’t include the WP.com REST API.
Features for the REST API
HTML Purifier
When applied, it uses HTML Purifier in the content
to sanitize the HTML so html2react
receives proper HTML.
Include/Exclude Fields
When exclude is applied, it blacklists those fields in the API response. When include is applied it whitelists those fields (and excludes the others).
Content Attachment Ids
When applied, it searches for the Ids of the attachments found in content
and adds a data-attachment-id
to the <img>
tag. It also adds a content_media
field and those attachments to _embedded
.
URL Discovery Endpoint
This endpoint accepts a URL and returns the proper content, no matter if it’s a single cp or taxonomy or a list of cpts or taxonomies.
Expose Custom Fields
When applied the selected custom field is exposed in the API response.
Text (or decoded) Fields
When applied it adds text fields (decoded and no HTML tags) for the title and the excerpt.
Lastest
When applied, latest becomes just like another taxonomy in the API. Latest means the latest posts of certain cpt.
Fix Forbidden Media Errors
When applied it detaches any attachment found without permissions so it can be shown in the REST API.
Preview Draft Posts
When applied it includes posts with draft status in the API response.
General WordPress Info Endpoint
This endpoint returns some useful WordPress info like:
{
locale: "en_US",
timezone: "",
gmt_offset: 0,
per_page: 10,
}