[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
REST API: WP_REST_Widgets_Controller class
File Size: | 874 lines (26 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_REST_Widgets_Controller:: (20 methods):
__construct()
register_routes()
get_items_permissions_check()
get_items()
get_item_permissions_check()
check_read_sidebar_permission()
get_item()
create_item_permissions_check()
create_item()
update_item_permissions_check()
update_item()
delete_item_permissions_check()
delete_item()
permissions_check()
retrieve_widgets()
save_widget()
prepare_item_for_response()
prepare_links()
get_collection_params()
get_item_schema()
Class: WP_REST_Widgets_Controller - X-Ref
Core class to access widgets via the REST API.__construct() X-Ref |
Widgets controller constructor. since: 5.8.0 |
register_routes() X-Ref |
Registers the widget routes for the controller. since: 5.8.0 |
get_items_permissions_check( $request ) X-Ref |
Checks if a given request has access to get widgets. param: WP_REST_Request $request Full details about the request. return: true|WP_Error True if the request has read access, WP_Error object otherwise. since: 5.8.0 |
get_items( $request ) X-Ref |
Retrieves a collection of widgets. param: WP_REST_Request $request Full details about the request. return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. since: 5.8.0 |
get_item_permissions_check( $request ) X-Ref |
Checks if a given request has access to get a widget. param: WP_REST_Request $request Full details about the request. return: true|WP_Error True if the request has read access, WP_Error object otherwise. since: 5.8.0 |
check_read_sidebar_permission( $sidebar_id ) X-Ref |
Checks if a sidebar can be read publicly. param: string $sidebar_id The sidebar ID. return: bool Whether the sidebar can be read. since: 5.9.0 |
get_item( $request ) X-Ref |
Gets an individual widget. param: WP_REST_Request $request Full details about the request. return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. since: 5.8.0 |
create_item_permissions_check( $request ) X-Ref |
Checks if a given request has access to create widgets. param: WP_REST_Request $request Full details about the request. return: true|WP_Error True if the request has read access, WP_Error object otherwise. since: 5.8.0 |
create_item( $request ) X-Ref |
Creates a widget. param: WP_REST_Request $request Full details about the request. return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. since: 5.8.0 |
update_item_permissions_check( $request ) X-Ref |
Checks if a given request has access to update widgets. param: WP_REST_Request $request Full details about the request. return: true|WP_Error True if the request has read access, WP_Error object otherwise. since: 5.8.0 |
update_item( $request ) X-Ref |
Updates an existing widget. param: WP_REST_Request $request Full details about the request. return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. since: 5.8.0 |
delete_item_permissions_check( $request ) X-Ref |
Checks if a given request has access to delete widgets. param: WP_REST_Request $request Full details about the request. return: true|WP_Error True if the request has read access, WP_Error object otherwise. since: 5.8.0 |
delete_item( $request ) X-Ref |
Deletes a widget. param: WP_REST_Request $request Full details about the request. return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. since: 5.8.0 |
permissions_check( $request ) X-Ref |
Performs a permissions check for managing widgets. param: WP_REST_Request $request Full details about the request. return: true|WP_Error since: 5.8.0 |
retrieve_widgets() X-Ref |
Looks for "lost" widgets once per request. since: 5.9.0 |
save_widget( $request, $sidebar_id ) X-Ref |
Saves the widget in the request object. param: WP_REST_Request $request Full details about the request. param: string $sidebar_id ID of the sidebar the widget belongs to. return: string|WP_Error The saved widget ID. since: 5.8.0 |
prepare_item_for_response( $item, $request ) X-Ref |
Prepares the widget for the REST response. param: array $item An array containing a widget_id and sidebar_id. param: WP_REST_Request $request Request object. return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. since: 5.8.0 |
prepare_links( $prepared ) X-Ref |
Prepares links for the widget. param: array $prepared Widget. return: array Links for the given widget. since: 5.8.0 |
get_collection_params() X-Ref |
Gets the list of collection params. return: array[] since: 5.8.0 |
get_item_schema() X-Ref |
Retrieves the widget's schema, conforming to JSON Schema. return: array Item schema data. since: 5.8.0 |
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |