Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cojennin/d4c49f20bcc4365edd8de8c050f8e4f7 to your computer and use it in GitHub Desktop.
Save cojennin/d4c49f20bcc4365edd8de8c050f8e4f7 to your computer and use it in GitHub Desktop.
<?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