Add Gravity Forms capabilities

* 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;
});
view raw functions.php hosted with ❤ by GitHub