Created
May 16, 2016 15:01
-
-
Save cojennin/d4c49f20bcc4365edd8de8c050f8e4f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Edit Flow - Allow Contributors to edit Notifications | |
*/ | |
function ef_allow_contributors_to_manage_notifications() { | |
global $wp_roles; | |
$role = 'contributor'; | |
$cap = 'edit_post_subscriptions'; | |
if ( $wp_roles->is_role( $role ) ) { | |
$role = get_role( $role ); | |
$role->add_cap( $cap ); | |
} | |
} | |
add_action( 'admin_init', 'ef_allow_contributors_to_manage_notifications' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment