Skip to content

Commit fc63dba

Browse files
committed
Add documentation for capability filter.
1 parent fe4b048 commit fc63dba

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/inc/settings.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,18 @@ function ableplayer_settings_form() {
524524
* Add Able Player menu items to main admin menu
525525
*/
526526
function ableplayer_menu() {
527+
/**
528+
* Filter the capability required to manage Able Player settings.
529+
*
530+
* @hook ableplayer_capability
531+
*
532+
* @param {string} $capability The capability string required.
533+
*/
534+
$capability = apply_filters( 'ableplayer_capability', 'manage_options' );
527535
add_options_page(
528536
__( 'Able Player', 'ableplayer' ),
529537
__( 'Able Player', 'ableplayer' ),
530-
apply_filters( 'ableplayer_capability', 'manage_options' ),
538+
$capability,
531539
'ableplayer',
532540
'ableplayer_settings_form'
533541
);

0 commit comments

Comments
 (0)