• I’m having some trouble getting this plugin to work with a custom role. I’m creating a role that can only manage Gravity Form entries, so they can’t edit pages or posts. But I’d also like that user to see the help documents.

    Is there a custom capability to which I can grant access so a user can view help docs? When I activate Read Private for the Help Documents CPT, it still won’t work. I suspect the plugin might be looking for an capability…

Viewing 1 replies (of 1 total)
  • Hey,

    From what I can tell after poring through the code, there are two filters that can allow you to do this quite simply:

    These are cws_wp_help_edit_documents_cap (which controls the creation and management access)
    and cws_wp_help_view_documents_cap (which controls the viewing/reading access.

    So, you could, for example, use the following in your functions file or a snippet plugin to allow users who can view Gravity Forms entries to get view access to the Help documents:

    // Change which capability is required for viewing posts in WP Help
    function alp_wp_help_change_cap( $publish_posts ) {
    	return 'gravityforms_view_entries'; //this is gravity forms' inbuilt capability for viewing entries
    }
    add_filter( 'cws_wp_help_view_documents_cap', 'alp_wp_help_change_cap', 10, 1 );

    Hope this helps! It’s an awesome plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Roles & Capabilities’ is closed to new replies.