PHP code example of joanrodas / plubo-roles
1. Go to this page and download the library: Download joanrodas/plubo-roles library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
joanrodas / plubo-roles example snippets
PluboRoles\RolesProcessor::init();
add_filter('plubo/roles', function($roles) {
$roles[] = pb_role('student', 'Student')->extend('subscriber')->addCaps(['view_lesson', 'view_task']);
$roles[] = pb_role('instructor')->extend('contributor')->restrictAdmin();
$roles[] = pb_role('subscriber')->rename('Member');
return $roles;
});