Created
November 30, 2016 10:32
-
-
Save Umbrous/95fb08f1b62de30e959a47add02732b5 to your computer and use it in GitHub Desktop.
WP закрыть сайт для тех. работ
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 | |
function is_user_logged_in() { | |
$loggedin = false; | |
foreach ( (array) $_COOKIE as $cookie => $value ) { | |
if ( stristr($cookie, 'wordpress_logged_in_') ) | |
$loggedin = true; | |
} | |
return $loggedin; | |
} | |
if ( !stristr($_SERVER['REQUEST_URI'], '/wp-admin/') && !stristr($_SERVER['REQUEST_URI'], '/wp-login.php') && !is_user_logged_in() ) $upgrading = time(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment