-
Notifications
You must be signed in to change notification settings - Fork 1
REST API opt in queries
Frontity WP plugin adds the next queries to the REST API:
-
htmlPurifier=true
Activates the Html Purifier. Not implemented yet.
-
purgeHtmlPurifierCache=true
Purges the internal cache of the Html Purifier. Not implemented yet.
-
disableHtmlPurifierCache=true
Disables the internal cache of the Html Purifier. Not implemented yet.
-
htmlPurifierAllowedAttributes=tag:attr1,tag:attr2...
Doesn't remove those attributes from the content html. Use first the tag followed by a colon and the atribute:
tag:attribute
. For example,div:data-title
oriframe:frameborder
. Not implemented yet. -
htmlPurifierAllowedEmptyTags=tag1,tag2...
Doesn't remove those tags from the content html if they come empty. Not implemented yet.
-
contentMedia=true
-
Extracts ids from the content images and add
data-attachment-id
. -
Adds a
content_media
array with those ids. -
Adds a new endpoint to
/wp/v2/media
in_links
to retrieve all those images when using_embed=true
.Not implemented yet.
-
-
dataAttachmentIdSources=true
Adds
data-attachment-id-source
attributes to the html. Not implemented yet. -
disableContentMediaWpQuery=true
Disables the last resort when looking for image ids, which is using a
WP Query
. Not implemented yet. -
purgeContentMediaTransients=true
Purges the WP transients created each time a
WP Query
is made to look for an image id. Not implemented yet. -
disableContentMediaTransients=true
Disables the use of WP transients each time a
WP Query
is made to look for an image id. Not implemented yet.
-
fields=field1,field2...
If present, the API only includes those fields in the response. Similar to the field
fields
of the WP.com REST API or the plugin REST API – Filter Fields. Not implemented yet. -
excludeFields=field1,field2...
If present, the API excludes those fields from the response. Not implemented yet.
-
titleText=true
Includes a
title.text
field which is both decoded and doesn't have html tags. Not implemented yet. -
excerptText=true
Includes a
excerpt.text
field which is both decoded and doesn't have html tags. Not implemented yet.
-
latest=true
-
Adds a
latest
array, similar to other taxonomies. -
Adds a new endpoint to
/wp/v2/latest
in_links
to retrieve that taxonomy when using_embed=true
.Not implemented yet.
-
-
fixForbiddenMedia=true
If present, the plugin detach those media images requested that belong to unpublished posts, in order to
avoid a
rest_forbidden
error.