Class CMB2_REST_Controller_Boxes
CMB2 objects/boxes endpoint for WordPres REST API. Allows access to boxes configuration data.
- WP_REST_Controller
- CMB2_REST_Controller
- CMB2_REST_Controller_Boxes
Direct known subclasses
Category: WordPress_Plugin
License: GPL-2.0+
Author: CMB2 team
Since: 2.2.3
Link: https://cmb2.io
Todo: Add better documentation.
Todo: Research proper schema.
Located at includes/rest-api/CMB2_REST_Controller_Boxes.php
Methods summary
public
|
|
public
|
|
public
WP_Error|boolean
|
#
get_items_permissions_check( WP_REST_Request $request )
Check if a given request has access to get boxes. |
public
WP_Error|WP_REST_Response
|
|
public
WP_Error|boolean
|
#
get_item_permissions_check( WP_REST_Request $request )
Check if a given request has access to a box. By default, no special permissions needed, but filtering return value. |
public
WP_Error|boolean
|
#
get_item_permissions_check_filter( boolean $can_access = true )
Check by filter if a given request has access to a box. By default, no special permissions needed, but filtering return value. |
public
WP_Error|WP_REST_Response
|
|
public
array
|
|
protected
array
|
Methods inherited from CMB2_REST_Controller
get_cb_results()
,
get_intial_request_type()
,
get_intial_route()
,
get_item_schema()
,
get_query_string()
,
initiate_request()
,
initiate_rest_box()
,
initiate_rest_edit_box()
,
initiate_rest_read_box()
,
maybe_hook_callback_and_apply_filters()
,
maybe_hook_registered_callback()
,
maybe_unhook_registered_callback()
,
prepare_item()
,
prepare_item_for_response()
Methods inherited from WP_REST_Controller
add_additional_fields_schema()
,
add_additional_fields_to_object()
,
create_item()
,
create_item_permissions_check()
,
delete_item()
,
delete_item_permissions_check()
,
filter_response_by_context()
,
get_additional_fields()
,
get_collection_params()
,
get_context_param()
,
get_endpoint_args_for_item_schema()
,
get_object_type()
,
get_post()
,
get_public_item_schema()
,
prepare_item_for_database()
,
prepare_response_for_collection()
,
update_additional_fields_for_object()
,
update_item()
,
update_item_permissions_check()
Properties summary
protected
string
|
$rest_base
The base of this controller's route. |
#
'boxes'
|
protected
string
|
$namespace_base
The combined $namespace and $rest_base for these routes. |
#
''
|
Properties inherited from CMB2_REST_Controller
$field
,
$namespace
,
$object_id
,
$object_type
,
$request
,
$request_type
,
$rest_box
,
$route
,
$server