Created
April 18, 2017 17:35
-
-
Save lukecav/5ad3fae95bbefa775f4a5c5556b84255 to your computer and use it in GitHub Desktop.
Add Gravity Forms capabilities
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
* Add Gravity Forms capabilities | |
*/ | |
add_filter('user_has_cap', | |
function( $caps ){ | |
if (! empty( $caps['edit_pages'] ) ) { // user has edit capabilities | |
$caps['gravityforms_delete_entries'] = true; | |
$caps['gravityforms_edit_entries'] = true; | |
$caps['gravityforms_edit_entry_notes'] = true; | |
$caps['gravityforms_view_entries'] = true; | |
$caps['gravityforms_view_entry_notes'] = true; | |
} | |
return $caps; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment