Created
April 23, 2020 03:32
-
-
Save mmizwicki/b1631e1a0324cf3113bd853956a94c0d to your computer and use it in GitHub Desktop.
Add new non-admin user role to access to Gravity Forms
This file contains hidden or 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
//https://legacy.forums.gravityhelp.com/topic/forms-not-visible-to-editors | |
// add client role that has access to Gravity Forms (except for settings) | |
// this role is an addition of the Editor role | |
if (!get_role('client')) | |
{ | |
$caps = get_role('editor')->capabilities; | |
$caps = array_merge($caps, array( | |
'gravityforms_create_form' => true, | |
'gravityforms_delete_entries' => true, | |
'gravityforms_delete_forms' => true, | |
'gravityforms_edit_entries' => true, | |
'gravityforms_edit_entry_notes' => true, | |
'gravityforms_edit_forms' => true, | |
'gravityforms_edit_settings' => false, | |
'gravityforms_export_entries' => true, | |
'gravityforms_view_entries' => true, | |
'gravityforms_view_entry_notes' => true | |
)); | |
add_role('client','Client', $caps ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment