Skip to content

joanrodas/plubo-roles

Plubo Roles

GitHub stars Code Climate maintainability

WordPress roles simplified.


Getting started

composer require joanrodas/plubo-roles

You can also install Plubo Roles as a standalone WordPress plugin, simply downloading the zip and placing it in the plugins folder.


Basic usage

<?php
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;
}); ?>

Contributions

contributions welcome GitHub issues GitHub license

Feel free to contribute to the project, suggesting improvements, reporting bugs and coding.