Verified Commit 038adc9f authored by Kevin Cristiano's avatar Kevin Cristiano 🌎

force update of CiviCRM Admin Role. Clean up typos

parent 803b0a57
...@@ -18,7 +18,7 @@ function tc_reset_wp_user_capabilities() { ...@@ -18,7 +18,7 @@ function tc_reset_wp_user_capabilities() {
$wp_roles = new WP_Roles(); $wp_roles = new WP_Roles();
} }
// Minimum capabilities (Civicrm permissions) arrays // Minimum capabilities (CiviCRM permissions) arrays
$default_min_capabilities = array( $default_min_capabilities = array(
'access_civimail_subscribe_unsubscribe_pages' => 1, 'access_civimail_subscribe_unsubscribe_pages' => 1,
'access_all_custom_data' => 1, 'access_all_custom_data' => 1,
...@@ -45,7 +45,7 @@ function tc_reset_wp_user_capabilities() { ...@@ -45,7 +45,7 @@ function tc_reset_wp_user_capabilities() {
} }
} }
// Minimum capabilities (Civicrm permissions) arrays // Admin capabilities (CiviCRM permissions) arrays
$default_admin_capabilities = array( $default_admin_capabilities = array(
'read' => 1, 'read' => 1,
'access_ajax_api' => 1, 'access_ajax_api' => 1,
...@@ -148,6 +148,11 @@ function tc_reset_wp_user_capabilities() { ...@@ -148,6 +148,11 @@ function tc_reset_wp_user_capabilities() {
$admin_capabilities $admin_capabilities
); );
} }
$roleObj = get_role( 'civicrm_admin' );
foreach ( $admin_capabilities as $capability_name => $capability_value ) {
$roleObj->add_cap( $capability_name );
}
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment