Documentation

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
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

instance()

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
apiHeader

{string} X-WP-Nonce

apiName

Banner

apiGroup

Templates

apiPermission

customize

apiVersion

1.0.0

routeTemplatesGet()

See API docs.

public routeTemplatesGet(WP_REST_Request $request) : mixed
APIYes
Parameters
$request : WP_REST_Request
Tags
apiHeader

{string} X-WP-Nonce

apiParam

{string} [storage=use] Can be 'use' | 'invalidate' | 'redownload'

apiName

Templates

apiGroup

Templates

apiPermission

manage_options

apiVersion

1.0.0

routeTemplatesGetSingle()

See API docs.

public routeTemplatesGetSingle(WP_REST_Request $request) : mixed
APIYes
Parameters
$request : WP_REST_Request
Tags
apiHeader

{string} X-WP-Nonce

apiName

UseTemplate

apiGroup

Templates

apiPermission

manage_options

apiVersion

1.0.0

__construct()

C'tor.

private __construct() : mixed

        
On this page

Search results