Simple function to check if user is logged in
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
<?php | |
//=========================================================================== | |
// Function to check page security | |
//=========================================================================== | |
function check_page_security() { | |
if( !is_user_logged_in() ) { | |
wp_redirect( home_url() ); | |
exit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment