LLMS_REST_Posts_Controller::delete_item_permissions_check( WP_REST_Request $request )
Check if a given request has access to delete an item.
Parameters Parameters
- $request
-
(WP_REST_Request) (Required) Full details about the request.
Return Return
(bool|WP_Error)
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php
* * @since 1.0.0-beta.1 * @since 1.0.0-beta.7 return description updated. * * @param LLMS_Post_Model $object LMMS_Post_Model instance. * @param array $prepared_item Array. * @param WP_REST_Request $request Full details about the request. * @param array $schema The item schema. * @return bool|WP_Error True on success or false if nothing to update, WP_Error object if something went wrong during the update. */ protected function update_additional_object_fields( $object, $prepared_item, $request, $schema ) { return true; } /** * Check if a given request has access to delete an item. * * @since 1.0.0-beta.1 * @since 1.0.0-beta.18 Provide a more significant error message when trying to delete an item without permissions. * * @param WP_REST_Request $request Full details about the request. * @return bool|WP_Error */ public function delete_item_permissions_check( $request ) {
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.18 | Provide a more significant error message when trying to delete an item without permissions. |
1.0.0-beta.1 | Introduced. |