Пример #1
0
function exitpopup_description()
{
    $o = exitpopup_settings();
    extract($o);
    $output = '';
    if (!empty($description)) {
        $output .= '<div id="seed-csp4-description">' . shortcode_unautop(wpautop(convert_chars(wptexturize($description)))) . '</div>';
    }
    return $output;
}
Пример #2
0
 /**
  * Display the Exit POPUP page
  */
 function render_comingsoon_page()
 {
     extract(exitpopup_settings());
     if (!isset($status)) {
         $err = new WP_Error('error', __("Please enter your settings.", 'exitpopup'));
         echo $err->get_error_message();
         exit;
     }
     if (empty($_GET['cs_preview'])) {
         $_GET['cs_preview'] = false;
     }
     // Check if Preview
     $is_preview = false;
     if (isset($_GET['cs_preview']) && $_GET['cs_preview'] == 'true') {
         $is_preview = true;
     }
     // Exit if a custom login page
     if (empty($disable_default_excluded_urls)) {
         if (preg_match("/login|admin|dashboard|account/i", $_SERVER['REQUEST_URI']) > 0 && $is_preview == false) {
             return false;
         }
     }
     // Check if user is logged in.
     if ($is_preview === false) {
         if (is_user_logged_in()) {
             return false;
         }
     }
     // Finally check if we should show the Exit POPUP page.
     $this->comingsoon_rendered = true;
     // set headers
     if ($status == '2') {
         header('HTTP/1.1 503 Service Temporarily Unavailable');
         header('Status: 503 Service Temporarily Unavailable');
         header('Retry-After: 86400');
         // retry in a day
         $exitpopup_maintenance_file = WP_CONTENT_DIR . "/maintenance.php";
         if (!empty($enable_maintenance_php) and file_exists($exitpopup_maintenance_file)) {
             include_once $exitpopup_maintenance_file;
             exit;
         }
     }
     // render template tags
     $template = $this->get_default_template();
     require_once exitpopup_PLUGIN_PATH . '/themes/default/functions.php';
     $template_tags = array('{Title}' => exitpopup_title(), '{MetaDescription}' => exitpopup_metadescription(), '{Privacy}' => exitpopup_privacy(), '{Favicon}' => exitpopup_favicon(), '{CustomCSS}' => exitpopup_customcss(), '{Head}' => exitpopup_head(), '{Footer}' => exitpopup_footer(), '{Logo}' => exitpopup_logo(), '{Headline}' => exitpopup_headline(), '{Description}' => exitpopup_description(), '{Credit}' => exitpopup_credit());
     echo strtr($template, $template_tags);
     exit;
 }
Пример #3
0
define('exitpopup_SHORTNAME', 'exitpopup');
// Used to reference namespace functions.
define('exitpopup_SLUG', 'exitpopup/exitpopup.php');
// Used for settings link.
define('exitpopup_TEXTDOMAIN', 'exitpopup');
// Your textdomain
define('exitpopup_PLUGIN_NAME', __('Exit POPUP', 'exitpopup'));
// Plugin Name shows up on the admin settings screen.
define('exitpopup_VERSION', '1.0.1');
// Plugin Version Number.
define('exitpopup_PLUGIN_PATH', plugin_dir_path(__FILE__));
define('exitpopup_PLUGIN_URL', plugin_dir_url(__FILE__));
// Global
global $exitpopup_settings;
require_once 'cms/exitpopup-settings.php';
$exitpopup_settings = exitpopup_settings();
require_once 'include/class-exitpopup.php';
add_action('plugins_loaded', array('exitpopup', 'get_popup_ins'));
function exitpopup_installtion()
{
    require_once 'include/default-settings.php';
    add_option('exitpopup_settings_content', unserialize($exitpopup_settings_deafults['exitpopup_settings_content']));
    add_option('exitpopup_settings_design', unserialize($exitpopup_settings_deafults['exitpopup_settings_design']));
}
register_activation_hook(__FILE__, 'exitpopup_installtion');
if (is_admin()) {
    // Admin Only
    require_once 'include/config-settings.php';
    require_once 'cms/framework.php';
    add_action('plugins_loaded', array('exitpopup_ADMIN', 'get_instance'));
} else {