Simple function to check if user is logged in
<?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