| @@ -389,5 +389,23 @@ | ||
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | $quizQuestionModel->delete(); |
| 392 | 392 | } |
| 393 | + | |
| 394 | + /** | |
| 395 | + * Check create | |
| 396 | + * | |
| 397 | + * @return bool | |
| 398 | + */ | |
| 399 | + public function check_capabilities_create(): bool { | |
| 400 | + return current_user_can( 'edit_' . LP_LESSON_CPT . 's' ); | |
| 401 | + } | |
| 402 | + | |
| 403 | + /** | |
| 404 | + * Check update | |
| 405 | + * | |
| 406 | + * @return bool | |
| 407 | + */ | |
| 408 | + public function check_capabilities_update(): bool { | |
| 409 | + return current_user_can( 'edit_' . LP_LESSON_CPT, $this->ID ); | |
| 410 | + } | |
| 393 | 411 | } |