PHP Class Give_Roles, Give

This class handles the role creation and assignment of capabilities for those roles. These roles let us have Give Accountants, Give Workers, etc, each of whom can do certain things within the plugin.
Since: 1.0
Show file Open project: wordimpress/give Class Usage Examples

Public Methods

Method Description
__construct ( ) : void Class Constructor
add_caps ( ) : void Add Capabilities
add_roles ( ) : void Add Roles
get_core_caps ( ) : array Get Core Capabilities
meta_caps ( $caps, $cap, $user_id, $args ) : array Meta Capabilities
remove_caps ( ) : void Remove Capabilities

Method Details

__construct() public method

Set up the Give Roles Class.
Since: 1.0
public __construct ( ) : void
return void

add_caps() public method

Add new shop-specific capabilities.
Since: 1.0
public add_caps ( ) : void
return void

add_roles() public method

Add new shop roles with default WordPress capabilities.
Since: 1.0
public add_roles ( ) : void
return void

get_core_caps() public method

Retrieve core post type capabilities.
Since: 1.0
public get_core_caps ( ) : array
return array $capabilities Core post type capabilities.

meta_caps() public method

Map meta capabilities to primitive capabilities.
Since: 1.0
public meta_caps ( $caps, $cap, $user_id, $args ) : array
return array $caps Meta capabilities.

remove_caps() public method

Remove core post type capabilities (called on uninstall).
Since: 1.0
public remove_caps ( ) : void
return void