Templates
in package
Uses
UtilsProvider
Create REST API for all available service / blocker templates.
Table of Contents
Methods
- getPluginConstantPrefix() : string
- Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
- instance() : mixed
- New instance.
- permission_callback() : mixed
- Check if user is allowed to call this service requests.
- permission_callback_customize() : mixed
- Check if user is allowed to call this service requests with `customize` cap.
- rest_api_init() : mixed
- Register endpoints.
- rest_prepare_templates() : mixed
- Modify the response of the cookie / blocker Custom Post Type.
- routeBannerTemplates() : mixed
- See API docs.
- routeTemplatesGet() : mixed
- See API docs.
- routeTemplatesGetSingle() : mixed
- See API docs.
- __construct() : mixed
- C'tor.
Methods
getPluginConstantPrefix()
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
public
getPluginConstantPrefix() : string
Tags
Return values
stringinstance()
New instance.
public
static instance() : mixed
permission_callback()
Check if user is allowed to call this service requests.
public
permission_callback() : mixed
permission_callback_customize()
Check if user is allowed to call this service requests with `customize` cap.
public
permission_callback_customize() : mixed
rest_api_init()
Register endpoints.
public
rest_api_init() : mixed
rest_prepare_templates()
Modify the response of the cookie / blocker Custom Post Type.
public
rest_prepare_templates(WP_REST_Response $response, WP_Post $post) : mixed
Parameters
- $response : WP_REST_Response
-
The response object.
- $post : WP_Post
-
Post object.
routeBannerTemplates()
See API docs.
public
routeBannerTemplates() : mixed
APIYes
Tags
routeTemplatesGet()
See API docs.
public
routeTemplatesGet(WP_REST_Request $request) : mixed
APIYes
Parameters
- $request : WP_REST_Request
Tags
routeTemplatesGetSingle()
See API docs.
public
routeTemplatesGetSingle(WP_REST_Request $request) : mixed
APIYes
Parameters
- $request : WP_REST_Request
Tags
__construct()
C'tor.
private
__construct() : mixed