Change WordPress user roles and capabilities › Forums › Give user access to plugin – how to › Give Access for Better Docs plugin to a user. › Reply To: Give Access for Better Docs plugin to a user.
19/10/2020 at 06:43
#7103
Vladimir
Keymaster
Better Docs (BD) protects its admin menu items using this user capabilities by default:
BetterDocs – edit_posts
All Docs – edit_posts
Add New – edit_posts
Categories – delete_others_posts
Tags – delete_others_posts
Quick Setup – delete_users
Settings – administrator
It’s possible to replace the default capabilities using custom filters. Look below which filters BD plugin uses for this purpose:
$betterdocs_articles_caps = apply_filters( 'betterdocs_articles_caps', 'edit_posts', 'article_roles' );
$betterdocs_terms_caps = apply_filters( 'betterdocs_terms_caps', 'delete_others_posts', 'article_roles' );
$betterdocs_settings_caps = apply_filters( 'betterdocs_settings_caps', 'administrator', 'settings_roles' );