| 1 |
<?php |
| 2 |
/** |
| 3 |
* Role default |
| 4 |
* |
| 5 |
* @package LearnPress/Config |
| 6 |
* @version 1.0.0 |
| 7 |
* @since 4.4.2 |
| 8 |
*/ |
| 9 |
|
| 10 |
use LearnPress\Models\UserModel; |
| 11 |
|
| 12 |
defined( 'ABSPATH' ) || exit; |
| 13 |
|
| 14 |
$config = []; |
| 15 |
|
| 16 |
$config[ UserModel::ROLE_INSTRUCTOR ] = apply_filters( |
| 17 |
'learn-press/role/instructor/capabilities_default', |
| 18 |
[ |
| 19 |
'label' => 'Instructor', |
| 20 |
'prefix_capabilities' => [ |
| 21 |
'publish', |
| 22 |
'edit', |
| 23 |
'delete', |
| 24 |
'edit_published', |
| 25 |
'delete_published', |
| 26 |
'read_private', |
| 27 |
'edit_private', |
| 28 |
'delete_private', |
| 29 |
], |
| 30 |
], |
| 31 |
); |
| 32 |
|
| 33 |
$config[ UserModel::ROLE_ADMINISTRATOR ] = apply_filters( |
| 34 |
'learn-press/role/admin/capabilities_default', |
| 35 |
[ |
| 36 |
'label' => 'Administrator', |
| 37 |
'prefix_capabilities' => array_merge( |
| 38 |
$config[ UserModel::ROLE_INSTRUCTOR ]['prefix_capabilities'], |
| 39 |
[ |
| 40 |
'edit_others', |
| 41 |
'delete_others', |
| 42 |
] |
| 43 |
), |
| 44 |
] |
| 45 |
); |
| 46 |
|
| 47 |
return apply_filters( 'learn-press/roles/capabilities_default', $config ); |
| 48 |
|