Adjust the capabilities assigned to a specific role for Paid Memberships Pro.


/**
 * Return capabilities for a user based on their role (default: administrator)
 *
 * @see:
 *      pmpro_get_capability_defs
 *      pmpro_set_capabilities_for_role
 *      pmpro_activation
 *      pmpro_deactivation
 *
 * @param $cap_array {
 *      Capabilities array
 *
 *      @type string $capability The capability name.
 *          Values are:
 *              pmpro_memberships_menu
 *              pmpro_dashboard
 *              pmpro_membership_levels
 *              pmpro_edit_memberships
 *              pmpro_pagesettings
 *              pmpro_paymentsettings
 *              pmpro_emailsettings
 *              pmpro_advancedsettings
 *              pmpro_addons
 *              pmpro_memberslist
 *              pmpro_memberslistcsv
 *              pmpro_reports
 *              pmpro_orders
 *              pmpro_orderscsv
 *              pmpro_discountcodes
 *              pmpro_updates
 * }
 *
 * @return array Array of capabilities for the passed $role variable.
 */
apply_filters( "pmpro_assigned_{$role}_capabilities", $cap_array);

Parameters

$cap_array
array

Return Value

@cap_array based on $role


Source

File: https://github.com/strangerstudios/paid-memberships-pro/blob/master/includes/capabilities.php

View in Source Code