apply_filters( 'ep_capability', $capability, $context ) → {string}
Filter the WP capability needed to interact with ElasticPress in the admin
Example:
add_filter(
'ep_capability',
function ( $cacapability, $context ) {
return ( 'synonyms' === $context ) ?
'manage_elasticpress_synonyms' :
$cacapability;
},
10,
2
);
Parameters:
Name | Type | Description |
---|---|---|
$capability |
string | Capability name. Defaults to |
$context |
string | Additional context |
- Since:
- 4.5.0, 5.1.0 added $context
- Source:
Returns:
New capability value
- Type
- string