Created
July 18, 2012 03:09
-
-
Save aanomm/3133911 to your computer and use it in GitHub Desktop.
WP: SECURITY > protect_whole_site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function protect_whole_site() { | |
if ( !is_user_logged_in() ) { | |
auth_redirect(); | |
} | |
} | |
add_action ('template_redirect', 'protect_whole_site'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment