Beispiel #1
0
function displayDefaultComingSoonPage()
{
    displayComingSoonPage(trim(get_bloginfo('title')) . ' is coming soon', get_bloginfo('url'), 'is coming soon');
}
 function uc_overrideWP()
 {
     if ($this->pluginIsActive()) {
         if (!is_user_logged_in()) {
             $array = get_option('underConstructionIPWhitelist');
             if (!is_array($array)) {
                 $array = array();
             }
             if (!in_array($_SERVER['REMOTE_ADDR'], $array)) {
                 //send a 503 if the setting requires it
                 if (get_option('underConstructionHTTPStatus') == 503) {
                     header('HTTP/1.1 503 Service Unavailable');
                 }
                 //send a 503 if the setting requires it
                 if (get_option('underConstructionHTTPStatus') == 301) {
                     header("HTTP/1.1 301 Moved Permanently");
                     header("Location: " . get_option('underConstructionRedirectURL'));
                 }
                 if ($this->displayStatusCodeIs(0)) {
                     require_once 'defaultMessage.php';
                     displayDefaultComingSoonPage();
                     die;
                 }
                 if ($this->displayStatusCodeIs(1)) {
                     require_once 'defaultMessage.php';
                     displayComingSoonPage($this->getCustomPageTitle(), $this->getCustomHeaderText(), $this->getCustomBodyText());
                     die;
                 }
                 if ($this->displayStatusCodeIs(2)) {
                     echo html_entity_decode($this->getCustomHTML(), ENT_QUOTES);
                     die;
                 }
                 if ($this->displayStatusCodeIs(3)) {
                     require_once get_template_directory() . '/under-construction.php';
                     die;
                 }
             }
         }
     }
 }