Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add option to allow Admin/Super Admins to see the site by default #17

Closed
benhuson opened this Issue Nov 29, 2012 · 3 comments

Comments

Projects
None yet
2 participants

I haven't actually tried it out yet, but it this as easy as taking this line:

add_action( 'template_redirect', array( $this, 'maybe_show_login' ), 1 );

And wrapping it in something like:
if (!current_user_can('manage_options')) { add_action(...); }

or similar capability.
I'm not sure which one you want to use. Should authors / editors / subscribers have to log in with this method, too?

Owner

benhuson commented Dec 4, 2012

I've created a version with another checkbox in the admin to allow administrators to have access without entering th e password.

Please test it and let me know what you think?

https://github.com/benhuson/password-protected/tree/dev

Owner

benhuson commented Dec 4, 2012

I've tested this dev version.
Going to release it soon.

@benhuson benhuson closed this Mar 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment