Ninja Forms plugin menu access

Ninja Forms plugin protects all its menu items with ‘manage_options” user capability by default.

Thanks to plugin developers it’s possible to replace default user capability for every menu item using custom filter:

Forms – ninja_forms_admin_parent_menu_capabilities
All Forms – ninja_forms_admin_parent_menu_capabilities
Submissions – ninja_forms_admin_submissions_capabilities
Import/Export – ninja_forms_admin_import_export_capabilities
Settings – ninja_forms_admin_settings_capabilities
Get Help – ninja_forms_admin_status_capabilities
Add-Ons – ninja_forms_admin_extend_capabilities

How to use this filter? Let’s see on the “Import/Export” example:

add_filter('ninja_forms_admin_import_export_capabilities', 'replace_nf_admin_import_export_cap', 10, 1);
function replace_nf_admin_import_export_cap($capability) {
  $capability = 'nf_import_export';
 
  return $capability;
}
Share