Closed felipeelia closed 5 months ago
Users wanting to manage synonyms-related capabilities, for example, can use the following snippet and add the manage_elasticpress_synonyms capability to their chosen role:
manage_elasticpress_synonyms
add_filter( 'ep_capability', function ( $cacapability, $context ) { return ( 'synonyms' === $context ) ? 'manage_elasticpress_synonyms' : $cacapability; }, 10, 2 );
Closes #3787
Added - Context parameter to the get_capability() function
Props @felipeelia @selim13
Description of the Change
Users wanting to manage synonyms-related capabilities, for example, can use the following snippet and add the
manage_elasticpress_synonyms
capability to their chosen role:Closes #3787
How to test the Change
Changelog Entry
Credits
Props @felipeelia @selim13
Checklist: