Skip to main content
Version: v6

Allow Other Roles to Edit Notifications

By default, only administrators can edit notifications. You can allow other roles to manage notifications.

// Allow editors to manage notifications
add_filter('notification/capability', function($capability) {
return 'edit_posts';
});

// Or allow specific roles
add_action('init', function() {
$role = get_role('editor');
$role->add_cap('manage_notifications');
});

add_filter('notification/capability', function($capability) {
return 'manage_notifications';
});