LLMS_REST_Posts_Controller::check_delete_permission( LLMS_Post_Model $object )
Checks if an llms post can be deleted.
Parameters Parameters
- $object
-
(LLMS_Post_Model) (Required) The LLMS_Post_model object.
Return Return
(bool) Whether the post can be deleted.
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php
protected function check_delete_permission( $object ) { $post_type = get_post_type_object( $this->post_type ); return current_user_can( $post_type->cap->delete_post, $object->get( 'id' ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |