Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: cb6bb09a9a
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (40 sloc) 1.417 kb
<?php
/*
// What will your query string be?
$name = 'open';
// Is the user logged in or do they have the appropriate cookie?
function is_user_logged_in() {
$loggedin = false;
foreach ( (array) $_COOKIE as $cookie => $value ) {
if ( stristr($cookie, 'wordpress_logged_in_') || stristr($cookie, 'vpm_wordpress_') ) {
$loggedin = true;
}
}
return $loggedin;
}
// What page are we on?
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
// Does this page have a URL query variable set?
function url_get_param($name) {
parse_str(parse_url(curPageURL(), PHP_URL_QUERY), $vars);
return isset($vars[$name]) ? $vars[$name] : null;
}
// If none of these conditions are true, we're in maintenance!
// If the query variable is set, set a cookie to expire in 30 minutes.
if ( ! stristr($_SERVER['REQUEST_URI'], '/wp-admin') && ! stristr($_SERVER['REQUEST_URI'], '/wp-login.php') && ! is_user_logged_in() && ! url_get_param($name) ) {
$upgrading = time();
} elseif ( url_get_param('open') ) {
setcookie("vpm_wordpress_hide_maintenance", "vanpattenmedia.com", time()+1800);
}
*/
?>
Jump to Line
Something went wrong with that request. Please try again.