1. Home
  2. For Devs
  3. Filter
  4. Custom Capability For Admin Page Tabs
  1. Home
  2. Plugins
  3. WP Webhooks
  4. For Devs
  5. Filter
  6. Custom Capability For Admin Page Tabs

Custom Capability For Admin Page Tabs

wpwhpro/admin/settings/menu/page_capability

Description:
Use this filter to create a unique capability for users that should just be permitted for specific tabs. This enables you to show them just certain information, based on your needs.

Parameter Type Description
WPWHPRO()->settings->get_admin_cap( ‘wpwhpro-page-settings’ ) string The global admin capability.
$active_val string The key of the current tab.

/**
* Filter the global plugin admin capability again to create an
* independent capability possibility system for the element settings
*/
apply_filters( 'wpwhpro/admin/settings/menu/page_capability', WPWHPRO()->settings->get_admin_cap( 'wpwhpro-page-settings' ), $active_val )

Updated on August 10, 2019

Was this article helpful?

Related Articles