Modifying capabilities shown in the field "Only visible to..." dropdown

GravityView only shows a few roles by default. If you want to add more, here's how:

add_filter( 'gravityview_field_visibility_caps', 'modify_gravityview_field_visibility_caps');

/**
 * @param array $caps Associated array of [capability name] => label shown in the View field settings
 */
function modify_gravityview_field_visibility_caps($caps) {
    // Add your capabilities here.
    $caps['edit_dashboard'] = 'Edit Dashboard';
    return $caps;
}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us