LLMS_Roles::install()
Install custom roles and related capabilities
Description Description
Called from LLMS_Install during installation and upgrades.
Return Return
(void)
Source Source
File: includes/class.llms.roles.php
public static function install() { global $wp_roles; if ( ! class_exists( 'WP_Roles' ) ) { return; } $roles = self::get_roles(); $roles['administrator'] = __( 'Administrator', 'lifterlms' ); $wp_roles = wp_roles(); foreach ( $roles as $role => $name ) { $role_obj = $wp_roles->get_role( $role ); if ( ! $role_obj ) { $role_obj = $wp_roles->add_role( $role, $name ); } self::update_caps( $role_obj, 'add' ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.13.0 | Introduced. |