-
-
Save jchristopher/1b2104c38af3bb4b94fffe2f7dd76fdb to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
if (!is_user_logged_in()) { | |
if (!in_array($GLOBALS['pagenow'], array('wp-login.php'))) { | |
if ( isset( $_REQUEST['swpnonce'] ) || isset( $_REQUEST['swppurge'] ) ) { | |
//Indexer | |
} else { | |
$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
if ( wp_redirect(wp_login_url($actual_link)) ) { | |
exit; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment