Skip to content

Commit 79a433b

Browse files
committed
let developers override the capability needed to see the options pag with a filter
1 parent 348e1c7 commit 79a433b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

admin/admin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public function add_privacy_policy() {
4343
*/
4444
public function admin_menu() {
4545

46-
$this->settings_page_id = add_options_page( __( 'Password Protected', 'password-protected' ), __( 'Password Protected', 'password-protected' ), 'manage_options', 'password-protected', array( $this, 'settings_page' ) );
46+
$capability = apply_filters( 'password-protected-options-page-capability', 'manage_options' );
47+
$this->settings_page_id = add_options_page( __( 'Password Protected', 'password-protected' ), __( 'Password Protected', 'password-protected' ), $capability, 'password-protected', array( $this, 'settings_page' ) );
4748
add_action( 'load-' . $this->settings_page_id, array( $this, 'add_help_tabs' ), 20 );
4849

4950
}

0 commit comments

Comments
 (0)