wpexpertsio / password-protected

Password protect your WordPress site quickly and simply
https://wordpress.org/plugins/password-protected/
69 stars 63 forks source link

let developers override the capability needed to see the options page #150

Closed nicoladj77 closed 4 years ago

nicoladj77 commented 5 years ago

I needed to have this flexibility as I had a multisite with different roles. To make it work, you also need to add

    add_filter( 'option_page_capability_password-protected', function ( $capability ) {
        return 'manage_password_protection';
    } );

to your theme

Don't know if you agree on the approach or would prefer a different one