pmpro_get_capability_defs

The Paid Memberships Pro pmpro get capability defs function.

Description

pmpro_get_capability_defs( $role ); 

Parameters (1)

0. $role
The role.

Usage

  1. if ( !function_exists( 'pmpro_get_capability_defs' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/capabilities.php'; 
  3.  
  4. // The role. 
  5. $role = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = pmpro_get_capability_defs($role); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/capabilities.php  
  1. function pmpro_get_capability_defs($role) 
  2. // TODO: Add other standard roles (if/when needed) 
  3.  
  4. // caps for the administrator role 
  5. $cap_array = array( 
  6. 'pmpro_memberships_menu',  
  7. 'pmpro_edit_memberships',  
  8. 'pmpro_memberslistcsv',  
  9. 'pmpro_orderscsv',  
  10. ); 
  11.  
  12. return apply_filters( "pmpro_assigned_{$role}_capabilities", $cap_array);