Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-0831: under-construction.php in under-construction-page/trunk – WordPress Plugin Repository

The Under Construction plugin for WordPress is vulnerable to Cross-Site Request Forgery in versions up to, and including, 3.96. This is due to missing or incorrect nonce validation on the dismiss_notice function called via the admin_action_ucp_dismiss_notice action. This makes it possible for unauthenticated attackers to dismiss plugin notifications via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.

CVE
#sql#web#ios#mac#apple#google#ubuntu#cisco#redis#js#java#wordpress#php#perl#auth#dell#chrome#sap#maven#ssl

1<?php2/*3 Plugin Name: Under Construction4 Plugin URI: https://underconstructionpage.com/5 Description: Put your site behind a great looking under construction, coming soon, maintenance mode or landing page.6 Author: WebFactory Ltd7 Version: 3.968 Requires at least: 4.09 Requires PHP: 5.210 Tested up to: 6.111 Author URI: https://www.webfactoryltd.com/12 Text Domain: under-construction-page1314 Copyright 2015 - 2023 WebFactory Ltd (email: [email protected])1516 This program is free software; you can redistribute it and/or modify17 it under the terms of the GNU General Public License, version 2, as18 published by the Free Software Foundation.1920 This program is distributed in the hope that it will be useful,21 but WITHOUT ANY WARRANTY; without even the implied warranty of22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the23 GNU General Public License for more details.2425 You should have received a copy of the GNU General Public License26 along with this program; if not, write to the Free Software27 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA28*/2930// this is an include only WP file31if (!defined(‘ABSPATH’)) {32 die;33}343536define('UCP_PLUGIN_DIR’, plugin_dir_path(__FILE__));37define('UCP_PLUGIN_URL’, plugin_dir_url(__FILE__));38define('UCP_OPTIONS_KEY’, ‘ucp_options’);39define('UCP_META_KEY’, ‘ucp_meta’);40define('UCP_POINTERS_KEY’, ‘ucp_pointers’);41define('UCP_NOTICES_KEY’, ‘ucp_notices’);42define('UCP_SURVEYS_KEY’, ‘ucp_surveys’);4344require_once 'wf-flyout/wf-flyout.php’;45new wf_flyout(__FILE__);4647require_once UCP_PLUGIN_DIR . 'ucp-license.php’;484950// main plugin class51class UCP52{53 static $version = 0;54 static $licensing_servers = array('https://license1.underconstructionpage.com/’, ‘https://license2.underconstructionpage.com/’);555657 // get plugin version from header58 static function get_plugin_version()59 {60 $plugin_data = get_file_data(__FILE__, array(‘version’ => ‘Version’), ‘plugin’);61 self::$version = $plugin_data[‘version’];6263 return $plugin_data[‘version’];64 } // get_plugin_version656667 // hook things up68 static function init()69 {70 // check if minimal required WP version is present71 if (false === self::check_wp_version(4.0)) {72 return false;73 }7475 if (is_admin()) {76 // if the plugin was updated from ver < 1.20 upgrade settings array77 self::maybe_upgrade();7879 // add UCP menu to admin tools menu group80 add_action('admin_menu’, array(__CLASS__, ‘admin_menu’));8182 // settings registration83 add_action('admin_init’, array(__CLASS__, ‘register_settings’));8485 // aditional links in plugin description86 add_filter(87 ‘plugin_action_links_’ . plugin_basename(__FILE__),88 array(__CLASS__, ‘plugin_action_links’)89 );90 add_filter('plugin_row_meta’, array(__CLASS__, ‘plugin_meta_links’), 10, 2);91 add_filter('admin_footer_text’, array(__CLASS__, ‘admin_footer_text’));92 add_filter('admin_footer’, array(__CLASS__, ‘admin_footer’));9394 // manages admin header notifications95 add_action('admin_notices’, array(__CLASS__, ‘admin_notices’));96 add_action('admin_action_ucp_dismiss_notice’, array(__CLASS__, ‘dismiss_notice’));97 add_action('admin_action_ucp_change_status’, array(__CLASS__, ‘change_status’));98 add_action('admin_action_ucp_reset_settings’, array(__CLASS__, ‘reset_settings’));99 add_action('admin_action_install_weglot’, array(__CLASS__, ‘install_weglot’));100 add_action('admin_action_install_wpfssl’, array(__CLASS__, ‘install_wpfssl’));101102 // enqueue admin scripts103 add_action('admin_enqueue_scripts’, array(__CLASS__, ‘admin_enqueue_scripts’), 100, 1);104105 // AJAX endpoints106 add_action('wp_ajax_ucp_dismiss_pointer’, array(__CLASS__, ‘dismiss_pointer_ajax’));107 add_action('wp_ajax_ucp_dismiss_survey’, array(__CLASS__, ‘dismiss_survey_ajax’));108 add_action('wp_ajax_ucp_submit_survey’, array(__CLASS__, ‘submit_survey_ajax’));109 add_action('wp_ajax_ucp_submit_support_message’, array(__CLASS__, ‘submit_support_message_ajax’));110 } else {111 // main plugin logic112 add_action('wp’, array(__CLASS__, ‘display_construction_page’), 0, 1);113114 // show under construction notice on login form115 add_filter('login_message’, array(__CLASS__, ‘login_message’));116117 // disable feeds118 add_action('do_feed_rdf’, array(__CLASS__, ‘disable_feed’), 0, 1);119 add_action('do_feed_rss’, array(__CLASS__, ‘disable_feed’), 0, 1);120 add_action('do_feed_rss2’, array(__CLASS__, ‘disable_feed’), 0, 1);121 add_action('do_feed_atom’, array(__CLASS__, ‘disable_feed’), 0, 1);122123 add_action('wp_footer’, array(__CLASS__, ‘whitelisted_notice’));124 } // if not admin125126 // admin bar notice for frontend & backend127 add_action('wp_before_admin_bar_render’, array(__CLASS__, ‘admin_bar’));128 add_action('wp_head’, array(__CLASS__, ‘admin_bar_style’));129 add_action('admin_head’, array(__CLASS__, ‘admin_bar_style’));130131 UCP_license::init();132 } // init133134135 // check if user has the minimal WP version required by UCP136 static function check_wp_version($min_version)137 {138 if (!version_compare(get_bloginfo(‘version’), $min_version, ‘>=’)) {139 add_action('admin_notices’, array(__CLASS__, ‘notice_min_wp_version’));140 return false;141 } else {142 return true;143 }144 } // check_wp_version145146147 // display error message if WP version is too low148 static function notice_min_wp_version()149 {150 echo ‘<div class="error"><p>’ . sprintf(__('UnderConstruction plugin <b>requires WordPress version 4.0</b> or higher to function properly. You are using WordPress version %s. Please <a href="%s">update it</a>.’, ‘under-construction-page’), get_bloginfo(‘version’), admin_url(‘update-core.php’)) . '</p></div>’;151 } // notice_min_wp_version_error152153154 // some things have to be loaded earlier155 static function plugins_loaded()156 {157 self::get_plugin_version();158159 load_plugin_textdomain(‘under-construction-page’);160 } // plugins_loaded161162163 // activate doesn’t get fired on upgrades so we have to compensate164 public static function maybe_upgrade()165 {166 $meta = self::get_meta();167 $options = self::get_options();168169 // added in v1.70 to rename roles to whitelisted_roles170 if (isset($options[‘roles’])) {171 $options[‘whitelisted_roles’] = $options[‘roles’];172 unset($options[‘roles’]);173 update_option(UCP_OPTIONS_KEY, $options);174 }175176 // check if we need to convert options from the old format to new, or maybe it is already done177 if (isset($meta[‘options_ver’]) && $meta[‘options_ver’] == self::$version) {178 return;179 }180181 if (get_option(‘set_size’) || get_option(‘set_tweet’) || get_option(‘set_fb’) || get_option(‘set_font’) || get_option(‘set_msg’) || get_option(‘set_opt’) || get_option(‘set_admin’)) {182 // convert old options to new183 $options[‘status’] = (get_option(‘set_opt’) === ‘Yes’) ? ‘1’ : '0’;184 $options[‘content’] = trim(get_option(‘set_msg’));185 $options[‘whitelisted_roles’] = (get_option(‘set_admin’) === ‘No’) ? array(‘administrator’) : array();186 $options[‘social_facebook’] = trim(get_option(‘set_fb’));187 $options[‘social_twitter’] = trim(get_option(‘set_tweet’));188 update_option(UCP_OPTIONS_KEY, $options);189190 delete_option(‘set_size’);191 delete_option(‘set_tweet’);192 delete_option(‘set_fb’);193 delete_option(‘set_font’);194 delete_option(‘set_msg’);195 delete_option(‘set_opt’);196 delete_option(‘set_admin’);197198 self::reset_pointers();199 }200201 // we update only once202 $meta[‘options_ver’] = self::$version;203 update_option(UCP_META_KEY, $meta);204 } // maybe_upgrade205206207 // get plugin’s options208 static function get_options()209 {210 $options = get_option(UCP_OPTIONS_KEY, array());211212 if (!is_array($options)) {213 $options = array();214 }215 $options = array_merge(self::default_options(), $options);216217 return $options;218 } // get_options219220221 // get plugin’s meta data222 static function get_meta()223 {224 $meta = get_option(UCP_META_KEY, array());225226 if (!is_array($meta) || empty($meta)) {227 $meta[‘first_version’] = self::get_plugin_version();228 $meta[‘first_install’] = time();229 update_option(UCP_META_KEY, $meta);230 }231232 return $meta;233 } // get_meta234235236 // fetch and display the construction page if it’s enabled or preview requested237 static function display_construction_page()238 {239 $options = self::get_options();240 $request_uri = trailingslashit(strtolower(@parse_url($_SERVER[‘REQUEST_URI’], PHP_URL_PATH)));241242 // just to be on the safe side243 if (defined(‘DOING_CRON’) && DOING_CRON) {244 return false;245 }246 if (defined(‘DOING_AJAX’) && DOING_AJAX) {247 return false;248 }249 if (defined(‘WP_CLI’) && WP_CLI) {250 return false;251 }252253 // some URLs have to be accessible at all times254 if (255 $request_uri == ‘/wp-admin/’ ||256 $request_uri == ‘/feed/’ ||257 $request_uri == ‘/feed/rss/’ ||258 $request_uri == ‘/feed/rss2/’ ||259 $request_uri == ‘/feed/rdf/’ ||260 $request_uri == ‘/feed/atom/’ ||261 $request_uri == ‘/admin/’ ||262 $request_uri == ‘/wp-login.php’263 ) {264 return;265 }266267 if (true == self::is_construction_mode_enabled(false) || (is_user_logged_in() && isset($_GET[‘ucp_preview’]))) {268 header(self::wp_get_server_protocol() . ' 200 OK’);269 if ($options[‘end_date’] && $options[‘end_date’] != ‘0000-00-00 00:00’) {270 header('Retry-After: ' . date('D, d M Y H:i:s T’, strtotime($options[‘end_date’])));271 } else {272 header('Retry-After: ' . DAY_IN_SECONDS);273 }274275 $themes = self::get_themes();276 if (!empty($_GET[‘theme’]) && substr(sanitize_text_field($_GET[‘theme’]), 5) != ‘_pro_’ && !empty($themes[sanitize_text_field($_GET[‘theme’])])) {277 $theme = sanitize_text_field($_GET[‘theme’]);278 } else {279 $theme = $options[‘theme’];280 }281282 self::wp_kses_wf(self::get_template($theme));283 die();284 }285 } // display_construction_page286287288 // keeping compatibility with WP < v4.4289 static function wp_get_server_protocol()290 {291 $protocol = $_SERVER[‘SERVER_PROTOCOL’];292 if (!in_array($protocol, array('HTTP/1.1’, 'HTTP/2’, ‘HTTP/2.0’))) {293 $protocol = 'HTTP/1.0’;294 }295296 return $protocol;297 } // wp_get_server_protocol298299300 // disables feed if necessary301 static function disable_feed()302 {303 if (true == self::is_construction_mode_enabled(false)) {304 echo '<?xml version="1.0" encoding="UTF-8" ?><status>Service unavailable.</status>’;305 exit;306 }307 } // disable_feed308309310 // enqueue CSS and JS scripts in admin311 static function admin_enqueue_scripts($hook)312 {313 $surveys = get_option(UCP_SURVEYS_KEY);314 $meta = self::get_meta();315 $pointers = get_option(UCP_POINTERS_KEY);316317 // auto remove welcome pointer when options are opened318 if (self::is_plugin_page()) {319 unset($pointers[‘welcome’]);320 update_option(UCP_POINTERS_KEY, $pointers);321 }322323 // survey is shown min 5min after install324 // DISABLED325 if (0 && empty($surveys[‘usage’]) && time() - $meta[‘first_install’] > 300) {326 $open_survey = true;327 } else {328 $open_survey = false;329 }330331 $promo = self::is_promo_active();332 if ($promo == ‘welcome’) {333 $countdown = $meta[‘first_install’] + HOUR_IN_SECONDS;334 } else {335 $countdown = 0;336 }337338 $js_localize = array(339 ‘undocumented_error’ => esc_attr__('An undocumented error has occured. Please refresh the page and try again.’, ‘under-construction-page’),340 ‘plugin_name’ => esc_attr__('UnderConstructionPage’, ‘under-construction-page’),341 ‘settings_url’ => admin_url(‘options-general.php?page=ucp’),342 ‘whitelisted_users_placeholder’ => esc_attr__('Select whitelisted user(s)', ‘under-construction-page’),343 ‘open_survey’ => $open_survey,344 ‘promo_countdown’ => $countdown,345 ‘wpfssl_install_url’ => add_query_arg(array(‘action’ => 'install_wpfssl’, ‘_wpnonce’ => wp_create_nonce(‘install_wpfssl’), ‘rnd’ => rand()), admin_url(‘admin.php’)),346 ‘is_activated’ => UCP_license::is_activated(),347 ‘dialog_upsell_title’ => ‘<img alt="’ . esc_attr__('UnderConstructionPage PRO’, ‘under-construction-page’) . ‘" title="’ . esc_attr__('UnderConstructionPage PRO’, ‘under-construction-page’) . ‘" src="’ . UCP_PLUGIN_URL . ‘images/ucp_pro_logo_white.png’ . '">’,348 ‘weglot_dialog_upsell_title’ => ‘<img alt="’ . esc_attr__('Weglot’, ‘under-construction-page’) . ‘" title="’ . esc_attr__('Weglot’, ‘under-construction-page’) . ‘" src="’ . UCP_PLUGIN_URL . ‘images/weglot-logo-white.png’ . '">’,349 ‘weglot_install_url’ => add_query_arg(array(‘action’ => ‘install_weglot’), admin_url(‘admin.php’)),350 ‘nonce_dismiss_survey’ => wp_create_nonce(‘ucp_dismiss_survey’),351 ‘nonce_submit_survey’ => wp_create_nonce(‘ucp_submit_survey’),352 ‘nonce_submit_support_message’ => wp_create_nonce(‘ucp_submit_support_message’),353 ‘deactivate_confirmation’ => esc_attr__(‘Are you sure you want to deactivate UnderConstruction plugin?’ . “\n” . 'If you are removing it because of a problem please contact our support. They will be more than happy to help.’, ‘under-construction-page’)354 );355356 if (self::is_plugin_page()) {357 remove_editor_styles();358 wp_enqueue_style(‘wp-jquery-ui-dialog’);359 wp_enqueue_style('ucp-select2’, UCP_PLUGIN_URL . 'css/select2.min.css’, array(), self::$version);360 wp_enqueue_style('ucp-admin’, UCP_PLUGIN_URL . 'css/ucp-admin.css’, array(), self::$version);361362 wp_enqueue_script(‘jquery-ui-tabs’);363 wp_enqueue_script(‘jquery-ui-dialog’);364 wp_enqueue_script('ucp-jquery-plugins’, UCP_PLUGIN_URL . 'js/ucp-jquery-plugins.js’, array(‘jquery’), self::$version, true);365 wp_enqueue_script('ucp-select2’, UCP_PLUGIN_URL . 'js/select2.min.js’, array(), self::$version, true);366 wp_enqueue_script('ucp-admin’, UCP_PLUGIN_URL . 'js/ucp-admin.js’, array(‘jquery’), self::$version, true);367 wp_localize_script('ucp-admin’, 'ucp’, $js_localize);368369 // fix for agressive plugins370 wp_dequeue_style(‘uiStyleSheet’);371 wp_dequeue_style(‘wpcufpnAdmin’);372 wp_dequeue_style(‘unifStyleSheet’);373 wp_dequeue_style(‘wpcufpn_codemirror’);374 wp_dequeue_style(‘wpcufpn_codemirrorTheme’);375 wp_dequeue_style(‘collapse-admin-css’);376 wp_dequeue_style(‘jquery-ui-css’);377 wp_dequeue_style(‘tribe-common-admin’);378 wp_dequeue_style(‘file-manager__jquery-ui-css’);379 wp_dequeue_style(‘file-manager__jquery-ui-css-theme’);380 wp_dequeue_style(‘wpmegmaps-jqueryui’);381 wp_dequeue_style(‘wp-botwatch-css’);382 wp_dequeue_style(‘uap_main_admin_style’);383 wp_dequeue_style(‘uap_font_awesome’);384 wp_dequeue_style(‘uap_jquery-ui.min.css’);385 }386387 if ($pointers) {388 $pointers[‘_nonce_dismiss_pointer’] = wp_create_nonce(‘ucp_dismiss_pointer’);389 wp_enqueue_script(‘wp-pointer’);390 wp_enqueue_script('ucp-pointers’, plugins_url('js/ucp-admin-pointers.js’, __FILE__), array(‘jquery’), self::$version, true);391 wp_enqueue_style(‘wp-pointer’);392 wp_localize_script('wp-pointer’, 'ucp_pointers’, $pointers);393 wp_localize_script('wp-pointer’, 'ucp’, $js_localize);394 }395 } // admin_enqueue_scripts396397398 // permanently dismiss a pointer399 static function dismiss_pointer_ajax()400 {401 check_ajax_referer(‘ucp_dismiss_pointer’);402403 $pointers = get_option(UCP_POINTERS_KEY);404 $pointer = trim(sanitize_text_field($_POST[‘pointer’]));405406 if (empty($pointers) || empty($pointers[$pointer])) {407 wp_send_json_error();408 }409410 unset($pointers[$pointer]);411 update_option(UCP_POINTERS_KEY, $pointers);412413 wp_send_json_success();414 } // dismiss_pointer_ajax415416417 // permanently dismiss a survey418 static function dismiss_survey_ajax()419 {420 check_ajax_referer(‘ucp_dismiss_survey’);421422 $surveys = get_option(UCP_SURVEYS_KEY, array());423 $survey = trim(sanitize_text_field($_POST[‘survey’]));424425 $surveys[$survey] = -1;426 update_option(UCP_SURVEYS_KEY, $surveys);427428 wp_send_json_success();429 } // dismiss_survey_ajax430431432 // send support message433 static function submit_support_message_ajax()434 {435 check_ajax_referer(‘ucp_submit_support_message’);436437 $options = self::get_options();438439 $email = sanitize_text_field($_POST[‘support_email’]);440 if (!is_email($email)) {441 wp_send_json_error(esc_attr__(‘Please double-check your email address.’, ‘under-construction-page’));442 }443444 $message = stripslashes(sanitize_text_field($_POST[‘support_message’]));445 $subject = ‘UCP Support’;446 $body = $message;447 if (!empty($_POST[‘support_info’])) {448 $theme = wp_get_theme();449 $body .= "\r\n\r\nSite details:\r\n";450 $body .= ' WordPress version: ' . get_bloginfo(‘version’) . "\r\n";451 $body .= ' UCP version: ' . self::$version . "\r\n";452 $body .= ' PHP version: ' . PHP_VERSION . "\r\n";453 $body .= ' Site URL: ' . get_bloginfo(‘url’) . "\r\n";454 $body .= ' WordPress URL: ' . get_bloginfo(‘wpurl’) . "\r\n";455 $body .= ' Theme: ' . $theme->get(‘Name’) . ' v’ . $theme->get(‘Version’) . "\r\n";456 $body .= ' Options: ' . “\r\n” . serialize($options) . “\r\n";457 }458 $headers = 'From: ' . $email . “\r\n” . 'Reply-To: ' . $email;459460 if (true === wp_mail('[email protected]’, $subject, $body, $headers)) {461 wp_send_json_success();462 } else {463 wp_send_json_error(esc_attr__('Something is not right with your wp_mail() function. Please email as at [email protected].’, ‘under-construction-page’));464 }465 } // submit_support_message466467468 // submit survey469 static function submit_survey_ajax()470 {471 check_ajax_referer(‘ucp_submit_survey’);472473 $options = self::get_options();474 $meta = self::get_meta();475 $surveys = get_option(UCP_SURVEYS_KEY);476477 $vars = wp_parse_args($_POST, array(‘survey’ => '’, ‘answers’ => '’, ‘custom_answer’ => $options[‘theme’], ‘emailme’ => ‘’));478 $vars[‘answers’] = trim($vars[‘answers’], ‘,’);479 $vars[‘custom_answer’] = trim(strip_tags($vars[‘custom_answer’]));480481 $vars[‘custom_answer’] .= '; ' . date(‘Y-m-d H:i:s’, $meta[‘first_install’]);482 $vars[‘custom_answer’] = trim($vars[‘custom_answer’], ' ;’);483484 if (empty($vars[‘survey’]) || empty($vars[‘answers’])) {485 wp_send_json_error();486 }487488 $request_params = array(‘sslverify’ => false, ‘timeout’ => 15, ‘redirection’ => 2);489 $request_args = array(490 ‘action’ => 'submit_survey’,491 ‘survey’ => $vars[‘survey’],492 ‘email’ => $vars[‘emailme’],493 ‘answers’ => $vars[‘answers’],494 ‘custom_answer’ => $vars[‘custom_answer’],495 ‘first_version’ => $meta[‘first_version’],496 ‘version’ => UCP::$version,497 ‘codebase’ => 'free’,498 ‘site’ => get_home_url()499 );500501 $url = add_query_arg($request_args, self::$licensing_servers[0]);502 $response = wp_remote_get(esc_url_raw($url), $request_params);503504 if (is_wp_error($response) || !wp_remote_retrieve_body($response)) {505 $url = add_query_arg($request_args, self::$licensing_servers[1]);506 $response = wp_remote_get(esc_url_raw($url), $request_params);507 }508509 $surveys[$vars[‘survey’]] = time();510 update_option(UCP_SURVEYS_KEY, $surveys);511512 wp_send_json_success();513 } // submit_survey_ajax514515516 // encode email for frontend use517 static function encode_email($email)518 {519 $len = strlen($email);520 $out = '’;521522 for ($i = 0; $i < $len; $i++) {523 $out .= ‘&#’ . ord($email[$i]) . ';’;524 }525526 return $out;527 } // encode_email528529530 // parse shortcode alike variables531 static function parse_vars($string)532 {533 $org_string = $string;534535 $vars = array(536 ‘site-title’ => get_bloginfo(‘name’),537 ‘site-tagline’ => get_bloginfo(‘description’),538 ‘site-description’ => get_bloginfo(‘description’),539 ‘site-url’ => trailingslashit(get_home_url()),540 ‘wp-url’ => trailingslashit(get_site_url()),541 ‘site-login-url’ => get_site_url() . '/wp-login.php’542 );543544 foreach ($vars as $var_name => $var_value) {545 $var_name = '[' . $var_name . ']';546 $string = str_ireplace($var_name, $var_value, $string);547 }548549 $string = apply_filters('ucp_parse_vars’, $string, $org_string, $vars);550551 return $string;552 } // parse_vars553554555 // generate HTML from social icons556 static function generate_social_icons($options, $template_id)557 {558 $out = '’;559560 if (!empty($options[‘social_facebook’])) {561 $out .= '<a title="Facebook” href="’ . esc_attr($options[‘social_facebook’]) . '" target="_blank"><i class="fa fa-facebook-square fa-3x"></i></a>’;562 }563 if (!empty($options[‘social_twitter’])) {564 $out .= ‘<a title="Twitter" href="’ . esc_attr($options[‘social_twitter’]) . '" target="_blank"><i class="fa fa-twitter-square fa-3x"></i></a>’;565 }566 if (!empty($options[‘social_linkedin’])) {567 $out .= ‘<a title="LinkedIn" href="’ . esc_attr($options[‘social_linkedin’]) . '" target="_blank"><i class="fa fa-linkedin-square fa-3x"></i></a>’;568 }569 if (!empty($options[‘social_youtube’])) {570 $out .= ‘<a title="YouTube" href="’ . esc_attr($options[‘social_youtube’]) . '" target="_blank"><i class="fa fa-youtube-square fa-3x"></i></a>’;571 }572 if (!empty($options[‘social_vimeo’])) {573 $out .= ‘<a title="Vimeo" href="’ . esc_attr($options[‘social_vimeo’]) . '" target="_blank"><i class="fa fa-vimeo-square fa-3x"></i></a>’;574 }575 if (!empty($options[‘social_pinterest’])) {576 $out .= ‘<a title="Pinterest" href="’ . esc_attr($options[‘social_pinterest’]) . '" target="_blank"><i class="fa fa-pinterest-square fa-3x"></i></a>’;577 }578 if (!empty($options[‘social_dribbble’])) {579 $out .= ‘<a title="Dribbble" href="’ . esc_attr($options[‘social_dribbble’]) . '" target="_blank"><i class="fa fa-dribbble fa-3x"></i></a>’;580 }581 if (!empty($options[‘social_behance’])) {582 $out .= ‘<a title="Behance" href="’ . esc_attr($options[‘social_behance’]) . '" target="_blank"><i class="fa fa-behance-square fa-3x"></i></a>’;583 }584 if (!empty($options[‘social_instagram’])) {585 $out .= ‘<a title="Instagram" href="’ . esc_attr($options[‘social_instagram’]) . '" target="_blank"><i class="fa fa-instagram fa-3x"></i></a>’;586 }587 if (!empty($options[‘social_tumblr’])) {588 $out .= ‘<a title="Tumblr" href="’ . esc_attr($options[‘social_tumblr’]) . '" target="_blank"><i class="fa fa-tumblr-square fa-3x"></i></a>’;589 }590 if (!empty($options[‘social_vk’])) {591 $out .= ‘<a title="VK" href="’ . esc_attr($options[‘social_vk’]) . '" target="_blank"><i class="fa fa-vk fa-3x"></i></a>’;592 }593 if (!empty($options[‘social_skype’])) {594 $out .= ‘<a title="Skype" href="skype:’ . esc_attr($options[‘social_skype’]) . '?chat"><i class="fa fa-skype fa-3x"></i></a>’;595 }596 if (!empty($options[‘social_whatsapp’])) {597 $out .= ‘<a title="WhatsApp" href="https://api.whatsapp.com/send?phone=’ . str_replace('+’, '’, esc_attr($options[‘social_whatsapp’])) . '"><i class="fa fa-whatsapp fa-3x"></i></a>’;598 }599 if (!empty($options[‘social_telegram’])) {600 $out .= ‘<a title="Telegram" href="’ . esc_attr($options[‘social_telegram’]) . ‘"><i class="fa fa-telegram fa-3x"></i></a>’;601 }602 if (!empty($options[‘social_email’])) {603 $out .= ‘<a title="Email" href="mailto:’ . esc_attr(self::encode_email($options[‘social_email’])) . ‘"><i class="fa fa-envelope fa-3x"></i></a>’;604 }605 if (!empty($options[‘social_phone’])) {606 $out .= ‘<a title="Phone" href="tel:’ . esc_attr($options[‘social_phone’]) . ‘"><i class="fa fa-phone-square fa-3x"></i></a>’;607 }608609 return $out;610 } // generate_social_icons611612613 // shortcode for inserting things in header614 static function generate_head($options, $template_id)615 {616 $out = ‘’;617618 $out .= ‘<link rel="stylesheet" href="’ . trailingslashit(UCP_PLUGIN_URL . ‘themes/css’) . ‘bootstrap.min.css?v=’ . self::$version . ‘" type="text/css">’ . “\n";619 $out .= '<link rel="stylesheet” href="’ . trailingslashit(UCP_PLUGIN_URL . ‘themes/css’) . ‘common.css?v=’ . self::$version . ‘" type="text/css">’ . “\n";620 $out .= '<link rel="stylesheet” href="’ . trailingslashit(UCP_PLUGIN_URL . ‘themes/’ . $template_id) . ‘style.css?v=’ . self::$version . ‘" type="text/css">’ . “\n";621 $out .= '<link rel="stylesheet” href="’ . trailingslashit(UCP_PLUGIN_URL . ‘themes/css’) . ‘font-awesome.min.css?v=’ . self::$version . ‘" type="text/css">’ . “\n";622623 $out .= '<link rel="icon” sizes="128x128" href="’ . trailingslashit(UCP_PLUGIN_URL . ‘themes/images’) . 'favicon.png" />’;624625 if (self::is_weglot_setup()) {626 $out .= ‘<link rel="stylesheet" href="’ . WEGLOT_URL_DIST . ‘/css/front-css.css?v=’ . WEGLOT_VERSION . '" type="text/css">’;627 $out .= ‘<script src="’ . WEGLOT_URL_DIST . ‘/front-js.js?v=’ . WEGLOT_VERSION . ‘"></script>’;628 }629630 if (!empty($options[‘ga_tracking_id’])) {631 $out .= "632 <script>633 (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){634 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),635 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)636 })(window,document,’script’,’https://www.google-analytics.com/analytics.js’,’ga’);637 ga('create’, '{$options[‘ga_tracking_id’]}’, ‘auto’);638 ga('send’, ‘pageview’);639 </script>";640 }641642 if (!empty($options[‘custom_css’])) {643 $out .= “\n” . ‘<style type="text/css">’ . $options[‘custom_css’] . '</style>’;644 }645646 $out = apply_filters('ucp_head’, $out, $options, $template_id);647648 return trim($out);649 } // generate_head650651652 // shortcode for inserting things in footer653 static function generate_footer($options, $template_id)654 {655 $out = '’;656657 if ($options[‘linkback’] == ‘1’) {658 $tmp = md5(get_site_url());659 if ($tmp[0] < ‘4’) {660 $out .= ‘<p id="linkback">Create stunning <a href="’ . self::generate_web_link(‘show-love-1’) . '" target="_blank">under construction pages for WordPress</a>. Completely free.</p>’;661 } elseif ($tmp[0] < ‘8’) {662 $out .= ‘<p id="linkback">Create a <a href="’ . self::generate_web_link(‘show-love-2’) . '" target="_blank">free under construction page for WordPress</a> like this one in under a minute.</p>’;663 } elseif ($tmp[0] < ‘c’) {664 $out .= '<p id="linkback">Join more than 400,000 happy people using the <a href="https://wordpress.org/plugins/under-construction-page/" target="_blank">free Under Construction Page plugin for WordPress</a>.</p>’;665 } else {666 $out .= ‘<p id="linkback">Create free <a href="’ . self::generate_web_link(‘show-love-3’) . '" target="_blank">under construction pages for WordPress</a>.</p>’;667 }668 }669670 if ($options[‘login_button’] == ‘1’) {671 if (is_user_logged_in()) {672 $out .= '<div id="login-button" class="loggedin">’;673 $out .= ‘<a title="’ . esc_attr__('Open WordPress admin’, ‘under-construction-page’) . ‘" href="’ . get_site_url() . '/wp-admin/"><i class="fa fa-wordpress fa-2x" aria-hidden="true"></i></a>’;674 } else {675 $out .= '<div id="login-button" class="loggedout">’;676 $out .= ‘<a title="’ . esc_attr__('Log in to WordPress admin’, ‘under-construction-page’) . ‘" href="’ . get_site_url() . '/wp-login.php"><i class="fa fa-wordpress fa-2x" aria-hidden="true"></i></a>’;677 }678 $out .= '</div>’;679 }680681 $out = apply_filters('ucp_footer’, $out, $options, $template_id);682683 return $out;684 } // generate_footer685686687 // returnes parsed template688 static function get_template($template_id)689 {690 $vars = array();691 $options = self::get_options();692693 $vars[‘version’] = self::$version;694 $vars[‘site-url’] = trailingslashit(get_home_url());695 $vars[‘wp-url’] = trailingslashit(get_site_url());696 $vars[‘theme-url’] = trailingslashit(UCP_PLUGIN_URL . ‘themes/’ . $template_id);697 $vars[‘theme-url-common’] = trailingslashit(UCP_PLUGIN_URL . ‘themes’);698 $vars[‘title’] = self::parse_vars($options[‘title’]);699 $vars[‘generator’] = esc_attr__('Free UnderConstructionPage plugin for WordPress’, ‘under-construction-page’);700 $vars[‘heading1’] = self::parse_vars($options[‘heading1’]);701 $vars[‘content’] = nl2br(self::parse_vars($options[‘content’]));702 $vars[‘description’] = self::parse_vars($options[‘description’]);703 $vars[‘social-icons’] = self::generate_social_icons($options, $template_id);704 $vars[‘head’] = self::generate_head($options, $template_id);705 $vars[‘footer’] = self::generate_footer($options, $template_id);706707 $vars = apply_filters('ucp_get_template_vars’, $vars, $template_id, $options);708709 ob_start();710 require UCP_PLUGIN_DIR . ‘themes/’ . $template_id . '/index.php’;711 $template = ob_get_clean();712713 foreach ($vars as $var_name => $var_value) {714 $var_name = '[' . $var_name . ']';715 $template = str_ireplace($var_name, $var_value, $template);716 }717718 $template = apply_filters('ucp_get_template’, $template, $vars, $options);719720 return $template;721 } // get_template722723724 // checks if construction mode is enabled for the current visitor725 static function is_construction_mode_enabled($settings_only = false)726 {727 $options = self::get_options();728 $current_user = wp_get_current_user();729730 $override_status = apply_filters('ucp_is_construction_mode_enabled’, null, $options);731 if (is_bool($override_status)) {732 return $override_status;733 }734735 // just check if it’s generally enabled736 if ($settings_only) {737 if ($options[‘status’]) {738 return true;739 } else {740 return false;741 }742 } else {743 // check if enabled for current user744 if (!$options[‘status’]) {745 return false;746 } elseif (self::user_has_role($options[‘whitelisted_roles’])) {747 return false;748 } elseif (in_array($current_user->ID, $options[‘whitelisted_users’])) {749 return false;750 } elseif (strlen($options[‘end_date’]) === 16 && $options[‘end_date’] !== ‘0000-00-00 00:00’ && $options[‘end_date’] < current_time(‘mysql’)) {751 return false;752 } else {753 return true;754 }755 }756 } // is_construction_mode_enabled757758759 // check if user has the specified role760 static function user_has_role($roles)761 {762 $current_user = wp_get_current_user();763764 if ($current_user->roles) {765 $user_role = $current_user->roles[0];766 } else {767 $user_role = 'guest’;768 }769770 return in_array($user_role, $roles);771 } // user_has_role772773774 // frontend notification when UCP is enabled but current user is whitelisted775 static function whitelisted_notice()776 {777 $notices = get_option(UCP_NOTICES_KEY);778 $dismiss_url = add_query_arg(array(‘action’ => 'ucp_dismiss_notice’, ‘notice’ => 'whitelisted’, ‘redirect’ => urlencode($_SERVER[‘REQUEST_URI’])), admin_url(‘admin.php’));779780 if (781 empty($notices[‘dismiss_whitelisted’]) &&782 is_user_logged_in() &&783 self::is_construction_mode_enabled(true) &&784 !self::is_construction_mode_enabled(false)785 )786 // keeping everything inline due to minimal CSS787 echo ‘<div style="background-color: #333; line-height: 140%; font-size: 14px; position: fixed; display: block; top: 50px; z-index: 99999; color: #fefefe; padding: 20px 35px 20px 20px; width: 500px; border: thin solid #fefefe; left: -1px;"><a style="color: #ea1919; font-weight: 900; text-decoration: none; position: absolute; top: 7px; right: 10px;" href="’ . esc_url($dismiss_url) . ‘" alt="Dismiss notice" onclick="window.location.href = \’’ . esc_url($dismiss_url) . ‘\’; return false;" title="Dismiss notice">X</a>’ . __('<b>Under Construction Mode is enabled</b> but you are whitelisted so you see the normal site.’, ‘under-construction-page’) . ‘<br><a href="’ . esc_url(get_home_url()) . ‘/?ucp_preview" style="text-decoration: underline; color: #fefefe;">’ . esc_attr__('Preview UnderConstructionPage’, ‘under-construction-page’) . ‘</a><br><a href="’ . esc_url(admin_url(‘options-general.php?page=ucp’)) . ‘" style="text-decoration: underline; color: #fefefe;">’ . esc_attr__('Configure UnderConstructionPage’, ‘under-construction-page’) . '</a></div>’;788 } // whitelisted_notification789790791 // displays various notices in admin header792 static function admin_notices()793 {794 $notices = get_option(UCP_NOTICES_KEY);795 $options = self::get_options();796 $meta = self::get_meta();797 $current_user = wp_get_current_user();798 $shown = false;799 $promo = self::is_promo_active();800801 $name = '’;802 if (!empty($current_user->user_firstname)) {803 $name = ' ' . $current_user->user_firstname;804 }805806 // pro activated - update807 if (self::is_plugin_page() && UCP_license::is_activated()) {808 echo '<div id="ucp_update_pro" class="notice-error notice">’;809 echo '<p class="center">Thank you for purchasing UnderConstructionPage PRO! <b>Your license has been verified and activated.</b><br>To start using the PRO version, please follow these steps:</p>’;810 echo '<ol>’;811 echo '<li><a href="https://underconstructionpage.com/pro-download/" target="_blank">Download</a> the latest version of the PRO plugin.</li>’;812 echo ‘<li>Go to <a href="’ . admin_url(‘plugin-install.php’) . '">Plugins - Add New - Upload Plugin</a> and upload the ZIP you just downloaded.</li>’;813 echo '<li>If asked to replace (overwrite) the free version - confirm it.</li>’;814 echo '<li>Activate the plugin.</li>’;815 echo '<li>That\’s it, no more steps.</li>’;816 echo '</ol>’;817 echo '</div>’;818 $shown = true;819820 return;821 }822823 // ask for rating; disabled824 if (825 false && empty($notices[‘dismiss_rate’]) &&826 (time() - $meta[‘first_install’]) > (DAY_IN_SECONDS * 1.0)827 ) {828 $rate_url = 'https://wordpress.org/support/plugin/under-construction-page/reviews/#new-post’;829 $dismiss_url = add_query_arg(array(‘action’ => 'ucp_dismiss_notice’, ‘notice’ => 'rate’, ‘redirect’ => urlencode($_SERVER[‘REQUEST_URI’])), admin_url(‘admin.php’));830831 echo ‘<div id="ucp_rate_notice" class="notice-info notice"><p>Hi’ . esc_html($name) . '!<br>We saw you\’ve been using the <b class="ucp-logo" style="font-weight: bold;">UnderConstructionPage</b> plugin for a few days (that\’s awesome!) and wanted to ask for your help to <b>make the plugin better</b>.<br>We just need a minute of your time to rate the plugin. It helps us out a lot!’;832833 echo ‘<br><a target="_blank" href="’ . esc_url($rate_url) . ‘" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">’ . esc_attr__('Help make the plugin better by rating it’, ‘under-construction-page’) . ‘</a>’;834 echo '    <a href="’ . esc_url($dismiss_url) . ‘">’ . esc_attr__('I\’ve already rated the plugin’, ‘under-construction-page’) . '</a>’;835 echo ‘<br><br><b>’ . esc_attr__('Thank you very much! The UCP team’, ‘under-construction-page’) . '</b>’;836 echo '</p></div>’;837 $shown = true;838 }839840 // end date in past841 if (self::is_plugin_page() && self::is_construction_mode_enabled(true) && !empty($options[‘end_date’]) && $options[‘end_date’] != ‘0000-00-00 00:00’ && $options[‘end_date’] < current_time(‘mysql’)) {842 echo '<div id="ucp_end_date_notice" class="notice-error notice"><p>Under construction mode is enabled but the <a href="#end_date" class="change_tab" data-tab="0">end date</a> is set to a past date so the <b>under construction page will not be shown</b>. Either move the <a href="#end_date" class="change_tab" data-tab="0">end date</a> to a future date or disable it.</p></div>’;843 $shown = true;844 }845846 // ask for translation847 // disabled till further notice848 if (849 false && self::is_plugin_page() &&850 empty($notices[‘dismiss_translate’]) &&851 (time() - $meta[‘first_install’]) > 1852 ) {853 $translate_url = self::generate_web_link('translate-notification’, ‘translate-the-plugin/’);854 $dismiss_url = add_query_arg(array(‘action’ => 'ucp_dismiss_notice’, ‘notice’ => 'translate’, ‘redirect’ => urlencode($_SERVER[‘REQUEST_URI’])), admin_url(‘admin.php’));855856 echo ‘<div id="ucp_rate_notice" class="notice-info notice"><p>Hi’ . esc_html($name) . ',<br>Help us translate UCP into your language and <b>get a PRO license for free</b>!<br>We want to make <b class="ucp-logo" style="font-weight: bold;">UnderConstructionPage</b> accessible to as many users as possible by translating it into their language. And we need your help!’;857858 echo ‘<br><a target="_blank" href="’ . esc_url($translate_url) . ‘" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">’ . esc_attr__('Translate UCP into your language & get a PRO license for free’, ‘under-construction-page’) . ‘</a>’;859 echo '    <a href="’ . esc_url($dismiss_url) . ‘">’ . esc_attr__('I\’m not interested (remove this notice)', ‘under-construction-page’) . '</a>’;860 echo '</p></div>’;861 $shown = true;862 }863864 // promo for new users865 if (866 self::is_plugin_page() &&867 empty($notices[‘dismiss_welcome’]) &&868 !$shown && $promo == 'welcome’869 ) {870 $dismiss_url = add_query_arg(array(‘action’ => 'ucp_dismiss_notice’, ‘notice’ => 'welcome’, ‘redirect’ => urlencode($_SERVER[‘REQUEST_URI’])), admin_url(‘admin.php’));871872 echo ‘<div id="ucp_rate_notice" class="notice-info notice"><p>Hi’ . esc_html($name) . ',<br>’;873 echo 'We have a <a class="open-ucp-upsell" data-pro-ad="notification-welcome-text" href="#">special time-sensitive offer</a> available just for another <b class="ucp-countdown">59min</b>! A <b>20% DISCOUNT</b> on our most popular lifetime licenses!<br>No nonsense! Pay once and use the plugin forever. <a class="open-ucp-upsell" data-pro-ad="notification-welcome-text2" href="#">Get</a> more than 50+ extra features, 250+ premium themes and over two million professional images.</p>’;874875 echo ‘<a href="#" class="button-primary open-ucp-upsell" data-pro-ad="notification-welcome-button">Upgrade to PRO now with a SPECIAL 20% WELCOME DISCOUNT</a>’;876 echo '    <a href="’ . esc_url($dismiss_url) . ‘"><small>’ . esc_attr__('I\’m not interested (remove this notice)', ‘under-construction-page’) . '</small></a>’;877 echo '</p></div>’;878 $shown = true;879 }880881 // promo for old users882 if (883 self::is_plugin_page() &&884 empty($notices[‘dismiss_olduser’]) &&885 !$shown && $promo == 'olduser’886 ) {887 $dismiss_url = add_query_arg(array(‘action’ => 'ucp_dismiss_notice’, ‘notice’ => 'olduser’, ‘redirect’ => urlencode($_SERVER[‘REQUEST_URI’])), admin_url(‘admin.php’));888889 echo ‘<div id="ucp_rate_notice" class="notice-info notice"><p>Hi’ . esc_html($name) . ',<br>’;890 echo 'We have a <a class="open-ucp-upsell" data-pro-ad="notification-olduser-text" href="#">special offer</a> only for <b>users like you</b> who\’ve been using the UnderConstructionPage for a longer period of time: a <b>special DISCOUNT</b> on our most popular lifetime licenses!<br>No nonsense! Pay once and use the plugin forever.<br><a class="open-ucp-upsell" data-pro-ad="notification-olduser-text" href="#">Upgrade now</a> to <b>PRO</b> & get more than 50+ extra features, 220+ premium themes and over two million HD images.</p>’;891892 echo ‘<a href="#" class="button-primary open-ucp-upsell" data-pro-ad="notification-olduser-button">Upgrade to PRO now with a SPECIAL DISCOUNT</a>’;893 echo '    <a href="’ . esc_url($dismiss_url) . ‘"><small>’ . esc_attr__('I\’m not interested (remove this notice)', ‘under-construction-page’) . '</small></a>’;894 echo '</p></div>’;895 $shown = true;896 }897 } // notices898899900 // handle dismiss button for notices901 static function dismiss_notice()902 {903 if (empty($_GET[‘notice’])) {904 wp_safe_redirect(admin_url());905 exit;906 }907908 $notices = get_option(UCP_NOTICES_KEY, array());909 $notice = sanitize_text_field($_GET[‘notice’]);910911 if ($notice == ‘rate’) {912 $notices[‘dismiss_rate’] = true;913 } elseif ($notice == ‘translate’) {914 $notices[‘dismiss_translate’] = true;915 } elseif ($notice == ‘whitelisted’) {916 $notices[‘dismiss_whitelisted’] = true;917 } elseif ($notice == ‘olduser’) {918 $notices[‘dismiss_olduser’] = true;919 } elseif ($notice == ‘welcome’) {920 $notices[‘dismiss_welcome’] = true;921 } else {922 wp_safe_redirect(admin_url());923 exit;924 }925926 update_option(UCP_NOTICES_KEY, $notices);927928 if (!empty($_GET[‘redirect’])) {929 wp_safe_redirect($_GET[‘redirect’]);930 } else {931 wp_safe_redirect(admin_url());932 }933934 exit;935 } // dismiss_notice936937938 // reset all settings to default values939 static function reset_settings()940 {941 check_admin_referer(‘ucp_reset_settings’);942943 if (false === current_user_can(‘administrator’)) {944 wp_safe_redirect(admin_url());945 exit;946 }947948 $options = self::default_options();949 update_option(UCP_OPTIONS_KEY, $options);950951 if (!empty($_GET[‘redirect’])) {952 wp_safe_redirect($_GET[‘redirect’]);953 } else {954 wp_safe_redirect(admin_url());955 }956957 exit;958 } // reset_settings959960961 // change status via admin bar962 static function change_status()963 {964 check_admin_referer(‘ucp_change_status’);965966 if (false === current_user_can(‘administrator’) || empty($_GET[‘new_status’])) {967 wp_safe_redirect(admin_url());968 exit;969 }970971 $options = self::get_options();972973 if (sanitize_text_field($_GET[‘new_status’]) == ‘enabled’) {974 $options[‘status’] = '1’;975 } else {976 $options[‘status’] = '0’;977 }978979 update_option(UCP_OPTIONS_KEY, $options);980981 if (!empty($_GET[‘redirect’])) {982 wp_safe_redirect($_GET[‘redirect’]);983 } else {984 wp_safe_redirect(admin_url());985 }986987 exit;988 } // change_status989990991 static function admin_bar_style()992 {993 // admin bar has to be anabled, user an admin and custom filter true994 if (false === is_admin_bar_showing() || false === current_user_can(‘administrator’) || false === apply_filters('ucp_show_admin_bar’, true)) {995 return;996 }997998 // no sense in loading a new CSS file for 2 lines of CSS999 echo '<style type="text/css">’;1000 $custom_css = '#wpadminbar ul li#wp-admin-bar-ucp-info { padding: 5px 0; } #wpadminbar ul li#wp-admin-bar-ucp-settings, #wpadminbar ul li#wp-admin-bar-ucp-status { padding-bottom: 2px; } #wpadminbar i.ucp-status-dot { font-size: 17px; margin-top: -7px; color: #02ca02; height: 17px; display: inline-block; } #wpadminbar i.ucp-status-dot-enabled { color: #87c826; } #wpadminbar i.ucp-status-dot-disabled { color: #ea1919; } #wpadminbar #ucp-status-wrapper { display: inline; border: 1px solid rgba(240,245,250,.7); padding: 0; margin: 0 0 0 5px; background: rgb(35, 40, 45); } #wpadminbar .ucp-status-btn { padding: 0 7px; color: #fff; } #wpadminbar #ucp-status-wrapper.off #ucp-status-off { background: #ea1919;} #wpadminbar #ucp-status-wrapper.on #ucp-status-on { background: #66b317; }#wp-admin-bar-under-construction-page img.logo { height: 17px; margin-bottom: 4px; padding-right: 3px; } body.wp-admin #wp-admin-bar-under-construction-page img.logo { margin-bottom: -4px; }’;1001 self::wp_kses_wf($custom_css);1002 echo '</style>’;1003 } // admin_bar_style100410051006 // add admin bar menu and status1007 static function admin_bar()1008 {1009 global $wp_admin_bar;10101011 // only show to admins1012 if (false === current_user_can(‘administrator’) || false === apply_filters('ucp_show_admin_bar’, true)) {1013 return;1014 }10151016 if (self::is_construction_mode_enabled(true)) {1017 $main_label = ‘<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="’ . UCP_PLUGIN_URL . ‘images/ucp_icon.png" alt="’ . esc_attr__('Under construction mode is enabled’, ‘under-construction-page’) . ‘" title="’ . esc_attr__('Under construction mode is enabled’, ‘under-construction-page’) . ‘"> <span class="ab-label">’ . esc_attr__('UnderConstruction’, ‘under-construction-page’) . ' <i class="ucp-status-dot ucp-status-dot-enabled">●</i></span>’;1018 $class = 'ucp-enabled’;1019 $action_url = add_query_arg(array(‘action’ => 'ucp_change_status’, ‘new_status’ => 'disabled’, ‘redirect’ => urlencode($_SERVER[‘REQUEST_URI’])), admin_url(‘admin.php’));1020 $action_url = wp_nonce_url($action_url, ‘ucp_change_status’);1021 $action = esc_attr__('Under Construction Mode’, ‘under-construction-page’);1022 $action .= ‘<a href="’ . $action_url . '" id="ucp-status-wrapper" class="on"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>’;1023 } else {1024 $main_label = ‘<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="’ . UCP_PLUGIN_URL . ‘images/ucp_icon.png" alt="’ . esc_attr__('Under construction mode is disabled’, ‘under-construction-page’) . ‘" title="’ . esc_attr__('Under construction mode is disabled’, ‘under-construction-page’) . ‘"> <span class="ab-label">’ . esc_attr__('UnderConstruction’, ‘under-construction-page’) . ' <i class="ucp-status-dot ucp-status-dot-disabled">●</i></span>’;1025 $class = 'ucp-disabled’;1026 $action_url = add_query_arg(array(‘action’ => 'ucp_change_status’, ‘new_status’ => 'enabled’, ‘redirect’ => urlencode($_SERVER[‘REQUEST_URI’])), admin_url(‘admin.php’));1027 $action_url = wp_nonce_url($action_url, ‘ucp_change_status’);1028 $action = esc_attr__('Under Construction Mode’, ‘under-construction-page’);1029 $action .= ‘<a href="’ . $action_url . '" id="ucp-status-wrapper" class="off"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>’;1030 }10311032 $wp_admin_bar->add_menu(array(1033 ‘parent’ => '’,1034 ‘id’ => 'under-construction-page’,1035 ‘title’ => $main_label,1036 ‘href’ => admin_url(‘options-general.php?page=ucp’),1037 ‘meta’ => array(‘class’ => $class)1038 ));1039 $wp_admin_bar->add_node(array(1040 ‘id’ => 'ucp-status’,1041 ‘title’ => $action,1042 ‘href’ => false,1043 ‘parent’ => 'under-construction-page’1044 ));1045 $wp_admin_bar->add_node(array(1046 ‘id’ => 'ucp-preview’,1047 ‘title’ => esc_attr__('Preview’, ‘under-construction-page’),1048 ‘meta’ => array(‘target’ => ‘blank’),1049 ‘href’ => get_home_url() . '/?ucp_preview’,1050 ‘parent’ => 'under-construction-page’1051 ));1052 $wp_admin_bar->add_node(array(1053 ‘id’ => 'ucp-settings’,1054 ‘title’ => esc_attr__('Settings’, ‘under-construction-page’),1055 ‘href’ => admin_url(‘options-general.php?page=ucp’),1056 ‘parent’ => 'under-construction-page’1057 ));1058 } // admin_bar105910601061 // show under construction notice on WP login form1062 static function login_message($message)1063 {1064 if (self::is_construction_mode_enabled(true)) {1065 $message .= ‘<div class="message">’ . __('Under Construction Mode is <b>enabled</b>.’, ‘under-construction-page’) . '</div>’;1066 }10671068 return $message;1069 } // login_notice107010711072 // add settings link to plugins page1073 static function plugin_action_links($links)1074 {1075 $settings_link = ‘<a href="’ . admin_url(‘options-general.php?page=ucp’) . ‘" title="’ . esc_attr__('UnderConstruction Settings’, ‘under-construction-page’) . ‘">’ . esc_attr__('Settings’, ‘under-construction-page’) . '</a>’;1076 $pro_link = ‘<a target="_blank" href="’ . self::generate_web_link(‘plugins-table-left’) . ‘" title="’ . esc_attr__('Get PRO’, ‘under-construction-page’) . ‘">’ . __('Go <b>PRO</b>’, ‘under-construction-page’) . '</a>’;10771078 array_unshift($links, $pro_link);1079 array_unshift($links, $settings_link);10801081 return $links;1082 } // plugin_action_links108310841085 // add links to plugin’s description in plugins table1086 static function plugin_meta_links($links, $file)1087 {1088 $support_link = ‘<a target="_blank" href="https://wordpress.org/support/plugin/under-construction-page" title="’ . esc_attr__('Get help’, ‘under-construction-page’) . ‘">’ . esc_attr__('Support’, ‘under-construction-page’) . '</a>’;1089 $pro_link = ‘<a target="_blank" href="’ . self::generate_web_link(‘plugins-table-right’) . ‘" title="’ . esc_attr__('Get PRO’, ‘under-construction-page’) . ‘">’ . __('Get the <b>PRO</b> version’, ‘under-construction-page’) . '</a>’;109010911092 if ($file == plugin_basename(__FILE__)) {1093 $links[] = $support_link;1094 $links[] = $pro_link;1095 }10961097 return $links;1098 } // plugin_meta_links109911001101 // additional powered by text in admin footer; only on UCP page1102 static function admin_footer_text($text)1103 {1104 if (!self::is_plugin_page()) {1105 return $text;1106 }11071108 $text = ‘<i><a href="’ . self::generate_web_link(‘admin-footer’) . ‘" title="’ . esc_attr__('Visit UCP\’s site for more info’, ‘under-construction-page’) . ‘" target="_blank">’ . esc_attr__(‘UnderConstructionPage’, ‘under-construction-page’) . ‘</a> v’ . self::$version . ' by <a href="https://www.webfactoryltd.com/" title="’ . esc_attr__('Visit our site to get more great plugins’, ‘under-construction-page’) . ‘" target="_blank">’ . esc_attr__('WebFactory Ltd’, ‘under-construction-page’) . '</a>. Please <a target="_blank" href="https://wordpress.org/support/plugin/under-construction-page/reviews/#new-post" title="Rate the plugin">rate the plugin <span>★★★★★</span></a> to help us spread the word. Thank you!</i>’;11091110 return $text;1111 } // admin_footer_text111211131114 // fix for opening the plugin install modal1115 static function admin_footer()1116 {1117 if (empty($_GET[‘fix-install-button’]) || empty($_GET[‘tab’]) || sanitize_text_field($_GET[‘tab’]) != ‘plugin-information’) {1118 return;1119 }11201121 echo '<script>’;1122 echo “jQuery(‘#plugin_install_from_iframe’).on('click’, function() { window.location.href = jQuery(this).attr(‘href’); return false;});";1123 echo '</script>’;1124 } // admin_footer112511261127 // test if we’re on plugin’s page1128 static function is_plugin_page()1129 {1130 $current_screen = get_current_screen();11311132 if ($current_screen->id == ‘settings_page_ucp’) {1133 return true;1134 } else {1135 return false;1136 }1137 } // is_plugin_page113811391140 // create the admin menu item1141 static function admin_menu()1142 {1143 add_options_page(esc_attr__('UnderConstruction’, ‘under-construction-page’), esc_attr__('UnderConstruction’, ‘under-construction-page’), 'manage_options’, 'ucp’, array(__CLASS__, ‘main_page’));1144 } // admin_menu114511461147 // all settings are saved in one option1148 static function register_settings()1149 {1150 register_setting(UCP_OPTIONS_KEY, UCP_OPTIONS_KEY, array(__CLASS__, ‘sanitize_settings’));1151 } // register_settings115211531154 // set default settings1155 static function default_options()1156 {1157 $defaults = array(1158 ‘status’ => '0’,1159 ‘license_key’ => '’,1160 ‘license_active’ => false,1161 ‘license_expires’ => '1900-01-01’,1162 ‘license_type’ => '’,1163 ‘end_date’ => '’,1164 ‘ga_tracking_id’ => '’,1165 ‘theme’ => 'mad_designer’,1166 ‘custom_css’ => '’,1167 ‘title’ => '[site-title] is under construction’,1168 ‘description’ => '[site-tagline]',1169 ‘heading1’ => esc_attr__('Sorry, we\’re doing some work on the site’, ‘under-construction-page’),1170 ‘content’ => esc_attr__('Thank you for being patient. We are doing some work on the site and will be back shortly.’, ‘under-construction-page’),1171 ‘social_facebook’ => '’,1172 ‘social_twitter’ => '’,1173 ‘social_linkedin’ => '’,1174 ‘social_youtube’ => '’,1175 ‘social_vimeo’ => '’,1176 ‘social_pinterest’ => '’,1177 ‘social_dribbble’ => '’,1178 ‘social_behance’ => '’,1179 ‘social_instagram’ => '’,1180 ‘social_tumblr’ => '’,1181 ‘social_vk’ => '’,1182 ‘social_email’ => '’,1183 ‘social_phone’ => '’,1184 ‘social_skype’ => '’,1185 ‘social_telegram’ => '’,1186 ‘social_whatsapp’ => '’,1187 ‘login_button’ => '1’,1188 ‘linkback’ => '0’,1189 ‘whitelisted_roles’ => array(‘administrator’),1190 ‘whitelisted_users’ => array()1191 );11921193 return $defaults;1194 } // default_options119511961197 // sanitize settings on save1198 static function sanitize_settings($options)1199 {1200 $old_options = self::get_options();12011202 foreach ($options as $key => $value) {1203 switch ($key) {1204 case 'title’:1205 case 'description’:1206 $options[$key] = trim(strip_tags($value));1207 break;1208 case 'heading1’:1209 case 'content’:1210 $options[$key] = trim(wp_kses($value, wp_kses_allowed_html(‘post’)));1211 break;1212 case 'custom_css’:1213 case 'social_facebook’:1214 case 'social_twitter’:1215 case 'social_linkedin’:1216 case 'social_youtube’:1217 case 'social_vimeo’:1218 case 'social_pinterest’:1219 case 'social_dribbble’:1220 case 'social_behance’:1221 case 'social_instagram’:1222 case 'social_tumblr’:1223 case 'social_vk’:1224 case 'social_email’:1225 case 'social_phone’:1226 case 'social_telegram’:1227 case 'social_whatsapp’:1228 case 'license_key’:1229 $options[$key] = trim(strip_tags($value));1230 break;1231 case 'ga_tracking_id’:1232 $options[$key] = substr(strtoupper(trim($value)), 0, 15);1233 break;1234 case 'end_date’:1235 $options[$key] = substr(trim($value), 0, 16);1236 break;1237 } // switch1238 } // foreach12391240 $options[‘title’] = strip_tags($options[‘title’]);1241 $options[‘description’] = strip_tags($options[‘description’]);1242 $options[‘heading1’] = strip_tags($options[‘heading1’], ‘<br><a><b><strong><i><em><p><del><img>’);1243 $options[‘content’] = strip_tags($options[‘content’], ‘<br><a><b><strong><i><em><p><del><img><ul><ol><li><blockquote><ins><code><hr><h2><h3><h4><span><div><iframe>’);12441245 $options[‘whitelisted_roles’] = empty($options[‘whitelisted_roles’]) ? array() : $options[‘whitelisted_roles’];1246 $options[‘whitelisted_users’] = empty($options[‘whitelisted_users’]) ? array() : $options[‘whitelisted_users’];1247 $options = self::check_var_isset($options, array(‘status’ => 0, ‘linkback’ => 0, ‘login_button’ => 0));12481249 if (empty($options[‘end_date_toggle’])) {1250 $options[‘end_date’] = '’;1251 }1252 if ($options[‘end_date’] == ‘0000-00-00 00:00’) {1253 $options[‘end_date’] = '’;1254 }1255 unset($options[‘end_date_toggle’]);12561257 if (empty($options[‘ga_tracking_toggle’])) {1258 $options[‘ga_tracking_id’] = '’;1259 }1260 if (!empty($options[‘ga_tracking_id’]) && preg_match('/^UA-\d{3,}-\d{1,3}$/’, $options[‘ga_tracking_id’]) === 0) {1261 add_settings_error('ucp’, 'ga_tracking_id’, esc_attr__('Please enter a valid Google Analytics Tracking ID or disable tracking.’, ‘under-construction-page’));1262 }1263 unset($options[‘ga_tracking_toggle’]);12641265 if (!empty($_POST[‘license-submit’])) {1266 if (empty($options[‘license_key’])) {1267 $options[‘license_type’] = '’;1268 $options[‘license_expires’] = '1900-01-01’;1269 $options[‘license_active’] = false;1270 $options[‘license_key’] = '’;1271 add_settings_error(UCP_OPTIONS_KEY, 'license_key’, esc_attr__('License key saved.’, ‘under-construction-page’), ‘updated’);1272 } else {1273 $tmp = UCP_license::validate_license_key($options[‘license_key’]);1274 if ($tmp[‘success’]) {1275 $options[‘license_type’] = $tmp[‘license_type’];1276 $options[‘license_expires’] = $tmp[‘license_expires’];1277 $options[‘license_active’] = $tmp[‘license_active’];1278 if ($tmp[‘license_active’]) {1279 add_settings_error(UCP_OPTIONS_KEY, 'license_key’, esc_attr__('License key saved and activated!’, ‘under-construction-page’), ‘updated’);1280 } else {1281 add_settings_error(UCP_OPTIONS_KEY, 'license_key’, 'License not active. ' . $tmp[‘error’], ‘error’);1282 }1283 } else {1284 add_settings_error(UCP_OPTIONS_KEY, 'license_key’, 'Unable to contact licensing server. Please try again in a few moments.’, ‘error’);1285 }1286 }1287 } // update license12881289 // empty cache in 3rd party plugins1290 if ($options != $old_options) {1291 $notices = get_option(UCP_NOTICES_KEY);1292 unset($notices[‘dismiss_whitelisted’]);1293 update_option(UCP_NOTICES_KEY, $notices);1294 self::empty_cache();1295 }12961297 return array_merge($old_options, $options);1298 } // sanitize_settings129913001301 static function empty_cache()1302 {1303 wp_cache_flush();1304 if (function_exists(‘w3tc_flush_all’)) {1305 w3tc_flush_all();1306 }1307 if (function_exists(‘wp_cache_clear_cache’)) {1308 wp_cache_clear_cache();1309 }1310 if (method_exists('LiteSpeed_Cache_API’, ‘purge_all’)) {1311 LiteSpeed_Cache_API::purge_all();1312 }1313 if (class_exists(‘Endurance_Page_Cache’)) {1314 $epc = new Endurance_Page_Cache;1315 $epc->purge_all();1316 }1317 if (class_exists(‘SG_CachePress_Supercacher’) && method_exists('SG_CachePress_Supercacher’, ‘purge_cache’)) {1318 SG_CachePress_Supercacher::purge_cache(true);1319 }1320 if (class_exists(‘SiteGround_Optimizer\Supercacher\Supercacher’)) {1321 SiteGround_Optimizer\Supercacher\Supercacher::purge_cache();1322 }1323 if (isset($GLOBALS[‘wp_fastest_cache’]) && method_exists($GLOBALS[‘wp_fastest_cache’], ‘deleteCache’)) {1324 $GLOBALS[‘wp_fastest_cache’]->deleteCache(true);1325 }1326 if (is_callable(array('Swift_Performance_Cache’, ‘clear_all_cache’))) {1327 Swift_Performance_Cache::clear_all_cache();1328 }1329 if (is_callable(array('Hummingbird\WP_Hummingbird’, ‘flush_cache’))) {1330 Hummingbird\WP_Hummingbird::flush_cache(true, false);1331 }1332 if (function_exists(‘rocket_clean_domain’)) {1333 rocket_clean_domain();1334 }1335 do_action(‘cache_enabler_clear_complete_cache’);1336 } // empty_cache133713381339 // checkbox helper function1340 static function checked($value, $current, $echo = false)1341 {1342 $out = '’;13431344 if (!is_array($current)) {1345 $current = (array) $current;1346 }13471348 if (in_array($value, $current)) {1349 $out = ' checked="checked” ';1350 }13511352 if ($echo) {1353 self::wp_kses_wf($out);1354 } else {1355 return $out;1356 }1357 } // checked135813591360 // helper function for saving options, mostly checkboxes1361 static function check_var_isset($values, $variables)1362 {1363 foreach ($variables as $key => $value) {1364 if (!isset($values[$key])) {1365 $values[$key] = $value;1366 }1367 }13681369 return $values;1370 } // check_var_isset137113721373 // helper function for creating dropdowns1374 static function create_select_options($options, $selected = null, $output = true)1375 {1376 $out = “\n";13771378 if (!is_array($selected)) {1379 $selected = array($selected);1380 }13811382 foreach ($options as $tmp) {1383 $data = '’;1384 if (isset($tmp[‘disabled’])) {1385 $data .= ' disabled="disabled” ‘;1386 }1387 if (in_array($tmp[‘val’], $selected)) {1388 $out .= “<option selected=\"selected\” value=\"{$tmp[‘val’]}\"{$data}>{$tmp[‘label’]} </option>\n";1389 } else {1390 $out .= “<option value=\"{$tmp[‘val’]}\"{$data}>{$tmp[‘label’]} </option>\n";1391 }1392 } // foreach13931394 if ($output) {1395 UCP::wp_kses_wf($out);1396 } else {1397 return $out;1398 }1399 } // create_select_options140014011402 // helper function to generate tagged buy links1403 static function generate_web_link($placement = '’, $page = '/’, $params = array(), $anchor = ‘’)1404 {1405 $base_url = 'https://underconstructionpage.com’;14061407 if (‘/’ != $page) {1408 $page = ‘/’ . trim($page, ‘/’) . '/’;1409 }1410 if ($page == ‘//’) {1411 $page = '/’;1412 }14131414 if ($placement) {1415 $placement = trim($placement, '-');1416 $placement = '-' . $placement;1417 }14181419 $parts = array_merge(array(‘ref’ => ‘ucp-free’ . $placement), $params);14201421 if (!empty($anchor)) {1422 $anchor = ‘#’ . trim($anchor, ‘#’);1423 }14241425 $out = $base_url . $page . ‘?’ . http_build_query($parts, '’, ‘&’) . $anchor;14261427 return $out;1428 } // generate_web_link142914301431 // first, main tab content1432 static function tab_main()1433 {1434 $options = self::get_options();1435 $default_options = self::default_options();14361437 echo '<div class="ucp-tab-content">’;1438 echo '<table class="form-table">’;14391440 echo ‘<tr valign="top">1441 <th scope="row"><label for="status">’ . esc_attr__('Under Construction Mode’, ‘under-construction-page’) . '</label></th>1442 <td>’;14431444 echo '<div class="toggle-wrapper” id="main-status">1445 <input type="checkbox" id="status" ' . esc_attr(self::checked(1, $options[‘status’])) . ' type="checkbox" value="1" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[status]“>1446 <label for="status” class="toggle"><span class="toggle_handler"></span></label>1447 </div>’;14481449 echo ‘<p class="description">’ . __('By enabling construction mode users will not be able to access the site\’s content. They will only see the under construction page. To configure exceptions set <a class="change_tab" data-tab="3" href="#whitelisted-roles">whitelisted user roles</a>.’, ‘under-construction-page’) . '</p>’;1450 echo '</td></tr>’;14511452 echo ‘<tr valign="top">1453 <th scope="row"><label for="search_engines">’ . esc_attr__('Prevent Search Engines from Indexing the Temporary Site’, ‘under-construction-page’) . '</label></th>1454 <td>’;1455 echo '<div class="toggle-wrapper">1456 <input type="checkbox" id="search_engines" type="checkbox" value="1" class="skip-save open-ucp-upsell">1457 <label for="search_engines" class="toggle"><span class="toggle_handler"></span></label>1458 </div>’;14591460 echo ‘<p class="description">’ . __('While performing maintenance or having any temporary content displayed, it is favorable for SEO to prevent search engines from indexing the temporaray site. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="search_engines_text">PRO feature</a>.’, ‘under-construction-page’) . '</p>’;1461 echo '</td></tr>’;14621463 echo ‘<tr valign="top">1464 <th scope="row"><label for="end_date_toggle">’ . esc_attr__('Automatic End Date & Time’, ‘under-construction-page’) . ‘</label></th>1465 <td>’;1466 echo ‘<div class="toggle-wrapper">1467 <input type="checkbox" id="end_date_toggle" ' . esc_attr(self::checked(1, (empty($options[‘end_date’]) || $options[‘end_date’] == ‘0000-00-00 00:00’) ? 0 : 1)) . ' type="checkbox" value="1" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[end_date_toggle]“>1468 <label for="end_date_toggle” class="toggle"><span class="toggle_handler"></span></label>1469 </div>’;1470 echo ‘<div id="end_date_wrapper"><input id="end_date" type="text" class="datepicker" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[end_date]" value="’ . esc_attr($options[‘end_date’]) . ‘" placeholder="yyyy-mm-dd hh:mm"><span title="’ . esc_attr__('Open date & time picker’, ‘under-construction-page’) . ‘" alt="’ . esc_attr__('Open date & time picker’, ‘under-construction-page’) . ‘" class="show-datepicker dashicons dashicons-calendar-alt"></span>’;1471 echo ‘<p class="description">’ . esc_attr__(‘If enabled, construction mode will automatically stop showing on the selected date.1472 This option will not “auto-enable” construction mode. Status has to be set to “On".’, ‘under-construction-page’) . '</p></div>’;1473 echo '</td></tr>’;14741475 echo ‘<tr valign="top">1476 <th scope="row"><label for="ga_tracking_id_toggle">’ . esc_attr__('Google Analytics Tracking’, ‘under-construction-page’) . '</label></th>1477 <td>’;1478 echo '<div class="toggle-wrapper">1479 <input type="checkbox” id="ga_tracking_id_toggle" ' . esc_attr(self::checked(1, empty($options[‘ga_tracking_id’]) ? 0 : 1)) . ' type="checkbox" value="1" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[ga_tracking_toggle]“>1480 <label for="ga_tracking_id_toggle” class="toggle"><span class="toggle_handler"></span></label>1481 </div>’;1482 echo ‘<div id="ga_tracking_id_wrapper"><input id="ga_tracking_id" type="text" class="code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[ga_tracking_id]" value="’ . esc_attr($options[‘ga_tracking_id’]) . '" placeholder="UA-xxxxxx-xx">’;1483 echo ‘<p class="description">’ . esc_attr__('Enter the unique tracking ID found in your GA tracking profile settings to track visits to pages.’, ‘under-construction-page’) . '</p></div>’;1484 echo '</td></tr>’;14851486 $reset_url = add_query_arg(array(‘action’ => 'ucp_reset_settings’, ‘redirect’ => urlencode($_SERVER[‘REQUEST_URI’])), admin_url(‘admin.php’));1487 $reset_url = wp_nonce_url($reset_url, ‘ucp_reset_settings’);1488 echo ‘<tr valign="top">1489 <th scope="row"><label for="">’ . esc_attr__('Reset Settings’, ‘under-construction-page’) . '</label></th>1490 <td>’;1491 echo ‘<a href="’ . esc_url($reset_url) . ‘" class="button button-secondary reset-settings">’ . esc_attr__('Reset all settings to default values’, ‘under-construction-page’) . '</a>’;1492 echo ‘<p class="description">’ . esc_attr__('By resetting all settings to their default values any customizations you have done will be lost. There is no undo.’, ‘under-construction-page’) . '</p>’;1493 echo '</td></tr>’;14941495 echo '</table>’;1496 echo '</div>’;14971498 self::footer_buttons();1499 } // tab_main150015011502 static function tab_content()1503 {1504 global $wpdb;1505 $options = self::get_options();1506 $default_options = self::default_options();15071508 echo '<div class="ucp-tab-content">’;15091510 if (!self::is_weglot_active()) {1511 echo '<div class="ucp-notice-small"><p><b>NEW</b> - Make your under construction page and your website <b>multilingual</b> with the Weglot Translate plugin.<br>To enable this feature, <a href="#" class="open-weglot-upsell">install the Weglot Translate freemium plugin</a>.’;1512 echo '</p></div>’;1513 }15141515 echo '<table class="form-table">’;15161517 if (self::is_weglot_active()) {1518 echo '<tr id="weglot-settings">’;1519 echo '<th><label for="weglot_lang">Multilingual Support</label></th>’;1520 echo '<td>’;152115221523 if (self::is_weglot_setup()) {1524 $tmp = '’;1525 $active_languages = weglot_get_destination_languages();1526 $languages = weglot_get_languages_available();1527 $original_language = weglot_get_original_language();1528 echo ‘<p>Your under construction page is currently available in the following languages.<br>To add more languages and configure translations open <a href="’ . esc_url(admin_url(‘admin.php?page=weglot-settings’)) . '">Weglot settings</a>.</p>’;1529 echo ‘<ul class="ucp-list">’;1530 foreach ($languages as $language) {1531 if ($language->getExternalCode() == $original_language) {1532 $tmp = ‘<li>’ . esc_html($language->getEnglishName()) . ' - original language</li>’ . $tmp;1533 }1534 if (in_array($language->getExternalCode(), $active_languages, true)) {1535 $tmp .= ‘<li>’ . esc_html($language->getLocalName()) . '</li>’;1536 }1537 } // foreach language1538 self::wp_kses_wf($tmp);1539 echo '</ul>’;1540 } else {1541 echo ‘<p>Your under construction page is currently not translated.<br>Open <a href="’ . esc_url(admin_url(‘admin.php?page=weglot-settings’)) . '">Weglot settings</a> to select languages you want to translate to.</p>’;1542 }1543 echo '</td>’;1544 echo '</tr>’;1545 } else {1546 echo '<tr>’;1547 echo '<th><label for="weglot_support">Multilingual Support</label></th>’;1548 echo '<td>’;1549 echo '<div class="toggle-wrapper">1550 <input type="checkbox" id="weglot_support" type="checkbox" value="1" class="skip-save open-weglot-upsell">1551 <label for="weglot_support" class="toggle"><span class="toggle_handler"></span></label></div>’;1552 echo '<p class="description">55% of online visitors prefer to browse in their mother tongue. If you have an audience speaking multiple languages, making your website multilingual is a must-have. To instantly translate your website and your under construction page, <a href="#" class="open-weglot-upsell">install the Weglot plugin</a> (free plan and free trial available). It seamlessly integrates with UCP and is compatible with all themes & plugins.</p>’;1553 echo '</td>’;1554 echo '</tr>’;1555 } // weglot not active15561557 echo '<tr>’;1558 echo '<th><label for="smush_support">Image Compression</label></th>’;1559 echo '<td>’;1560 if (defined(‘WP_SMUSH_VERSION’)) {1561 echo ‘Configure <a target="_blank" href="’ . esc_url(admin_url(‘admin.php?page=smush’)) . '">image compression options</a>.’;1562 } else {1563 echo '<div class="toggle-wrapper">1564 <input type="checkbox" id="smush_support" type="checkbox" value="1" class="skip-save open-smush-install">1565 <label for="smush_support" class="toggle"><span class="toggle_handler"></span></label></div>’;1566 echo ‘<p class="description">The easiest way to speed up any site is to <b>compress images</b>. On an average page you can easily save a few megabytes. Doing it manually in Photoshop is a pain! That\’s why there are free plugins like <a href="’ . admin_url(‘plugin-install.php?fix-install-button=1&tab=plugin-information&plugin=wp-smushit&TB_iframe=true&width=600&height=550’) . ‘" class="thickbox open-plugin-details-modal smush-thickbox" id="smush-install-link">Smush</a> that specialize in compressing images. <a href="’ . admin_url(‘plugin-install.php?fix-install-button=1&tab=plugin-information&plugin=wp-smushit&TB_iframe=true&width=600&height=550’) . '" class="thickbox open-plugin-details-modal smush-thickbox">Install the free Smush plugin</a>. It has no limit on the amount of images you can compress, seamlessly integrates with WordPress, and is compatible with all plugins & themes. And best of all - <b>it\’s used by over a million users just like you</b>.</p>’;1567 }1568 echo '</td>’;1569 echo '</tr>’;15701571 echo ‘<tr valign="top">1572 <th scope="row"><label for="title">’ . esc_attr__(‘Title’, ‘under-construction-page’) . ‘</label></th>1573 <td><input type="text" id="title" class="regular-text" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[title]" value="’ . esc_attr($options[‘title’]) . '" />’;1574 echo '<p class="description">Page title. Default: ' . esc_attr($default_options[‘title’]) . '</p>’;1575 echo '<p><b>Available shortcodes:</b> (only active in UC themes, not on the rest of the site)</p>1576 <ul class="ucp-list">1577 <li><code>[site-title]</code> - blog title, as set in <a href="options-general.php">Options - General</a></li>1578 <li><code>[site-tagline]</code> - blog tagline, as set in <a href="options-general.php">Options - General</a></li>1579 <li><code>[site-url]</code> - site address (URL), as set in <a href="options-general.php">Options - General</a></li>1580 <li><code>[wp-url]</code> - WordPress address (URL), as set in <a href="options-general.php">Options - General</a></li>1581 <li><code>[site-login-url]</code> - URL of the default site login page</li>1582 </ul>’;1583 echo '</td></tr>’;15841585 echo ‘<tr valign="top">1586 <th scope="row"><label for="description">’ . esc_attr__(‘Description’, ‘under-construction-page’) . ‘</label></th>1587 <td><input id="description" type="text" class="large-text" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[description]" value="’ . esc_attr($options[‘description’]) . '" />’;1588 echo '<p class="description">Description meta tag (see above for available <a href="#title">shortcodes</a>). Default: ' . esc_attr($default_options[‘description’]) . '</p>’;1589 echo '</td></tr>’;15901591 echo ‘<tr valign="top">1592 <th scope="row"><label for="heading1">’ . esc_attr__(‘Headline’, ‘under-construction-page’) . ‘</label></th>1593 <td><input id="heading1" type="text" class="large-text" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[heading1]" value="’ . esc_attr($options[‘heading1’]) . '" />’;1594 echo '<p class="description">Main heading/title (see above for available <a href="#title">shortcodes</a>). Default: ' . esc_attr($default_options[‘heading1’]) . '</p>’;1595 echo '</td></tr>’;15961597 echo ‘<tr valign="top" id="content_wrap">1598 <th scope="row"><label for="content">’ . esc_attr__('Content’, ‘under-construction-page’) . '</label></th>1599 <td>’;1600 wp_editor($options[‘content’], 'content’, array(‘tabfocus_elements’ => 'insert-media-button,save-post’, ‘editor_height’ => 250, ‘resize’ => 1, ‘textarea_name’ => esc_attr(UCP_OPTIONS_KEY) . '[content]', ‘drag_drop_upload’ => 1));1601 echo '<p class="description">All HTML elements are allowed. Shortcodes are not parsed except <a href="#title">UC theme ones</a>. Default: ' . esc_attr($default_options[‘content’]) . '</p>’;1602 echo '</td></tr>’;16031604 echo ‘<tr valign="top">1605 <th scope="row"><label for="linkback">’ . esc_attr__('Show Some Love’, ‘under-construction-page’) . '</label></th>1606 <td>’;1607 echo ‘<div class="toggle-wrapper">1608 <input type="checkbox" id="linkback" ' . esc_attr(self::checked(1, $options[‘linkback’])) . ' type="checkbox" value="1" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[linkback]“>1609 <label for="linkback” class="toggle"><span class="toggle_handler"></span></label>1610 </div>’;1611 echo '<p class="description">Please help others learn about this free plugin by placing a small link in the footer. Thank you very much!</p>’;1612 echo '</td></tr>’;16131614 echo '<tr>’;1615 echo '<th><label for="content_font">Content Font</label></th>’;1616 echo '<td><select class="skip-save open-ucp-upsell" id="content_font">’;1617 echo '<option value="" selected="selected">Theme Default</option>’;1618 echo '<option class="ucp-promo" value="-1">ABeeZee</option><option class="ucp-promo" value="-1">Abel</option><option class="ucp-promo" value="-1">Abril Fatface</option><option class="ucp-promo" value="-1">Aclonica</option><option class="ucp-promo" value="-1">Acme</option><option class="ucp-promo" value="-1">Actor</option><option class="ucp-promo" value="-1">Adamina</option><option class="ucp-promo" value="-1">Advent Pro</option><option class="ucp-promo" value="-1">Aguafina Script</option><option class="ucp-promo" value="-1">Akronim</option><option class="ucp-promo" value="-1">Aladin</option><option class="ucp-promo" value="-1">Aldrich</option><option class="ucp-promo" value="-1">Alef</option><option class="ucp-promo" value="-1">Alegreya</option><option class="ucp-promo" value="-1">Alegreya SC</option><option class="ucp-promo" value="-1">Alegreya Sans</option><option class="ucp-promo" value="-1">Alegreya Sans SC</option><option class="ucp-promo" value="-1">Alex Brush</option><option class="ucp-promo" value="-1">Alfa Slab One</option><option class="ucp-promo" value="-1">Alice</option><option class="ucp-promo" value="-1">Alike</option><option class="ucp-promo" value="-1">Alike Angular</option><option class="ucp-promo" value="-1">Allan</option><option class="ucp-promo" value="-1">Allerta</option><option class="ucp-promo" value="-1">Allerta Stencil</option><option class="ucp-promo" value="-1">Allura</option><option class="ucp-promo" value="-1">Almendra</option><option class="ucp-promo" value="-1">Almendra Display</option><option class="ucp-promo" value="-1">Almendra SC</option><option class="ucp-promo" value="-1">Amarante</option><option class="ucp-promo" value="-1">Amaranth</option><option class="ucp-promo" value="-1">Amatic SC</option><option class="ucp-promo" value="-1">Amethysta</option><option class="ucp-promo" value="-1">Anaheim</option><option class="ucp-promo" value="-1">Andada</option><option class="ucp-promo" value="-1">Andika</option><option class="ucp-promo" value="-1">Angkor</option><option class="ucp-promo" value="-1">Annie Use Your Telescope</option><option class="ucp-promo" value="-1">Anonymous Pro</option><option class="ucp-promo" value="-1">Antic</option><option class="ucp-promo" value="-1">Antic Didone</option><option class="ucp-promo" value="-1">Antic Slab</option><option class="ucp-promo" value="-1">Anton</option><option class="ucp-promo" value="-1">Arapey</option><option class="ucp-promo" value="-1">Arbutus</option><option class="ucp-promo" value="-1">Arbutus Slab</option><option class="ucp-promo" value="-1">Architects Daughter</option><option class="ucp-promo" value="-1">Archivo Black</option><option class="ucp-promo" value="-1">Archivo Narrow</option><option class="ucp-promo" value="-1">Arimo</option><option class="ucp-promo" value="-1">Arizonia</option><option class="ucp-promo" value="-1">Armata</option><option class="ucp-promo" value="-1">Artifika</option><option class="ucp-promo" value="-1">Arvo</option><option class="ucp-promo" value="-1">Asap</option><option class="ucp-promo" value="-1">Asset</option><option class="ucp-promo" value="-1">Astloch</option><option class="ucp-promo" value="-1">Asul</option><option class="ucp-promo" value="-1">Atomic Age</option><option class="ucp-promo" value="-1">Aubrey</option><option class="ucp-promo" value="-1">Audiowide</option><option class="ucp-promo" value="-1">Autour One</option><option class="ucp-promo" value="-1">Average</option><option class="ucp-promo" value="-1">Average Sans</option><option class="ucp-promo" value="-1">Averia Gruesa Libre</option><option class="ucp-promo" value="-1">Averia Libre</option><option class="ucp-promo" value="-1">Averia Sans Libre</option><option class="ucp-promo" value="-1">Averia Serif Libre</option><option class="ucp-promo" value="-1">Bad Script</option><option class="ucp-promo" value="-1">Balthazar</option><option class="ucp-promo" value="-1">Bangers</option><option class="ucp-promo" value="-1">Basic</option><option class="ucp-promo" value="-1">Battambang</option><option class="ucp-promo" value="-1">Baumans</option><option class="ucp-promo" value="-1">Bayon</option><option class="ucp-promo" value="-1">Belgrano</option><option class="ucp-promo" value="-1">Belleza</option><option class="ucp-promo" value="-1">BenchNine</option><option class="ucp-promo" value="-1">Bentham</option><option class="ucp-promo" value="-1">Berkshire Swash</option><option class="ucp-promo" value="-1">Bevan</option><option class="ucp-promo" value="-1">Bigelow Rules</option><option class="ucp-promo" value="-1">Bigshot One</option><option class="ucp-promo" value="-1">Bilbo</option><option class="ucp-promo" value="-1">Bilbo Swash Caps</option><option class="ucp-promo" value="-1">Bitter</option><option class="ucp-promo" value="-1">Black Ops One</option><option class="ucp-promo" value="-1">Bokor</option><option class="ucp-promo" value="-1">Bonbon</option><option class="ucp-promo" value="-1">Boogaloo</option><option class="ucp-promo" value="-1">Bowlby One</option><option class="ucp-promo" value="-1">Bowlby One SC</option><option class="ucp-promo" value="-1">Brawler</option><option class="ucp-promo" value="-1">Bree Serif</option><option class="ucp-promo" value="-1">Bubblegum Sans</option><option class="ucp-promo" value="-1">Bubbler One</option><option class="ucp-promo" value="-1">Buda</option><option class="ucp-promo" value="-1">Buenard</option><option class="ucp-promo" value="-1">Butcherman</option><option class="ucp-promo" value="-1">Butterfly Kids</option><option class="ucp-promo" value="-1">Cabin</option><option class="ucp-promo" value="-1">Cabin Condensed</option><option class="ucp-promo" value="-1">Cabin Sketch</option><option class="ucp-promo" value="-1">Caesar Dressing</option><option class="ucp-promo" value="-1">Cagliostro</option><option class="ucp-promo" value="-1">Calligraffitti</option><option class="ucp-promo" value="-1">Cambo</option><option class="ucp-promo" value="-1">Candal</option><option class="ucp-promo" value="-1">Cantarell</option><option class="ucp-promo" value="-1">Cantata One</option><option class="ucp-promo" value="-1">Cantora One</option><option class="ucp-promo" value="-1">Capriola</option><option class="ucp-promo" value="-1">Cardo</option><option class="ucp-promo" value="-1">Carme</option><option class="ucp-promo" value="-1">Carrois Gothic</option><option class="ucp-promo" value="-1">Carrois Gothic SC</option><option class="ucp-promo" value="-1">Carter One</option><option class="ucp-promo" value="-1">Caudex</option><option class="ucp-promo" value="-1">Cedarville Cursive</option><option class="ucp-promo" value="-1">Ceviche One</option><option class="ucp-promo" value="-1">Changa One</option><option class="ucp-promo" value="-1">Chango</option><option class="ucp-promo" value="-1">Chau Philomene One</option><option class="ucp-promo" value="-1">Chela One</option><option class="ucp-promo" value="-1">Chelsea Market</option><option class="ucp-promo" value="-1">Chenla</option><option class="ucp-promo" value="-1">Cherry Cream Soda</option><option class="ucp-promo" value="-1">Cherry Swash</option><option class="ucp-promo" value="-1">Chewy</option><option class="ucp-promo" value="-1">Chicle</option><option class="ucp-promo" value="-1">Chivo</option><option class="ucp-promo" value="-1">Cinzel</option><option class="ucp-promo" value="-1">Cinzel Decorative</option><option class="ucp-promo" value="-1">Clicker Script</option><option class="ucp-promo" value="-1">Coda</option><option class="ucp-promo" value="-1">Coda Caption</option><option class="ucp-promo" value="-1">Codystar</option><option class="ucp-promo" value="-1">Combo</option><option class="ucp-promo" value="-1">Comfortaa</option><option class="ucp-promo" value="-1">Coming Soon</option><option class="ucp-promo" value="-1">Concert One</option><option class="ucp-promo" value="-1">Condiment</option><option class="ucp-promo" value="-1">Content</option><option class="ucp-promo" value="-1">Contrail One</option><option class="ucp-promo" value="-1">Convergence</option><option class="ucp-promo" value="-1">Cookie</option><option class="ucp-promo" value="-1">Copse</option><option class="ucp-promo" value="-1">Corben</option><option class="ucp-promo" value="-1">Courgette</option><option class="ucp-promo" value="-1">Cousine</option><option class="ucp-promo" value="-1">Coustard</option><option class="ucp-promo" value="-1">Covered By Your Grace</option><option class="ucp-promo" value="-1">Crafty Girls</option><option class="ucp-promo" value="-1">Creepster</option><option class="ucp-promo" value="-1">Crete Round</option><option class="ucp-promo" value="-1">Crimson Text</option><option class="ucp-promo" value="-1">Croissant One</option><option class="ucp-promo" value="-1">Crushed</option><option class="ucp-promo" value="-1">Cuprum</option><option class="ucp-promo" value="-1">Cutive</option><option class="ucp-promo" value="-1">Cutive Mono</option><option class="ucp-promo" value="-1">Damion</option><option class="ucp-promo" value="-1">Dancing Script</option><option class="ucp-promo" value="-1">Dangrek</option><option class="ucp-promo" value="-1">Dawning of a New Day</option><option class="ucp-promo" value="-1">Days One</option><option class="ucp-promo" value="-1">Delius</option><option class="ucp-promo" value="-1">Delius Swash Caps</option><option class="ucp-promo" value="-1">Delius Unicase</option><option class="ucp-promo" value="-1">Della Respira</option><option class="ucp-promo" value="-1">Denk One</option><option class="ucp-promo" value="-1">Devonshire</option><option class="ucp-promo" value="-1">Didact Gothic</option><option class="ucp-promo" value="-1">Diplomata</option><option class="ucp-promo" value="-1">Diplomata SC</option><option class="ucp-promo" value="-1">Domine</option><option class="ucp-promo" value="-1">Donegal One</option><option class="ucp-promo" value="-1">Doppio One</option><option class="ucp-promo" value="-1">Dorsa</option><option class="ucp-promo" value="-1">Dosis</option><option class="ucp-promo" value="-1">Dr Sugiyama</option><option class="ucp-promo" value="-1">Droid Sans</option><option class="ucp-promo" value="-1">Droid Sans Mono</option><option class="ucp-promo" value="-1">Droid Serif</option><option class="ucp-promo" value="-1">Duru Sans</option><option class="ucp-promo" value="-1">Dynalight</option><option class="ucp-promo" value="-1">EB Garamond</option><option class="ucp-promo" value="-1">Eagle Lake</option><option class="ucp-promo" value="-1">Eater</option><option class="ucp-promo" value="-1">Economica</option><option class="ucp-promo" value="-1">Ek Mukta</option><option class="ucp-promo" value="-1">Electrolize</option><option class="ucp-promo" value="-1">Elsie</option><option class="ucp-promo" value="-1">Elsie Swash Caps</option><option class="ucp-promo" value="-1">Emblema One</option><option class="ucp-promo" value="-1">Emilys Candy</option><option class="ucp-promo" value="-1">Engagement</option><option class="ucp-promo" value="-1">Englebert</option><option class="ucp-promo" value="-1">Enriqueta</option><option class="ucp-promo" value="-1">Erica One</option><option class="ucp-promo" value="-1">Esteban</option><option class="ucp-promo" value="-1">Euphoria Script</option><option class="ucp-promo" value="-1">Ewert</option><option class="ucp-promo" value="-1">Exo</option><option class="ucp-promo" value="-1">Exo 2</option><option class="ucp-promo" value="-1">Expletus Sans</option><option class="ucp-promo" value="-1">Fanwood Text</option><option class="ucp-promo" value="-1">Fascinate</option><option class="ucp-promo" value="-1">Fascinate Inline</option><option class="ucp-promo" value="-1">Faster One</option><option class="ucp-promo" value="-1">Fasthand</option><option class="ucp-promo" value="-1">Fauna One</option><option class="ucp-promo" value="-1">Federant</option><option class="ucp-promo" value="-1">Federo</option><option class="ucp-promo" value="-1">Felipa</option><option class="ucp-promo" value="-1">Fenix</option><option class="ucp-promo" value="-1">Finger Paint</option><option class="ucp-promo" value="-1">Fira Mono</option><option class="ucp-promo" value="-1">Fira Sans</option><option class="ucp-promo" value="-1">Fjalla One</option><option class="ucp-promo" value="-1">Fjord One</option><option class="ucp-promo" value="-1">Flamenco</option><option class="ucp-promo" value="-1">Flavors</option><option class="ucp-promo" value="-1">Fondamento</option><option class="ucp-promo" value="-1">Fontdiner Swanky</option><option class="ucp-promo" value="-1">Forum</option><option class="ucp-promo" value="-1">Francois One</option><option class="ucp-promo" value="-1">Freckle Face</option><option class="ucp-promo" value="-1">Fredericka the Great</option><option class="ucp-promo" value="-1">Fredoka One</option><option class="ucp-promo" value="-1">Freehand</option><option class="ucp-promo" value="-1">Fresca</option><option class="ucp-promo" value="-1">Frijole</option><option class="ucp-promo" value="-1">Fruktur</option><option class="ucp-promo" value="-1">Fugaz One</option><option class="ucp-promo" value="-1">GFS Didot</option><option class="ucp-promo" value="-1">GFS Neohellenic</option><option class="ucp-promo" value="-1">Gabriela</option><option class="ucp-promo" value="-1">Gafata</option><option class="ucp-promo" value="-1">Galdeano</option><option class="ucp-promo" value="-1">Galindo</option><option class="ucp-promo" value="-1">Gentium Basic</option><option class="ucp-promo" value="-1">Gentium Book Basic</option><option class="ucp-promo" value="-1">Geo</option><option class="ucp-promo" value="-1">Geostar</option><option class="ucp-promo" value="-1">Geostar Fill</option><option class="ucp-promo" value="-1">Germania One</option><option class="ucp-promo" value="-1">Gilda Display</option><option class="ucp-promo" value="-1">Give You Glory</option><option class="ucp-promo" value="-1">Glass Antiqua</option><option class="ucp-promo" value="-1">Glegoo</option><option class="ucp-promo" value="-1">Gloria Hallelujah</option><option class="ucp-promo" value="-1">Goblin One</option><option class="ucp-promo" value="-1">Gochi Hand</option><option class="ucp-promo" value="-1">Gorditas</option><option class="ucp-promo" value="-1">Goudy Bookletter 1911</option><option class="ucp-promo" value="-1">Graduate</option><option class="ucp-promo" value="-1">Grand Hotel</option><option class="ucp-promo" value="-1">Gravitas One</option><option class="ucp-promo" value="-1">Great Vibes</option><option class="ucp-promo" value="-1">Griffy</option><option class="ucp-promo" value="-1">Gruppo</option><option class="ucp-promo" value="-1">Gudea</option><option class="ucp-promo" value="-1">Habibi</option><option class="ucp-promo" value="-1">Hammersmith One</option><option class="ucp-promo" value="-1">Hanalei</option><option class="ucp-promo" value="-1">Hanalei Fill</option><option class="ucp-promo" value="-1">Handlee</option><option class="ucp-promo" value="-1">Hanuman</option><option class="ucp-promo" value="-1">Happy Monkey</option><option class="ucp-promo" value="-1">Headland One</option><option class="ucp-promo" value="-1">Henny Penny</option><option class="ucp-promo" value="-1">Herr Von Muellerhoff</option><option class="ucp-promo" value="-1">Hind</option><option class="ucp-promo" value="-1">Holtwood One SC</option><option class="ucp-promo" value="-1">Homemade Apple</option><option class="ucp-promo" value="-1">Homenaje</option><option class="ucp-promo" value="-1">IM Fell DW Pica</option><option class="ucp-promo" value="-1">IM Fell DW Pica SC</option><option class="ucp-promo" value="-1">IM Fell Double Pica</option><option class="ucp-promo" value="-1">IM Fell Double Pica SC</option><option class="ucp-promo" value="-1">IM Fell English</option><option class="ucp-promo" value="-1">IM Fell English SC</option><option class="ucp-promo" value="-1">IM Fell French Canon</option><option class="ucp-promo" value="-1">IM Fell French Canon SC</option><option class="ucp-promo" value="-1">IM Fell Great Primer</option><option class="ucp-promo" value="-1">IM Fell Great Primer SC</option><option class="ucp-promo" value="-1">Iceberg</option><option class="ucp-promo" value="-1">Iceland</option><option class="ucp-promo" value="-1">Imprima</option><option class="ucp-promo" value="-1">Inconsolata</option><option class="ucp-promo" value="-1">Inder</option><option class="ucp-promo" value="-1">Indie Flower</option><option class="ucp-promo" value="-1">Inika</option><option class="ucp-promo" value="-1">Irish Grover</option><option class="ucp-promo" value="-1">Istok Web</option><option class="ucp-promo" value="-1">Italiana</option><option class="ucp-promo" value="-1">Italianno</option><option class="ucp-promo" value="-1">Jacques Francois</option><option class="ucp-promo" value="-1">Jacques Francois Shadow</option><option class="ucp-promo" value="-1">Jim Nightshade</option><option class="ucp-promo" value="-1">Jockey One</option><option class="ucp-promo" value="-1">Jolly Lodger</option><option class="ucp-promo" value="-1">Josefin Sans</option><option class="ucp-promo" value="-1">Josefin Slab</option><option class="ucp-promo" value="-1">Joti One</option><option class="ucp-promo" value="-1">Judson</option><option class="ucp-promo" value="-1">Julee</option><option class="ucp-promo" value="-1">Julius Sans One</option><option class="ucp-promo" value="-1">Junge</option><option class="ucp-promo" value="-1">Jura</option><option class="ucp-promo" value="-1">Just Another Hand</option><option class="ucp-promo" value="-1">Just Me Again Down Here</option><option class="ucp-promo" value="-1">Kalam</option><option class="ucp-promo" value="-1">Kameron</option><option class="ucp-promo" value="-1">Kantumruy</option><option class="ucp-promo" value="-1">Karla</option><option class="ucp-promo" value="-1">Karma</option><option class="ucp-promo" value="-1">Kaushan Script</option><option class="ucp-promo" value="-1">Kavoon</option><option class="ucp-promo" value="-1">Kdam Thmor</option><option class="ucp-promo" value="-1">Keania One</option><option class="ucp-promo" value="-1">Kelly Slab</option><option class="ucp-promo" value="-1">Kenia</option><option class="ucp-promo" value="-1">Khmer</option><option class="ucp-promo" value="-1">Kite One</option><option class="ucp-promo" value="-1">Knewave</option><option class="ucp-promo" value="-1">Kotta One</option><option class="ucp-promo" value="-1">Koulen</option><option class="ucp-promo" value="-1">Kranky</option><option class="ucp-promo" value="-1">Kreon</option><option class="ucp-promo" value="-1">Kristi</option><option class="ucp-promo" value="-1">Krona One</option><option class="ucp-promo" value="-1">La Belle Aurore</option><option class="ucp-promo" value="-1">Lancelot</option><option class="ucp-promo" value="-1">Lato</option><option class="ucp-promo" value="-1">League Script</option><option class="ucp-promo" value="-1">Leckerli One</option><option class="ucp-promo" value="-1">Ledger</option><option class="ucp-promo" value="-1">Lekton</option><option class="ucp-promo" value="-1">Lemon</option><option class="ucp-promo" value="-1">Libre Baskerville</option><option class="ucp-promo" value="-1">Life Savers</option><option class="ucp-promo" value="-1">Lilita One</option><option class="ucp-promo" value="-1">Lily Script One</option><option class="ucp-promo" value="-1">Limelight</option><option class="ucp-promo" value="-1">Linden Hill</option><option class="ucp-promo" value="-1">Lobster</option><option class="ucp-promo" value="-1">Lobster Two</option><option class="ucp-promo" value="-1">Londrina Outline</option><option class="ucp-promo" value="-1">Londrina Shadow</option><option class="ucp-promo" value="-1">Londrina Sketch</option><option class="ucp-promo" value="-1">Londrina Solid</option><option class="ucp-promo" value="-1">Lora</option><option class="ucp-promo" value="-1">Love Ya Like A Sister</option><option class="ucp-promo" value="-1">Loved by the King</option><option class="ucp-promo" value="-1">Lovers Quarrel</option><option class="ucp-promo" value="-1">Luckiest Guy</option><option class="ucp-promo" value="-1">Lusitana</option><option class="ucp-promo" value="-1">Lustria</option><option class="ucp-promo" value="-1">Macondo</option><option class="ucp-promo" value="-1">Macondo Swash Caps</option><option class="ucp-promo" value="-1">Magra</option><option class="ucp-promo" value="-1">Maiden Orange</option><option class="ucp-promo" value="-1">Mako</option><option class="ucp-promo" value="-1">Marcellus</option><option class="ucp-promo" value="-1">Marcellus SC</option><option class="ucp-promo" value="-1">Marck Script</option><option class="ucp-promo" value="-1">Margarine</option><option class="ucp-promo" value="-1">Marko One</option><option class="ucp-promo" value="-1">Marmelad</option><option class="ucp-promo" value="-1">Marvel</option><option class="ucp-promo" value="-1">Mate</option><option class="ucp-promo" value="-1">Mate SC</option><option class="ucp-promo" value="-1">Maven Pro</option><option class="ucp-promo" value="-1">McLaren</option><option class="ucp-promo" value="-1">Meddon</option><option class="ucp-promo" value="-1">MedievalSharp</option><option class="ucp-promo" value="-1">Medula One</option><option class="ucp-promo" value="-1">Megrim</option><option class="ucp-promo" value="-1">Meie Script</option><option class="ucp-promo" value="-1">Merienda</option><option class="ucp-promo" value="-1">Merienda One</option><option class="ucp-promo" value="-1">Merriweather</option><option class="ucp-promo" value="-1">Merriweather Sans</option><option class="ucp-promo" value="-1">Metal</option><option class="ucp-promo" value="-1">Metal Mania</option><option class="ucp-promo" value="-1">Metamorphous</option><option class="ucp-promo" value="-1">Metrophobic</option><option class="ucp-promo" value="-1">Michroma</option><option class="ucp-promo" value="-1">Milonga</option><option class="ucp-promo" value="-1">Miltonian</option><option class="ucp-promo" value="-1">Miltonian Tattoo</option><option class="ucp-promo" value="-1">Miniver</option><option class="ucp-promo" value="-1">Miss Fajardose</option><option class="ucp-promo" value="-1">Modern Antiqua</option><option class="ucp-promo" value="-1">Molengo</option><option class="ucp-promo" value="-1">Molle</option><option class="ucp-promo" value="-1">Monda</option><option class="ucp-promo" value="-1">Monofett</option><option class="ucp-promo" value="-1">Monoton</option><option class="ucp-promo" value="-1">Monsieur La Doulaise</option><option class="ucp-promo" value="-1">Montaga</option><option class="ucp-promo" value="-1">Montez</option><option class="ucp-promo" value="-1">Montserrat</option><option class="ucp-promo" value="-1">Montserrat Alternates</option><option class="ucp-promo" value="-1">Montserrat Subrayada</option><option class="ucp-promo" value="-1">Moul</option><option class="ucp-promo" value="-1">Moulpali</option><option class="ucp-promo" value="-1">Mountains of Christmas</option><option class="ucp-promo" value="-1">Mouse Memoirs</option><option class="ucp-promo" value="-1">Mr Bedfort</option><option class="ucp-promo" value="-1">Mr Dafoe</option><option class="ucp-promo" value="-1">Mr De Haviland</option><option class="ucp-promo" value="-1">Mrs Saint Delafield</option><option class="ucp-promo" value="-1">Mrs Sheppards</option><option class="ucp-promo" value="-1">Muli</option><option class="ucp-promo" value="-1">Mystery Quest</option><option class="ucp-promo" value="-1">Neucha</option><option class="ucp-promo" value="-1">Neuton</option><option class="ucp-promo" value="-1">New Rocker</option><option class="ucp-promo" value="-1">News Cycle</option><option class="ucp-promo" value="-1">Niconne</option><option class="ucp-promo" value="-1">Nixie One</option><option class="ucp-promo" value="-1">Nobile</option><option class="ucp-promo" value="-1">Nokora</option><option class="ucp-promo" value="-1">Norican</option><option class="ucp-promo" value="-1">Nosifer</option><option class="ucp-promo" value="-1">Nothing You Could Do</option><option class="ucp-promo" value="-1">Noticia Text</option><option class="ucp-promo" value="-1">Noto Sans</option><option class="ucp-promo" value="-1">Noto Serif</option><option class="ucp-promo" value="-1">Nova Cut</option><option class="ucp-promo" value="-1">Nova Flat</option><option class="ucp-promo" value="-1">Nova Mono</option><option class="ucp-promo" value="-1">Nova Oval</option><option class="ucp-promo" value="-1">Nova Round</option><option class="ucp-promo" value="-1">Nova Script</option><option class="ucp-promo" value="-1">Nova Slim</option><option class="ucp-promo" value="-1">Nova Square</option><option class="ucp-promo" value="-1">Numans</option><option class="ucp-promo" value="-1">Nunito</option><option class="ucp-promo" value="-1">Odor Mean Chey</option><option class="ucp-promo" value="-1">Offside</option><option class="ucp-promo" value="-1">Old Standard TT</option><option class="ucp-promo" value="-1">Oldenburg</option><option class="ucp-promo" value="-1">Oleo Script</option><option class="ucp-promo" value="-1">Oleo Script Swash Caps</option><option class="ucp-promo" value="-1">Open Sans</option><option class="ucp-promo" value="-1">Open Sans Condensed</option><option class="ucp-promo" value="-1">Oranienbaum</option><option class="ucp-promo" value="-1">Orbitron</option><option class="ucp-promo" value="-1">Oregano</option><option class="ucp-promo" value="-1">Orienta</option><option class="ucp-promo" value="-1">Original Surfer</option><option class="ucp-promo" value="-1">Oswald</option><option class="ucp-promo" value="-1">Over the Rainbow</option><option class="ucp-promo" value="-1">Overlock</option><option class="ucp-promo" value="-1">Overlock SC</option><option class="ucp-promo" value="-1">Ovo</option><option class="ucp-promo" value="-1">Oxygen</option><option class="ucp-promo" value="-1">Oxygen Mono</option><option class="ucp-promo" value="-1">PT Mono</option><option class="ucp-promo" value="-1">PT Sans</option><option class="ucp-promo" value="-1">PT Sans Caption</option><option class="ucp-promo" value="-1">PT Sans Narrow</option><option class="ucp-promo" value="-1">PT Serif</option><option class="ucp-promo" value="-1">PT Serif Caption</option><option class="ucp-promo" value="-1">Pacifico</option><option class="ucp-promo" value="-1">Paprika</option><option class="ucp-promo" value="-1">Parisienne</option><option class="ucp-promo" value="-1">Passero One</option><option class="ucp-promo" value="-1">Passion One</option><option class="ucp-promo" value="-1">Pathway Gothic One</option><option class="ucp-promo" value="-1">Patrick Hand</option><option class="ucp-promo" value="-1">Patrick Hand SC</option><option class="ucp-promo" value="-1">Patua One</option><option class="ucp-promo" value="-1">Paytone One</option><option class="ucp-promo" value="-1">Peralta</option><option class="ucp-promo" value="-1">Permanent Marker</option><option class="ucp-promo" value="-1">Petit Formal Script</option><option class="ucp-promo" value="-1">Petrona</option><option class="ucp-promo" value="-1">Philosopher</option><option class="ucp-promo" value="-1">Piedra</option><option class="ucp-promo" value="-1">Pinyon Script</option><option class="ucp-promo" value="-1">Pirata One</option><option class="ucp-promo" value="-1">Plaster</option><option class="ucp-promo" value="-1">Play</option><option class="ucp-promo" value="-1">Playball</option><option class="ucp-promo" value="-1">Playfair Display</option><option class="ucp-promo" value="-1">Playfair Display SC</option><option class="ucp-promo" value="-1">Podkova</option><option class="ucp-promo" value="-1">Poiret One</option><option class="ucp-promo" value="-1">Poller One</option><option class="ucp-promo" value="-1">Poly</option><option class="ucp-promo" value="-1">Pompiere</option><option class="ucp-promo" value="-1">Pontano Sans</option><option class="ucp-promo" value="-1">Port Lligat Sans</option><option class="ucp-promo" value="-1">Port Lligat Slab</option><option class="ucp-promo" value="-1">Prata</option><option class="ucp-promo" value="-1">Preahvihear</option><option class="ucp-promo" value="-1">Press Start 2P</option><option class="ucp-promo" value="-1">Princess Sofia</option><option class="ucp-promo" value="-1">Prociono</option><option class="ucp-promo" value="-1">Prosto One</option><option class="ucp-promo" value="-1">Puritan</option><option class="ucp-promo" value="-1">Purple Purse</option><option class="ucp-promo" value="-1">Quando</option><option class="ucp-promo" value="-1">Quantico</option><option class="ucp-promo" value="-1">Quattrocento</option><option class="ucp-promo" value="-1">Quattrocento Sans</option><option class="ucp-promo" value="-1">Questrial</option><option class="ucp-promo" value="-1">Quicksand</option><option class="ucp-promo" value="-1">Quintessential</option><option class="ucp-promo" value="-1">Qwigley</option><option class="ucp-promo" value="-1">Racing Sans One</option><option class="ucp-promo" value="-1">Radley</option><option class="ucp-promo" value="-1">Rajdhani</option><option class="ucp-promo" value="-1">Raleway</option><option class="ucp-promo" value="-1">Raleway Dots</option><option class="ucp-promo" value="-1">Rambla</option><option class="ucp-promo" value="-1">Rammetto One</option><option class="ucp-promo" value="-1">Ranchers</option><option class="ucp-promo" value="-1">Rancho</option><option class="ucp-promo" value="-1">Rationale</option><option class="ucp-promo" value="-1">Redressed</option><option class="ucp-promo" value="-1">Reenie Beanie</option><option class="ucp-promo" value="-1">Revalia</option><option class="ucp-promo" value="-1">Ribeye</option><option class="ucp-promo" value="-1">Ribeye Marrow</option><option class="ucp-promo" value="-1">Righteous</option><option class="ucp-promo" value="-1">Risque</option><option class="ucp-promo" value="-1">Roboto</option><option class="ucp-promo" value="-1">Roboto Condensed</option><option class="ucp-promo" value="-1">Roboto Slab</option><option class="ucp-promo" value="-1">Rochester</option><option class="ucp-promo" value="-1">Rock Salt</option><option class="ucp-promo" value="-1">Rokkitt</option><option class="ucp-promo" value="-1">Romanesco</option><option class="ucp-promo" value="-1">Ropa Sans</option><option class="ucp-promo" value="-1">Rosario</option><option class="ucp-promo" value="-1">Rosarivo</option><option class="ucp-promo" value="-1">Rouge Script</option><option class="ucp-promo" value="-1">Rubik Mono One</option><option class="ucp-promo" value="-1">Rubik One</option><option class="ucp-promo" value="-1">Ruda</option><option class="ucp-promo" value="-1">Rufina</option><option class="ucp-promo" value="-1">Ruge Boogie</option><option class="ucp-promo" value="-1">Ruluko</option><option class="ucp-promo" value="-1">Rum Raisin</option><option class="ucp-promo" value="-1">Ruslan Display</option><option class="ucp-promo" value="-1">Russo One</option><option class="ucp-promo" value="-1">Ruthie</option><option class="ucp-promo" value="-1">Rye</option><option class="ucp-promo" value="-1">Sacramento</option><option class="ucp-promo" value="-1">Sail</option><option class="ucp-promo" value="-1">Salsa</option><option class="ucp-promo" value="-1">Sanchez</option><option class="ucp-promo" value="-1">Sancreek</option><option class="ucp-promo" value="-1">Sansita One</option><option class="ucp-promo" value="-1">Sarina</option><option class="ucp-promo" value="-1">Satisfy</option><option class="ucp-promo" value="-1">Scada</option><option class="ucp-promo" value="-1">Schoolbell</option><option class="ucp-promo" value="-1">Seaweed Script</option><option class="ucp-promo" value="-1">Sevillana</option><option class="ucp-promo" value="-1">Seymour One</option><option class="ucp-promo" value="-1">Shadows Into Light</option><option class="ucp-promo" value="-1">Shadows Into Light Two</option><option class="ucp-promo" value="-1">Shanti</option><option class="ucp-promo" value="-1">Share</option><option class="ucp-promo" value="-1">Share Tech</option><option class="ucp-promo" value="-1">Share Tech Mono</option><option class="ucp-promo" value="-1">Shojumaru</option><option class="ucp-promo" value="-1">Short Stack</option><option class="ucp-promo" value="-1">Siemreap</option><option class="ucp-promo" value="-1">Sigmar One</option><option class="ucp-promo" value="-1">Signika</option><option class="ucp-promo" value="-1">Signika Negative</option><option class="ucp-promo" value="-1">Simonetta</option><option class="ucp-promo" value="-1">Sintony</option><option class="ucp-promo" value="-1">Sirin Stencil</option><option class="ucp-promo" value="-1">Six Caps</option><option class="ucp-promo" value="-1">Skranji</option><option class="ucp-promo" value="-1">Slabo 13px</option><option class="ucp-promo" value="-1">Slabo 27px</option><option class="ucp-promo" value="-1">Slackey</option><option class="ucp-promo" value="-1">Smokum</option><option class="ucp-promo" value="-1">Smythe</option><option class="ucp-promo" value="-1">Sniglet</option><option class="ucp-promo" value="-1">Snippet</option><option class="ucp-promo" value="-1">Snowburst One</option><option class="ucp-promo" value="-1">Sofadi One</option><option class="ucp-promo" value="-1">Sofia</option><option class="ucp-promo" value="-1">Sonsie One</option><option class="ucp-promo" value="-1">Sorts Mill Goudy</option><option class="ucp-promo" value="-1">Source Code Pro</option><option class="ucp-promo" value="-1">Source Sans Pro</option><option class="ucp-promo" value="-1">Source Serif Pro</option><option class="ucp-promo" value="-1">Special Elite</option><option class="ucp-promo" value="-1">Spicy Rice</option><option class="ucp-promo" value="-1">Spinnaker</option><option class="ucp-promo" value="-1">Spirax</option><option class="ucp-promo" value="-1">Squada One</option><option class="ucp-promo" value="-1">Stalemate</option><option class="ucp-promo" value="-1">Stalinist One</option><option class="ucp-promo" value="-1">Stardos Stencil</option><option class="ucp-promo" value="-1">Stint Ultra Condensed</option><option class="ucp-promo" value="-1">Stint Ultra Expanded</option><option class="ucp-promo" value="-1">Stoke</option><option class="ucp-promo" value="-1">Strait</option><option class="ucp-promo" value="-1">Sue Ellen Francisco</option><option class="ucp-promo" value="-1">Sunshiney</option><option class="ucp-promo" value="-1">Supermercado One</option><option class="ucp-promo" value="-1">Suwannaphum</option><option class="ucp-promo" value="-1">Swanky and Moo Moo</option><option class="ucp-promo" value="-1">Syncopate</option><option class="ucp-promo" value="-1">Tangerine</option><option class="ucp-promo" value="-1">Taprom</option><option class="ucp-promo" value="-1">Tauri</option><option class="ucp-promo" value="-1">Teko</option><option class="ucp-promo" value="-1">Telex</option><option class="ucp-promo" value="-1">Tenor Sans</option><option class="ucp-promo" value="-1">Text Me One</option><option class="ucp-promo" value="-1">The Girl Next Door</option><option class="ucp-promo" value="-1">Tienne</option><option class="ucp-promo" value="-1">Tinos</option><option class="ucp-promo" value="-1">Titan One</option><option class="ucp-promo" value="-1">Titillium Web</option><option class="ucp-promo" value="-1">Trade Winds</option><option class="ucp-promo" value="-1">Trocchi</option><option class="ucp-promo" value="-1">Trochut</option><option class="ucp-promo" value="-1">Trykker</option><option class="ucp-promo" value="-1">Tulpen One</option><option class="ucp-promo" value="-1">Ubuntu</option><option class="ucp-promo" value="-1">Ubuntu Condensed</option><option class="ucp-promo" value="-1">Ubuntu Mono</option><option class="ucp-promo" value="-1">Ultra</option><option class="ucp-promo" value="-1">Uncial Antiqua</option><option class="ucp-promo" value="-1">Underdog</option><option class="ucp-promo" value="-1">Unica One</option><option class="ucp-promo" value="-1">UnifrakturCook</option><option class="ucp-promo" value="-1">UnifrakturMaguntia</option><option class="ucp-promo" value="-1">Unkempt</option><option class="ucp-promo" value="-1">Unlock</option><option class="ucp-promo" value="-1">Unna</option><option class="ucp-promo" value="-1">VT323</option><option class="ucp-promo" value="-1">Vampiro One</option><option class="ucp-promo" value="-1">Varela</option><option class="ucp-promo" value="-1">Varela Round</option><option class="ucp-promo" value="-1">Vast Shadow</option><option class="ucp-promo" value="-1">Vibur</option><option class="ucp-promo" value="-1">Vidaloka</option><option class="ucp-promo" value="-1">Viga</option><option class="ucp-promo" value="-1">Voces</option><option class="ucp-promo" value="-1">Volkhov</option><option class="ucp-promo" value="-1">Vollkorn</option><option class="ucp-promo" value="-1">Voltaire</option><option class="ucp-promo" value="-1">Waiting for the Sunrise</option><option class="ucp-promo" value="-1">Wallpoet</option><option class="ucp-promo" value="-1">Walter Turncoat</option><option class="ucp-promo" value="-1">Warnes</option><option class="ucp-promo" value="-1">Wellfleet</option><option class="ucp-promo" value="-1">Wendy One</option><option class="ucp-promo" value="-1">Wire One</option><option class="ucp-promo" value="-1">Yanone Kaffeesatz</option><option class="ucp-promo" value="-1">Yellowtail</option><option class="ucp-promo" value="-1">Yeseva One</option><option class="ucp-promo" value="-1">Yesteryear</option><option class="ucp-promo" value="-1">Zeyada</option>’;1619 echo '</select>’;1620 echo '<p class="description">Choose one of 600+ beautiful Bunny fonts or use the default, theme set one. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="content_font">PRO feature</a>.</p>’;1621 echo '</td>’;1622 echo '</tr>’;16231624 echo ‘<tr valign="top">1625 <th scope="row"><label for="external_shortcodes">’ . esc_attr__('3rd Party Shortcode Support in Content’, ‘under-construction-page’) . '</label></th>1626 <td>’;1627 echo '<div class="toggle-wrapper">1628 <input type="checkbox" id="external_shortcodes" type="checkbox" value="1" class="skip-save open-ucp-upsell">1629 <label for="external_shortcodes" class="toggle"><span class="toggle_handler"></span></label>1630 </div>’;1631 echo '<p class="description">Enable if you have a 3rd party shortcode you\’d like to use on the under construction page. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="external_shortcodes">PRO feature</a>.</p>’;1632 echo '</td></tr>’;16331634 echo ‘<tr valign="top" id="login_button_wrap">1635 <th scope="row"><label for="login_button">’ . esc_attr__('Login Button’, ‘under-construction-page’) . '</label></th>1636 <td>’;1637 echo ‘<div class="toggle-wrapper">1638 <input type="checkbox" id="login_button" ' . esc_attr(self::checked(1, $options[‘login_button’])) . ' type="checkbox" value="1" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[login_button]“>1639 <label for="login_button” class="toggle"><span class="toggle_handler"></span></label>1640 </div>’;1641 echo '<p class="description">Show a discrete link to the login form, or WP admin if you\’re logged in, in the lower right corner of the page.</p>’;1642 echo '</td></tr>’;16431644 echo ‘<tr valign="top">1645 <th scope="row"><label for="custom_footer_code">’ . esc_attr__('Custom Footer Code’, ‘under-construction-page’) . '</label></th>1646 <td>’;1647 echo '<textarea data-autoresize="1" rows="3" id="custom_footer_code" class="code large-text skip-save disabled open-ucp-upsell" name="" placeholder=""></textarea>’;1648 echo '<p class="description">Paste any 3rd party code here such as tracking scripts or tracking pixels. Be sure to include <script> tags as nothing is added automatically.<br>This is NOT a place to add Google Analytics code. Please use the <a href="#ga_tracking_id_toggle" class="change_tab" data-tab="0">GA Tracking setting</a> for that. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="footer_code">PRO feature</a>.</p>’;1649 echo '</td></tr>’;16501651 echo '</table>’;16521653 self::footer_buttons();16541655 echo ‘<h2 class="title">’ . esc_attr__('Social & Contact Icons’, ‘under-construction-page’) . '</h2>’;16561657 echo '<table class="form-table" id="ucp-social-icons">’;1658 echo ‘<tr valign="top">1659 <th scope="row"><label for="social_facebook">’ . esc_attr__(‘Facebook Page’, ‘under-construction-page’) . ‘</label></th>1660 <td><input id="social_facebook" type="url" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_facebook]" value="’ . esc_attr($options[‘social_facebook’]) . ‘" placeholder="’ . esc_attr__('Facebook business or personal page URL’, ‘under-construction-page’) . '">’;1661 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix, to Facebook page.’, ‘under-construction-page’) . '</p>’;1662 echo '</td></tr>’;16631664 echo ‘<tr valign="top">1665 <th scope="row"><label for="social_twitter">’ . esc_attr__(‘Twitter Profile’, ‘under-construction-page’) . ‘</label></th>1666 <td><input id="social_twitter" type="url" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_twitter]" value="’ . esc_attr($options[‘social_twitter’]) . ‘" placeholder="’ . esc_attr__('Twitter profile URL’, ‘under-construction-page’) . '">’;1667 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix, to Twitter profile page.’, ‘under-construction-page’) . '</p>’;1668 echo '</td></tr>’;16691670 echo ‘<tr valign="top">1671 <th scope="row"><label for="social_linkedin">’ . esc_attr__(‘LinkedIn Profile’, ‘under-construction-page’) . ‘</label></th>1672 <td><input id="social_linkedin" type="url" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_linkedin]" value="’ . esc_attr($options[‘social_linkedin’]) . ‘" placeholder="’ . esc_attr__('LinkedIn profile page URL’, ‘under-construction-page’) . '">’;1673 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix, to LinkedIn profile page.’, ‘under-construction-page’) . '</p>’;1674 echo '</td></tr>’;16751676 echo ‘<tr valign="top">1677 <th scope="row"><label for="social_youtube">’ . esc_attr__(‘YouTube Profile Page or Video’, ‘under-construction-page’) . ‘</label></th>1678 <td><input id="social_youtube" type="url" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_youtube]" value="’ . esc_attr($options[‘social_youtube’]) . ‘" placeholder="’ . esc_attr__('YouTube page or video URL’, ‘under-construction-page’) . '">’;1679 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix, to YouTube page or video.’, ‘under-construction-page’) . '</p>’;1680 echo '</td></tr>’;16811682 echo ‘<tr valign="top" class="hidden">1683 <th scope="row"><label for="social_vimeo">’ . esc_attr__(‘Vimeo Profile Page or Video’, ‘under-construction-page’) . ‘</label></th>1684 <td><input id="social_vimeo" type="url" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_vimeo]" value="’ . esc_attr($options[‘social_vimeo’]) . ‘" placeholder="’ . esc_attr__('Vimeo page or video URL’, ‘under-construction-page’) . '">’;1685 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix, to Vimeo page or video.’, ‘under-construction-page’) . '</p>’;1686 echo '</td></tr>’;16871688 echo ‘<tr valign="top" class="hidden">1689 <th scope="row"><label for="social_pinterest">’ . esc_attr__(‘Pinterest Profile’, ‘under-construction-page’) . ‘</label></th>1690 <td><input id="social_pinterest" type="url" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_pinterest]" value="’ . esc_attr($options[‘social_pinterest’]) . ‘" placeholder="’ . esc_attr__('Pinterest profile URL’, ‘under-construction-page’) . '">’;1691 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix, to Pinterest profile.’, ‘under-construction-page’) . '</p>’;1692 echo '</td></tr>’;16931694 echo ‘<tr valign="top" class="hidden">1695 <th scope="row"><label for="social_dribbble">’ . esc_attr__(‘Dribbble Profile’, ‘under-construction-page’) . ‘</label></th>1696 <td><input id="social_dribbble" type="url" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_dribbble]" value="’ . esc_attr($options[‘social_dribbble’]) . ‘" placeholder="’ . esc_attr__('Dribbble profile URL’, ‘under-construction-page’) . '">’;1697 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix, to Dribbble profile.’, ‘under-construction-page’) . '</p>’;1698 echo '</td></tr>’;16991700 echo ‘<tr valign="top" class="hidden">1701 <th scope="row"><label for="social_behance">’ . esc_attr__(‘Behance Profile’, ‘under-construction-page’) . ‘</label></th>1702 <td><input id="social_behance" type="url" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_behance]" value="’ . esc_attr($options[‘social_behance’]) . ‘" placeholder="’ . esc_attr__('Behance profile URL’, ‘under-construction-page’) . '">’;1703 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix, to Behance profile.’, ‘under-construction-page’) . '</p>’;1704 echo '</td></tr>’;17051706 echo ‘<tr valign="top" class="hidden">1707 <th scope="row"><label for="social_instagram">’ . esc_attr__(‘Instagram Profile’, ‘under-construction-page’) . ‘</label></th>1708 <td><input id="social_instagram" type="url" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_instagram]" value="’ . esc_attr($options[‘social_instagram’]) . ‘" placeholder="’ . esc_attr__('Instagram profile URL’, ‘under-construction-page’) . '">’;1709 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix, to Instagram profile.’, ‘under-construction-page’) . '</p>’;1710 echo '</td></tr>’;17111712 echo ‘<tr valign="top" class="hidden">1713 <th scope="row"><label for="social_vk">’ . esc_attr__(‘VK Profile’, ‘under-construction-page’) . ‘</label></th>1714 <td><input id="social_vk" type="url" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_vk]" value="’ . esc_attr($options[‘social_vk’]) . ‘" placeholder="’ . esc_attr__('VK profile URL’, ‘under-construction-page’) . '">’;1715 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix, to VK profile.’, ‘under-construction-page’) . '</p>’;1716 echo '</td></tr>’;17171718 echo ‘<tr valign="top" class="hidden">1719 <th scope="row"><label for="social_telegram">’ . esc_attr__(‘Telegram Group, Channel or Account’, ‘under-construction-page’) . ‘</label></th>1720 <td><input id="social_telegram" type="text" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_telegram]" value="’ . esc_attr($options[‘social_telegram’]) . ‘" placeholder="’ . esc_attr__('Telegram group, channel or account URL’, ‘under-construction-page’) . '">’;1721 echo ‘<p class="description">’ . esc_attr__('Complete URL, with https prefix to Telegram group, channel or account.’, ‘under-construction-page’) . '</p>’;1722 echo '</td></tr>’;17231724 echo ‘<tr valign="top" class="hidden">1725 <th scope="row"><label for="social_skype">’ . esc_attr__(‘Skype Username’, ‘under-construction-page’) . ‘</label></th>1726 <td><input id="social_skype" type="text" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_skype]" value="’ . esc_attr($options[‘social_skype’]) . ‘" placeholder="’ . esc_attr__('Skype username or account name’, ‘under-construction-page’) . '">’;1727 echo ‘<p class="description">’ . esc_attr__('Skype username or account name.’, ‘under-construction-page’) . '</p>’;1728 echo '</td></tr>’;17291730 echo ‘<tr valign="top" class="hidden">1731 <th scope="row"><label for="social_whatsapp">’ . esc_attr__(‘WhatsApp Phone Number’, ‘under-construction-page’) . ‘</label></th>1732 <td><input id="social_whatsapp" type="text" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_whatsapp]" value="’ . esc_attr($options[‘social_whatsapp’]) . ‘" placeholder="’ . esc_attr__('123-456-789’, ‘under-construction-page’) . '">’;1733 echo ‘<p class="description">’ . esc_attr__('WhatsApp phone number in international format without + or 00 prefix.’, ‘under-construction-page’) . '</p>’;1734 echo '</td></tr>’;17351736 echo ‘<tr valign="top" class="hidden">1737 <th scope="row"><label for="social_email">’ . esc_attr__(‘Email Address’, ‘under-construction-page’) . ‘</label></th>1738 <td><input id="social_email" type="email" class="regular-text code" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_email]" value="’ . esc_attr($options[‘social_email’]) . ‘" placeholder="’ . esc_attr__('[email protected]’, ‘under-construction-page’) . '">’;1739 echo ‘<p class="description">’ . esc_attr__('Email will be encoded on the page to protect it from email address harvesters.’, ‘under-construction-page’) . '</p>’;1740 echo '</td></tr>’;17411742 echo ‘<tr valign="top" class="hidden">1743 <th scope="row"><label for="social_phone">’ . esc_attr__(‘Phone Number’, ‘under-construction-page’) . ‘</label></th>1744 <td><input id="social_phone" type="tel" class="regular-text" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[social_phone]" value="’ . esc_attr($options[‘social_phone’]) . ‘" placeholder="’ . esc_attr__('+1-123-456-789’, ‘under-construction-page’) . '">’;1745 echo ‘<p class="description">’ . esc_attr__('Phone number in full international format.’, ‘under-construction-page’) . '</p>’;1746 echo '</td></tr>’;17471748 echo ‘<tr><th colspan="2"><a id="show-social-icons" href="#" class="js-action">’ . esc_attr__('Show more Social & Contact Icons’, ‘under-construction-page’) . '</a></th></tr>’;17491750 echo '</table>’;17511752 echo '</div>’;17531754 self::footer_buttons();1755 } // tab_content175617571758 static function get_themes()1759 {1760 $themes = array(1761 ‘_pro_custom’ => esc_attr__('Build Your Own Custom Theme’, ‘under-construction-page’),1762 ‘mad_designer’ => esc_attr__('Mad Designer’, ‘under-construction-page’),1763 ‘_pro_simple-beige’ => esc_attr__('Simple Beige Text’, ‘under-construction-page’),1764 ‘plain_text’ => esc_attr__('Plain Text’, ‘under-construction-page’),1765 ‘_pro_simple-office-theme’ => esc_attr__('Simple Office’, ‘under-construction-page’),1766 ‘under_construction’ => esc_attr__('Under Construction’, ‘under-construction-page’),1767 ‘_pro_model-portfolio’ => esc_attr__('Model Portfolio’, ‘under-construction-page’),1768 ‘dark’ => esc_attr__('Things Went Dark’, ‘under-construction-page’),1769 ‘_pro_watch-company’ => esc_attr__('The Watch Store’, ‘under-construction-page’),1770 ‘forklift’ => esc_attr__('Forklift at Work’, ‘under-construction-page’),1771 ‘_pro_sport-shop’ => esc_attr__('Sport Shop’, ‘under-construction-page’),1772 ‘under_construction_text’ => esc_attr__('Under Construction Text’, ‘under-construction-page’),1773 ‘_pro_cloud-business-inc’ => esc_attr__('Cloud Business’, ‘under-construction-page’),1774 ‘cyber_chick’ => esc_attr__('Cyber Chick’, ‘under-construction-page’),1775 ‘_pro_photography’ => esc_attr__('Photography’, ‘under-construction-page’),1776 ‘rocket’ => esc_attr__('Rocket Launch’, ‘under-construction-page’),1777 ‘_pro_smoothie’ => esc_attr__('Green Smoothie Webinar’, ‘under-construction-page’),1778 ‘loader’ => esc_attr__('Loader at Work’, ‘under-construction-page’),1779 ‘_pro_stunning-nature’ => esc_attr__('Stunning Nature’, ‘under-construction-page’),1780 ‘cyber_chick_dark’ => esc_attr__('Cyber Chick Dark’, ‘under-construction-page’),1781 ‘_pro_small-office’ => esc_attr__('Small Office’, ‘under-construction-page’),1782 ‘safe’ => esc_attr__('Safe’, ‘under-construction-page’),1783 ‘people’ => esc_attr__('People at Work’, ‘under-construction-page’),1784 ‘_pro_custom’ => esc_attr__('Build Your Own Custom Theme’, ‘under-construction-page’),1785 ‘windmill’ => esc_attr__('Windmill’, ‘under-construction-page’),1786 ‘sad_site’ => esc_attr__('Sad Site’, ‘under-construction-page’),1787 ‘_pro-soothing-nature’ => esc_attr__('Soothing Nature’, ‘under-construction-page’),1788 ‘lighthouse’ => esc_attr__('Lighthouse’, ‘under-construction-page’),1789 ‘hot_air_baloon’ => esc_attr__('Hot Air Balloon’, ‘under-construction-page’),1790 ‘_pro_business-statistics’ => esc_attr__('Business Statistics’, ‘under-construction-page’),1791 ‘people_2’ => esc_attr__('People at Work #2’, ‘under-construction-page’),1792 ‘rocket_2’ => esc_attr__('Rocket Launch #2’, ‘under-construction-page’),1793 ‘_pro_travel-blog’ => esc_attr__('Travel Blog’, ‘under-construction-page’),1794 ‘light_bulb’ => esc_attr__('Light Bulb’, ‘under-construction-page’),1795 ‘ambulance’ => esc_attr__('Ambulance’, ‘under-construction-page’),1796 ‘_pro_forest-in-the-fog’ => esc_attr__('Forest in the Fog’, ‘under-construction-page’),1797 ‘laptop’ => esc_attr__('Laptop’, ‘under-construction-page’),1798 ‘puzzles’ => esc_attr__('Puzzles’, ‘under-construction-page’),1799 ‘_pro_sunset’ => esc_attr__('Sunset’, ‘under-construction-page’),1800 ‘iot’ => esc_attr__('Internet of Things’, ‘under-construction-page’),1801 ‘setup’ => esc_attr__('Setup’, ‘under-construction-page’),1802 ‘_pro_fitness-studio’ => esc_attr__('Fitness Studio Landing Page’, ‘under-construction-page’),1803 ‘stop’ => esc_attr__('Stop’, ‘under-construction-page’),1804 ‘clock’ => esc_attr__('Clock’, ‘under-construction-page’),1805 ‘_pro_mountain’ => esc_attr__('Mountain Peak’, ‘under-construction-page’),1806 ‘bulldozer’ => esc_attr__('Bulldozer at Work’, ‘under-construction-page’),1807 ‘christmas’ => esc_attr__('Christmas Greetings’, ‘under-construction-page’),1808 ‘_pro_pink-lips’ => esc_attr__('Pink Lips’, ‘under-construction-page’),1809 ‘hard_worker’ => esc_attr__('Hard Worker’, ‘under-construction-page’),1810 ‘closed’ => esc_attr__('Temporarily Closed’, ‘under-construction-page’),1811 ‘_pro_animated-green’ => esc_attr__('Simple Green Animated’, ‘under-construction-page’),1812 ‘dumper_truck’ => esc_attr__('Dumper Truck’, ‘under-construction-page’),1813 ‘000webhost’ => esc_attr__('000webhost’, ‘under-construction-page’),1814 ‘_pro_grayscale-city’ => esc_attr__('Grayscale City’, ‘under-construction-page’),1815 ‘work_desk’ => esc_attr__('Work Desk’, ‘under-construction-page’),1816 ‘research’ => esc_attr__('Research’, ‘under-construction-page’),1817 ‘_pro_wedding’ => esc_attr__('Wedding’, ‘under-construction-page’)1818 );18191820 $themes = apply_filters('ucp_themes’, $themes);18211822 return $themes;1823 } // get_themes182418251826 static function tab_design()1827 {1828 $options = self::get_options();18291830 $img_path = UCP_PLUGIN_URL . 'images/thumbnails/’;1831 $themes = self::get_themes();18321833 echo '<table class="form-table">’;1834 echo ‘<tr valign="top">1835 <td colspan="2"><b style="margin-bottom: 10px; display: inline-block;">’ . esc_attr__('Theme’, ‘under-construction-page’) . ‘</b> (<a target="_blank" href="’ . esc_url(self::generate_web_link('themes-browse-premium’, ‘templates’)) . ‘">browse 350+ premium themes</a>)<br>’;1836 echo ‘<input type="hidden" id="theme_id" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[theme]" value="’ . esc_attr($options[‘theme’]) . '">’;18371838 foreach ($themes as $theme_id => $theme_name) {1839 if ($theme_id === $options[‘theme’]) {1840 $class = ' active’;1841 } else {1842 $class = '’;1843 }1844 if (substr($theme_id, 0, 4) == ‘_pro’) {1845 $theme_id = substr($theme_id, 5);1846 echo ‘<div class="ucp-thumb ucp-thumb-pro" data-theme-id="’ . esc_attr($theme_id) . ‘"><img src="’ . esc_attr($img_path) . ‘pro/’ . esc_attr($theme_id) . ‘.jpg" alt="’ . esc_attr($theme_name) . ‘" title="’ . esc_attr($theme_name) . ‘"><span>’ . esc_attr($theme_name) . '</span>’;1847 echo ‘<div class="buttons"><a href="#" data-pro-ad="activate_’ . esc_attr($theme_id) . '" class="open-ucp-upsell button button-primary">Activate</a> ';1848 if ($theme_id != ‘custom’) {1849 echo ‘<a href="https://templates.underconstructionpage.com/?ucp_template_preview&template=’ . esc_attr($theme_id) . '&utm_source=ucp-free&utm_medium=plugin&utm_content=design-preview-' . esc_attr($theme_id) . ‘&utm_campaign=ucp-free-v’ . esc_attr(self::$version) . '" class="button-secondary" target="_blank">Preview</a>’;1850 }1851 echo '</div>’;1852 echo '<div title="PRO template" class="ribbon"><i><span class="dashicons dashicons-star-filled"></span></i></div></div>’;1853 } else {1854 echo ‘<div class="ucp-thumb’ . esc_attr($class) . ‘" data-theme-id="’ . esc_attr($theme_id) . ‘"><img src="’ . esc_attr($img_path . $theme_id) . ‘.png" alt="’ . esc_attr($theme_name) . ‘" title="’ . esc_attr($theme_name) . ‘"><span>’ . esc_attr($theme_name) . '</span>’;1855 echo '<div class="buttons">’;1856 if ($theme_id !== $options[‘theme’]) {1857 echo '<a href="#" class="button button-primary activate-theme">Activate</a> ';1858 }1859 echo ‘<a href="’ . esc_url(get_home_url()) . ‘/?ucp_preview&theme=’ . esc_attr($theme_id) . '" class="button-secondary" target="_blank">Preview</a></div>’;1860 echo '</div>’;1861 }1862 } // foreach18631864 echo '</td></tr>’;18651866 echo ‘<tr valign="top">1867 <th scope="row"><label for="custom_css">’ . esc_attr__('Custom CSS’, ‘under-construction-page’) . ‘</label></th>1868 <td>’;1869 echo ‘<textarea data-autoresize="1" rows="3" id="custom_css" class="code large-text" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[custom_css]" placeholder=".selector { property-name: property-value; }">’ . esc_textarea($options[‘custom_css’]) . '</textarea>’;1870 echo '<p class="description"><style> tags will be added automatically. Do not include them in your code.<br>1871 For RTL languages support add: <code>body { direction: rtl; }</code><br>If you need help with writing custom CSS code, post your question on the <a href="https://wordpress.org/support/plugin/under-construction-page/" target="_blank">official forum</a>.</p>’;1872 echo '</td></tr>’;18731874 echo '</table>’;18751876 self::footer_buttons();1877 } // tab_design187818791880 // markup & logic for access tab1881 static function tab_access()1882 {1883 $options = self::get_options();1884 $default_options = self::default_options();1885 $roles = $users = array();18861887 $tmp_roles = get_editable_roles();1888 foreach ($tmp_roles as $tmp_role => $details) {1889 $name = translate_user_role($details[‘name’]);1890 $roles[] = array(‘val’ => $tmp_role, ‘label’ => $name);1891 }18921893 $tmp_users = get_users(array(‘fields’ => array('id’, ‘display_name’)));1894 foreach ($tmp_users as $user) {1895 $users[] = array(‘val’ => $user->id, ‘label’ => $user->display_name);1896 }18971898 echo '<div class="ucp-tab-content">’;1899 echo '<table class="form-table">’;19001901 echo ‘<tr valign="top">1902 <th scope="row"><label for="whitelisted_ips">’ . esc_attr__('Whitelisted IP Addresses’, ‘under-construction-page’) . '</label></th>1903 <td>’;1904 echo '<div class="toggle-wrapper">1905 <input type="checkbox" id="whitelisted_ips" type="checkbox" value="1" class="skip-save open-ucp-upsell">1906 <label for="whitelisted_ips" class="toggle"><span class="toggle_handler"></span></label>1907 </div>’;1908 echo '<p>Listed IP addresses (both IPv4 and IPv6 are supported) will not be affected by the under construction mode and their users will always see the “normal” site. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="whitelisted_ips">PRO feature</a>.’;1909 echo '<td></tr>’;19101911 echo ‘<tr valign="top">1912 <th scope="row"><label for="access_links">’ . esc_attr__('Secret Direct Access Links’, ‘under-construction-page’) . '</label></th>1913 <td>’;1914 echo '<div class="toggle-wrapper">1915 <input type="checkbox" id="access_links" type="checkbox" value="1" class="skip-save open-ucp-upsell">1916 <label for="access_links" class="toggle"><span class="toggle_handler"></span></label>1917 </div>’;1918 echo '<p>The most flexible and user-friendly way (especially when working with clients) to give only selected visitors access to the “normal” site. Simply generate a new link, configure expiration options (time, number of visits or unique IPs) and share it with users to allow them access to the site. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="access_links">PRO feature</a>.’;1919 echo '<td></tr>’;19201921 echo ‘<tr valign="top" id="whitelisted-roles">1922 <th scope="row">’ . esc_attr__('Whitelisted User Roles’, ‘under-construction-page’) . '</th>1923 <td>’;1924 foreach ($roles as $tmp_role) {1925 echo ‘<input name="’ . esc_attr(UCP_OPTIONS_KEY) . '[whitelisted_roles][]" id="roles-' . esc_attr($tmp_role[‘val’]) . ‘" ' . esc_attr(self::checked($tmp_role[‘val’], $options[‘whitelisted_roles’], false)) . ' value="’ . esc_attr($tmp_role[‘val’]) . '" type="checkbox" /> <label for="roles-' . esc_attr($tmp_role[‘val’]) . ‘">’ . esc_attr($tmp_role[‘label’]) . '</label><br />’;1926 }1927 echo ‘<p class="description">’ . __('Selected user roles will <b>not</b> be affected by the under construction mode and will always see the “normal” site. Default: administrator.’, ‘under-construction-page’) . '</p>’;1928 echo '</td></tr>’;19291930 echo ‘<tr valign="top">1931 <th scope="row"><label for="whitelisted_users">’ . esc_attr__('Whitelisted Users’, ‘under-construction-page’) . ‘</label></th>1932 <td><select id="whitelisted_users" class="select2" style="width: 50%; max-width: 300px;" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[whitelisted_users][]" multiple>’;1933 self::create_select_options($users, $options[‘whitelisted_users’], true);19341935 echo ‘</select><p class="description">’ . __('Selected users (when logged in) will <b>not</b> be affected by the under construction mode and will always see the “normal” site.’, ‘under-construction-page’) . '</p>’;1936 echo '</td></tr>’;19371938 echo '<tr>’;1939 echo ‘<th><label for="url_rules">’ . esc_attr__('URL Based Rules’, ‘under-construction-page’) . '</label></th>’;1940 echo '<td><select class="skip-save open-ucp-upsell" id="url_rules">’;1941 echo '<option value="0">Disabled</option>’;1942 echo '<option class="ucp-promo" value="-1">Listed URLs will NEVER be affected by UCP</option>’;1943 echo '<option class="ucp-promo" value="-1">ONLY listed URLs CAN BE affected by UCP</option>’;1944 echo '</select>’;1945 echo '<p class="description">Use this option to set per URL rules and lock down the entire site except selected pages; or lock down just some pages and leave all others accessible to visitors. If second option is used all other access rules still apply. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="url_rules">PRO feature</a>.</p>’;1946 echo '</td>’;1947 echo '</tr>’;19481949 echo ‘<tr>1950 <th scope="row"><label for="direct_access_password">’ . esc_attr__('Direct Access Password’, ‘under-construction-page’) . '</label></th>1951 <td>’;1952 echo '<input id="direct_access_password" type="text" class="skip-save open-ucp-upsell" value="" placeholder="">’;1953 echo ‘<p class="description">Direct Access Password is the most user-friendly way (especially when working with clients) to give selected users access to the “normal” site. Choose a password, save changes, and send users this link: <a href="’ . esc_url(get_home_url()) . ‘/#access-site-form">’ . esc_url(get_home_url()) . '/#access-site-form</a> or enable the “Password Form Button” option to show the password form button. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="whitelisted_ips">PRO feature</a>.</p>’;1954 echo '</td></tr>’;19551956 echo ‘<tr valign="top">1957 <th scope="row"><label for="site_password">’ . esc_attr__('Password Protect Under Construction Page’, ‘under-construction-page’) . '</label></th>1958 <td>’;1959 echo '<div class="toggle-wrapper">1960 <input type="checkbox" id="site_password" type="checkbox" value="1" class="skip-save open-ucp-upsell">1961 <label for="site_password" class="toggle"><span class="toggle_handler"></span></label>1962 </div>’;1963 echo '<p class="description">Protected the entire site with a password you choose. Only those with the password can view the under construction page. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="whitelisted_ips">PRO feature</a>.</p>’;1964 echo '</td></tr>’;19651966 echo '</table>’;1967 echo '</div>’;19681969 self::footer_buttons();1970 } // tab_access197119721973 // support tab - FAQ and links1974 static function tab_support()1975 {1976 $user = wp_get_current_user();1977 $theme = wp_get_theme();1978 $options = self::get_options();19791980 echo '<div id="tabs_support" class="ui-tabs ucp-tabs-2nd-level">’;1981 echo '<ul>’;1982 echo ‘<li><a href="#tab_support_contact">’ . esc_attr__('Contact Support’, ‘under-construction-page’) . '</a></li>’;1983 echo ‘<li><a href="#tab_support_faq">’ . esc_attr__('FAQ’, ‘under-construction-page’) . '</a></li>’;1984 echo '</ul>’;19851986 echo '<div style="display: none;" id="tab_support_faq" class="ucp-tab-content">’;19871988 echo ‘<p><b>Do you have any documentation?</b><br>Yes, <a href="’ . esc_url(self::generate_web_link('faq-documentation’, ‘documentation-free’)) . '" target="_blank">detailed documentation</a> with how-to guides is available on the plugins\’s site.</p>’;19891990 echo '<p><b>Do you have a video to help me get started?</b><br>We sure do! <a href="https://www.youtube.com/watch?v=RN4XABhK7_w" target="_blank">Getting started with the UnderConstructionPage plugin</a>. If that doesn\’t help we also have an <a href="https://www.youtube.com/watch?v=K3DF-NP6Fog" target="_blank">in-depth video walktrough</a>. In case you\’re still uncertain about something don\’t hesitate to contact our friendly support.</p>’;19911992 echo '<p><b>UCP is disabled but Twitter and Facebook still show it as my site\’s preview/thumbnail when I post the URL</b><br>Twitter and Facebook have their own cache which has to be refreshed. You can either wait and the problem will resolve itself in about a day or you can manually refresh the cache.<br>For Facebook open the <a href="https://developers.facebook.com/tools/debug/" target="_blank">Debugger</a>, input the URL, click “Debug". Once the results who up click “Scrape Again” to fetch the latest version of the page.<br>For Twitter, open the <a href="https://cards-dev.twitter.com/validator” target="_blank">Card validator</a>, enter the URL and click “Preview card". Latest version of the site should appear.</p>’;19931994 echo '<p><b>How can I build a custom page or customize themes?</b><br>If you know how to code custom CSS a lot can be accomplished by using the <a class="change_tab” data-tab="1" href="#custom_css">custom CSS</a> option. A much faster and easier solution is to check out <a href="#" data-pro-ad="faq-custom-css" class="open-ucp-upsell">UCP PRO</a> with an easy-to-use drag&drop builder and dozens of pre-built themes.</p>’;19951996 echo ‘<p><b>How can I check if construction mode is really enabled on my site?</b><br>If the under construction status is green in the admin bar (the very top of the page, above this text), then it\’s enabled. But we made a tool specifically for these kinds of situations so you can double-check everything. <a href="’ . esc_url(self::generate_web_link('faq-tester’, 'under-construction-tester/’, array(‘url’ => get_home_url()))) . '" target="_blank">Run under construction mode tester</a>.</p>’;19971998 echo '<p><b>How can I work on my site while construction mode is enabled?</b><br>Make sure your user role (probably admin) is selected under <a class="change_tab" data-tab="3" href="#whitelisted-roles">Access - Whitelisted User Roles</a> and open the site while logged in.</p>’;19992000 echo '<p><b>How can I log in / access WordPress admin after construction mode has been enabled?</b><br>Enable the <a class="change_tab" data-tab="2" href="#login_button_wrap">Login Button</a> option under Content, and a login link will be shown in the lower right corner of the under construction page.</p>’;20012002 echo '<p><b>How do I add my logo to the page?</b><br>Head over to <a class="change_tab" data-tab="2" href="#content_wrap">Content</a> and click “Add Media". Upload/select the logo, position it as you see fit and add other content.</p>’;20032004 echo '<p><b>I\’ve made changes to UCP, but they are not visible. What do I do?</b><br>Click “Save Changes” one more time. Open your site and force refresh browser cache (Ctrl or Shift + F5). If that doesn\’t help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it.</p>’;20052006 echo '<p><b>How can I get more designs? Where do I download them?</b><br>We update the plugin every 7-10 days and each update comes with at least one new theme/design. There is no other way of getting more designs nor a place to download them.</p>’;20072008 echo '<p><b>How can I edit designs?</b><br>There is an option to add <a class="change_tab” data-tab="1" href="#custom_css">custom CSS</a>. If you want more than that you will have to edit the source files located in <code>/under-construction-page/themes/</code>.</p>’;20092010 echo '<p><b>I have disabled UCP but the under construction page is still visible. How do I remove it?</b><br>Open your site and force refresh browser cache (Ctrl or Shift + F5). If that doesn\’t help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it. If that fails too contact your hosting provider and ask to empty the site cache for you.</p>’;20112012 echo '<p><b>I have disabled UCP but the site\’s favicon is still the UCP logo. How do I change/remove it?</b><br>Make sure your theme has a favicon defined and empty all caches - browser and server ones. Open the site and force refresh browser cache (Ctrl or Shift + F5). If that doesn\’t help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it. If that fails too contact your hosting provider and ask to empty the site cache for you.</p>’;20132014 echo '</div>’; // faq20152016 echo '<div style="display: none;" id="tab_support_contact" class="ucp-tab-content">’;20172018 echo '<div id="support-hero"><p>Our average response time is 1.5h! <b>85% of tickets are resolved within 1 hour!</b> No ticket is left unanswered. If something is not working, don\’t think twice;</p><p><a class="button button-primary" href="https://wordpress.org/support/plugin/under-construction-page/#new-post" target="_blank">OPEN A SUPPORT TICKET NOW</a></p></div>’;20192020 echo '<p class="description">Our support agents need this info to provide faster & better support. Please include the following data in your message;</p>’;2021 echo ‘<p>WordPress version: <code>’ . get_bloginfo(‘version’) . '</code><br>’;2022 echo ‘UCP Version: <code>’ . esc_attr(self::$version) . '</code><br>’;2023 echo ‘PHP Version: <code>’ . esc_attr(PHP_VERSION) . '</code><br>’;2024 echo ‘Site URL: <code>’ . esc_url(get_bloginfo(‘url’)) . '</code><br>’;2025 echo ‘WordPress URL: <code>’ . esc_url(get_bloginfo(‘wpurl’)) . ‘</code><br>’;2026 echo ‘Theme: <code>’ . esc_attr($theme->get(‘Name’) . ' v’ . $theme->get(‘Version’)) . '</code>’;2027 echo '</p>’;20282029 echo '</div>’; // contact20302031 echo '</div>’; // tabs2032 } // tab_support203320342035 // tab PRO2036 static function tab_pro()2037 {2038 $options = self::get_options();20392040 echo '<div class="ucp-tab-content">’;2041 echo ‘<h3 class="ucp-pro-logo"><a href="’ . esc_url(self::generate_web_link(‘pro-tab-logo’)) . ‘" target="_blank"><img src="’ . esc_url(UCP_PLUGIN_URL) . 'images/ucp_pro_logo.png" alt="UnderConstructionPage PRO" title="UnderConstructionPage"></a></h3>’;20422043 if (UCP_license::is_activated()) {2044 $plugin = plugin_basename(__FILE__);2045 $update_url = wp_nonce_url(admin_url(‘update.php?action=upgrade-plugin&plugin=’ . urlencode($plugin)), ‘upgrade-plugin_’ . $plugin);2046 } else {2047 echo '<div id="ucp-earlybird"><span>Build <b>landing pages, coming soon pages, maintenance & under construction pages</b> faster & easier!</span>’;2048 if (self::is_promo_active() == ‘welcome’) {2049 echo '<p class="textcenter"><a data-pro-ad="get_pro" href="#" class="button button-primary button-large open-ucp-upsell">Get <b>PRO</b> now with a LIMITED <b>welcoming discount</b>! Offer is valid for only <b class="ucp-countdown">59min 33sec</b>.</a></p>’;2050 } elseif (self::is_promo_active() == ‘olduser’) {2051 echo '<p class="textcenter"><a data-pro-ad="get_pro" href="#" class="button button-primary button-large open-ucp-upsell">Get <b>PRO</b> now with a special <b>DISCOUNT for long-term users</b>!</a></p>’;2052 } else {2053 echo '<p class="textcenter"><a data-pro-ad="get_pro" href="#" class="button button-primary button-large open-ucp-upsell">Get <b>PRO</b> now!</a></p>’;2054 }2055 echo '</div>’;2056 }2057 echo '</div>’;205820592060 echo '<div class="ucp-tab-content">’;2061 echo '<table class="form-table">’;20622063 echo ‘<tr valign="top">2064 <th scope="row"><label for="license_key">’ . esc_attr__('License Key’, ‘under-construction-page’) . ‘</label></th>’;2065 echo ‘<td><input type="text" id="license_key" class="regular-text" name="’ . esc_attr(UCP_OPTIONS_KEY) . '[license_key]" value="’ . esc_attr($options[‘license_key’]) . '" placeholder="12345-12345-12345-12345" />’;2066 echo '<p class="description">License key is located in the confirmation email you received after purchasing.<br>In case of any problems, please contact <a href="#" data-tab="4" class="change_tab">support</a>. If you don\’t have a PRO license key - <a data-pro-ad="get_key" href="#" class="open-ucp-upsell">get it now</a>.</p>’;2067 echo '<p class="description">By attempting to activate a license you agree to share the following data with <a href="https://www.webfactoryltd.com/" target="_blank">WebFactory Ltd</a>: license key, site URL, site IP address, site title, site WP version, and UnderConstructionPage (free) version.</p>’;2068 echo '</td></tr>’;20692070 if (!empty($options[‘license_key’])) {2071 if (UCP_license::is_activated()) {2072 if ($options[‘license_expires’] == ‘2035-01-01’) {2073 $valid = 'indefinitely’;2074 } else {2075 $valid = 'until ' . date('F jS, Y’, strtotime($options[‘license_expires’]));2076 if (date(‘Y-m-d’) == $options[‘license_expires’]) {2077 $valid .= '; expires today’;2078 } elseif (date(‘Y-m-d’, time() + 30 * DAY_IN_SECONDS) > $options[‘license_expires’]) {2079 $tmp = (strtotime($options[‘license_expires’] . date(' G:i:s’)) - time()) / DAY_IN_SECONDS;2080 $valid .= '; expires in ' . round($tmp) . ' days’;2081 }2082 }2083 echo ‘<tr>2084 <th scope="row"><label for="">’ . esc_attr__('License Status’, ‘under-construction-page’) . '</label></th>2085 <td><b style="color: #66b317;">Active</b><br>2086 Type: ' . esc_attr(str_replace('pro’, 'PRO’, $options[‘license_type’]));2087 echo '<br>Valid ' . esc_attr($valid) . '</td>2088 </tr>’;2089 } else {2090 echo ‘<tr>2091 <th scope="row"><label for="">’ . esc_attr__('License Status’, ‘under-construction-page’) . '</label></th>2092 <td><b style="color: #ea1919;">Inactive</b>’;2093 if (!empty($options[‘license_type’])) {2094 echo '<br>Type: ' . esc_attr($options[‘license_type’]);2095 }2096 if (!empty($options[‘license_expires’]) && $options[‘license_expires’] != ‘1900-01-01’ && $options[‘license_expires’] != ‘1970-01-01’) {2097 echo '<br>Expired on ' . esc_attr(date('F jS, Y’, strtotime($options[‘license_expires’])));2098 }2099 echo '</td></tr>’;2100 }2101 }21022103 echo '</table>’;2104 echo '</div>’;21052106 echo '<p class="submit">’;2107 self::wp_kses_wf(get_submit_button(esc_attr__('Save & Validate License Key’, ‘under-construction-page’), 'large secondary’, 'license-submit’, false));2108 echo '</p>’;2109 } // tab_pro211021112112 // output the whole options page2113 static function main_page()2114 {2115 if (!current_user_can(‘manage_options’)) {2116 wp_die(‘You do not have sufficient permissions to access this page.’);2117 }21182119 echo ‘<div class="wrap">2120 <h1 class="ucp-logo"><a href="’ . esc_url(admin_url(‘options-general.php?page=ucp’)) . ‘"><img src="’ . esc_url(UCP_PLUGIN_URL) . ‘images/ucp_logo.png" class="rotate" alt="UnderConstructionPage" title="UnderConstructionPage"><img src="’ . esc_url(UCP_PLUGIN_URL) . 'images/ucp_logo_2.png" class="ucp-logo-text" alt="UnderConstructionPage" title="UnderConstructionPage"></a></h1>’;21212122 echo '<form action="options.php" method="post" id="ucp_form">’;2123 settings_fields(UCP_OPTIONS_KEY);21242125 $tabs = array();2126 $tabs[] = array(‘id’ => 'ucp_main’, ‘icon’ => 'dashicons-admin-settings’, ‘class’ => '’, ‘label’ => __('Main’, ‘under-construction-page’), ‘callback’ => array(__CLASS__, ‘tab_main’));2127 $tabs[] = array(‘id’ => 'ucp_design’, ‘icon’ => 'dashicons-admin-customizer’, ‘class’ => '’, ‘label’ => esc_attr__('Design’, ‘under-construction-page’), ‘callback’ => array(__CLASS__, ‘tab_design’));2128 $tabs[] = array(‘id’ => 'ucp_content’, ‘icon’ => 'dashicons-format-aside’, ‘class’ => '’, ‘label’ => esc_attr__('Content’, ‘under-construction-page’), ‘callback’ => array(__CLASS__, ‘tab_content’));2129 $tabs[] = array(‘id’ => 'ucp_access’, ‘icon’ => 'dashicons-shield’, ‘class’ => '’, ‘label’ => esc_attr__('Access’, ‘under-construction-page’), ‘callback’ => array(__CLASS__, ‘tab_access’));2130 $tabs[] = array(‘id’ => 'ucp_support’, ‘icon’ => 'dashicons-sos’, ‘class’ => '’, ‘label’ => esc_attr__('Support’, ‘under-construction-page’), ‘callback’ => array(__CLASS__, ‘tab_support’));2131 $tabs[] = array(‘id’ => 'ucp_pro’, ‘icon’ => 'dashicons-star-filled’, ‘class’ => '’, ‘label’ => esc_attr__('PRO’, ‘under-construction-page’), ‘callback’ => array(__CLASS__, ‘tab_pro’));21322133 $tabs = apply_filters('ucp_tabs’, $tabs);21342135 echo '<div id="ucp_tabs" class="ui-tabs" style="display: none;">’;2136 echo '<ul class="ucp-main-tab">’;2137 foreach ($tabs as $tab) {2138 if (!empty($tab[‘label’])) {2139 echo ‘<li><a href="#’ . esc_attr($tab[‘id’]) . ‘" class="’ . esc_attr($tab[‘class’]) . '"><span class="icon"><span class="dashicons ' . esc_attr($tab[‘icon’]) . ‘"></span></span><span class="label">’ . esc_attr($tab[‘label’]) . '</span></a></li>’;2140 }2141 }2142 echo '</ul>’;21432144 foreach ($tabs as $tab) {2145 if (is_callable($tab[‘callback’])) {2146 echo ‘<div style="display: none;" id="’ . esc_attr($tab[‘id’]) . '">’;2147 call_user_func($tab[‘callback’]);2148 echo '</div>’;2149 }2150 } // foreach2151 echo '</div>’; // ucp_tabs21522153 echo '</form>’; // ucp_tabs21542155 echo '<div id="ucp-sidebar-ads">’;2156 echo '<div id="ucp-ad">’;2157 echo '<h3 class="textcenter">Upgrade to build landing pages, coming soon pages, maintenance & under construction pages faster & easier!</h3>’;2158 echo ‘<p class="textcenter"><a href="#" class="textcenter open-ucp-upsell" data-pro-ad="sidebar-logo"><img style="max-width: 90%;" src="’ . esc_url(UCP_PLUGIN_URL) . '/images/ucp_pro_logo.png" alt="UnderConstructionPage PRO" title="UnderConstructionPage PRO"></a></p>’;2159 echo '<ul class="plain-list">2160 <li>350+ templates</li>2161 <li>5+ million searchable HD images</li>2162 <li>Drag & drop builder</li>2163 <li>Email autoresponders integration</li>2164 <li>Affiliate & traffic tracking</li>2165 <li>White-label Mode</li>2166 <li>Friendly email support from plugin developers</li>2167 </ul>’;2168 echo '<p class="textcenter"><a href="#" class="button button-primary button-large open-ucp-upsell" data-pro-ad="sidebar-button">Get PRO Now</a></p>’;2169 echo '</div>’;21702171 if (!defined(‘WPFSSL_OPTIONS_KEY’)) {2172 echo '<div id="wpfssl-ad">’;2173 echo '<h3 class="textcenter"><b>Problems with SSL certificate?<br>Moving a site from HTTP to HTTPS?<br>Mixed content giving you troubles?</b><br><br><u>Fix all SSL problems with one plugin!</u></h3>’;2174 echo ‘<p class="textcenter"><a href="#" class="textcenter install-wpfssl"><img style="max-width: 90%;" src="’ . esc_url(UCP_PLUGIN_URL) . '/images/wp-force-ssl-logo.png" alt="WP Force SSL" title="WP Force SSL"></a></p>’;2175 echo '<p class="textcenter"><br><a href="#" class="install-wpfssl button button-primary">Install & activate the free WP Force SSL plugin</a></p><p><a href="https://wordpress.org/plugins/wp-force-ssl/" target="_blank">WP Force SSL</a> is a free WP plugin maintained by the same team as this Maintenance plugin. It has <b>+150,000 users, 5-star rating</b>, and is hosted on the official WP repository.</p>’;2176 echo '</div>’;2177 }2178 echo '</div>’;2179 echo '</div>’; // wrap21802181 // weglot install dialog2182 echo '<div id="weglot-upsell-dialog" style="display: none;" title="Weglot"><span class="ui-helper-hidden-accessible"><input type="text"/></span>’;2183 echo '<div style="padding: 20px; font-size: 15px;">’;2184 echo '<ul class="ucp-list">’;2185 echo '<li>Best-rated WordPress multilingual plugin</li>’;2186 echo '<li>Simple 5-minute set-up. No coding required</li>’;2187 echo '<li>Accelerated translation management: Machine & human translations with access to professional translators</li>’;2188 echo '<li>Compatible with any WordPress theme or plugin</li>’;2189 echo '<li>Optimized for multilingual SEO</li>’;2190 echo '<li>10-day Free trial and free plan available</li>’;2191 echo '</ul>’;2192 echo '<p class="upsell-footer"><a class="button button-primary" id="install-weglot">Install & activate Weglot to make your website multilingual</a></p>’;2193 echo '</div>’;2194 echo '</div>’;2195 // weglot install dialog21962197 $promo = self::is_promo_active();2198 if ($promo == ‘welcome’) {2199 $header = 'A <b>welcoming discount</b> has been applied to selected packages! It\’s <b>time limited</b> and available for only another <b class="ucp-countdown">59min 30sec</b>.’;2200 } elseif ($promo == ‘olduser’) {2201 $header = 'A special <b>discount for long-term users</b> has been applied to selected packages!’;2202 } else {2203 $header = '’;2204 }22052206 $products[‘agency’] = array(‘link’ => self::generate_web_link('pricing-table’, 'buy2/’, array(‘product’ => ‘agency-welcome’)), ‘price’ => ‘BUY NOW <u>$51 OFF</u><br><del>$250</del> $199<br><small>Discount ends in <b class="ucp-countdown">59min 30sec</b></small>’);2207 $products[‘team’] = array(‘link’ => self::generate_web_link('pricing-table’, 'buy2/’, array(‘product’ => ‘team-welcome’)), ‘price’ => ‘BUY NOW <u>$30 OFF</u><br><del>$119</del> $89<br><small>Discount ends in <b class="ucp-countdown">59min 30sec</b></small>’);2208 $products[‘personal-monthly’] = array(‘link’ => self::generate_web_link('pricing-table’, 'buy2/’, array(‘product’ => ‘personal-monthly’)), ‘price’ => ‘only $8.99<small>/month</small>’);2209 $products[‘personal-yearly’] = array(‘link’ => self::generate_web_link('pricing-table’, 'buy2/’, array(‘product’ => ‘personal-yearly’)), ‘price’ => ‘BUY NOW<br>$49<small>/year</small>’);22102211 // upsell dialog2212 echo '<div id="upsell-dialog" style="display: none;" title="UnderConstructionPage PRO"><span class="ui-helper-hidden-accessible"><input type="text"/></span>’;2213 echo '<div id="tabs_upsell" class="ui-tabs ucp-tabs-2nd-level">’;2214 echo '<ul>’;2215 echo ‘<li><a href="#tab-upsell-buy">’ . esc_attr__('Get PRO’, ‘under-construction-page’) . '</a></li>’;2216 echo ‘<li><a href="#tab-upsell-features">’ . esc_attr__('Features’, ‘under-construction-page’) . '</a></li>’;2217 echo '</ul>’;22182219 echo '<div class="upsell-tab" id="tab-upsell-features" style="display: none;">’;2220 echo '<div class="ucp-pro-feature">’;2221 echo '<span>Frictionless Drag & Drop Builder</span>’;2222 echo '<p>Forget about complicated, cumbersome builders that have too many options! UCP builder was purpose-built for the task at hand. Simple, user-friendly & has only the options you need to build pages fast!</p>’;2223 echo '</div>’;22242225 echo '<div class="ucp-pro-feature">’;2226 echo '<span>5+ Million HD Searchable Images</span>’;2227 echo '<p>There\’s nothing worse than googling for hours just to find that the perfect image you need is either copyrighted or too small. Enjoy a vast library of 4K+ sized images - categorized & copyright free!</p>’;2228 echo '</div>’;22292230 echo '<div class="ucp-pro-feature">’;2231 echo '<span>350+ Templates</span>’;2232 echo '<p>Building your own page from scratch is fun, but often you don\’t have time to do it! Use one of our purpose-built templates, change a few lines of text and you\’re ready to rock!</p>’;2233 echo '</div>’;22342235 echo '<div class="ucp-pro-feature">’;2236 echo '<span>Affiliate & Traffic Tracking</span>’;2237 echo '<p>Having traffic is nice. Having targeted traffic is better! Generate tracked inbound links & share them on social media or with your affiliates to pinpoint the best traffic sources.</p>’;2238 echo '</div>’;22392240 echo '<div class="ucp-pro-feature">’;2241 echo '<span>Unlimited 3rd Party Integrations</span>’;2242 echo '<p>With our unique universal autoresponder support, you can integrate any email autoresponder or webinar system in a page within seconds. Or push data to Zapier to more than 1,000 applications.</p>’;2243 echo '</div>’;22442245 echo '<div class="ucp-pro-feature">’;2246 echo '<span>Made for Agencies & Webmasters</span>’;2247 echo '<p>Creating sites for others? We have your back! Our features, support & licensing options are optimised for agencies while in-house, USA based support guarantee your peace of mind.</p>’;2248 echo '</div>’;22492250 echo ‘<p class="upsell-footer">For a complete list of features, demos and screenshots visit <a href="’ . esc_url(self::generate_web_link(‘features-more-info’)) . '" target="_blank">underconstructionpage.com</a>. Already have a PRO license? <a href="#" class="go-to-license-key">Activate it</a>.</p>’;22512252 echo '</div>’; // features tab2253 echo '<div class="upsell-tab" id="tab-upsell-buy" style="display: none;">’;2254 if (!empty($header)) {2255 echo '<div class="upsell-header">’;2256 self::wp_kses_wf($header);2257 echo '</div>’;2258 }2259 echo ‘<table id="ucp-pricing-table">2260 <tbody>2261 <tr>2262 <td>2263 <h3>Lifetime<br>Agency License</h3>2264 </td>2265 <td>2266 <h3>Lifetime<br>Team License</h3>2267 </td>2268 <td>2269 <h3>Personal<br>License</h3>2270 </td>2271 </tr>2272 <tr>2273 <td>One Time Payment</td>2274 <td>One Time Payment</td>2275 <td>Yearly / Monthly Payment</td>2276 </tr>2277 <tr>2278 <td>100 Client or Personal Sites<br>(licenses are transferable between sites)</td>2279 <td>5 Personal or Client Sites</td>2280 <td>3 Personal Sites</td>2281 </tr>2282 <tr>2283 <td>White-Label License Mode</td>2284 <td><span class="dashicons dashicons-no"></td>2285 <td><span class="dashicons dashicons-no"></td>2286 </tr>2287 <tr>2288 <td>Lifetime Priority Support & Updates</td>2289 <td>Lifetime Support & Updates</td>2290 <td>1 Year/Month of Support & Updates</td>2291 </tr>2292 <tr style="display: none;">2293 <td>5 Million+ Hi-Res Images</td>2294 <td>5 Million+ Hi-Res Images</td>2295 <td>5 Million+ Hi-Res Images</td>2296 </tr>2297 <tr>2298 <td>Drag & Drop Builder</td>2299 <td>Drag & Drop Builder</td>2300 <td>Drag & Drop Builder</td>2301 </tr>2302 <tr>2303 <td>150+ PRO Templates</td>2304 <td>150+ PRO Templates</td>2305 <td>150+ PRO Templates</td>2306 </tr>2307 <tr>2308 <td>150+ Agency Templates</td>2309 <td>150+ Agency Templates</td>2310 <td><span class="dashicons dashicons-no"></td>2311 </tr>2312 <tr>2313 <td>Zapier Integration + Extra Modules</td>2314 <td><span class="dashicons dashicons-no"></td>2315 <td><span class="dashicons dashicons-no"></td>2316 </tr>2317 <tr class="bb0">2318 <td>2319 <a data-href-org="’ . esc_url($products[‘agency’][‘link’]) . ‘" class="promo-button go-to-license-key" href="’ . esc_url($products[‘agency’][‘link’]) . '" target="_blank">’;2320 self::wp_kses_wf($products[‘agency’][‘price’]);2321 echo ‘</a>2322 </td>2323 <td>2324 <a data-href-org="’ . esc_url($products[‘team’][‘link’]) . ‘" class="promo-button go-to-license-key" href="’ . esc_url($products[‘team’][‘link’]) . '" target="_blank">’;2325 self::wp_kses_wf($products[‘team’][‘price’]);2326 echo ‘</a>2327 </td>2328 <td>2329 <a style="margin-bottom: 8px;" data-href-org="’ . esc_url($products[‘personal-yearly’][‘link’]) . ‘" class="promo-button go-to-license-key" href="’ . esc_url($products[‘personal-yearly’][‘link’]) . '" target="_blank">’;2330 self::wp_kses_wf($products[‘personal-yearly’][‘price’]);2331 echo ‘</a>or <a target="_blank" class="go-to-license-key promo-link" data-href-org="’ . esc_url($products[‘personal-monthly’][‘link’]) . ‘" href="’ . esc_url($products[‘personal-monthly’][‘link’]) . '">’;2332 self::wp_kses_wf($products[‘personal-monthly’][‘price’]);2333 echo '</a>2334 </td>2335 </tr>2336 <tr class="bb0">2337 <td colspan="3"><span class="instant-download"><span class="dashicons dashicons-yes"></span> Secure payment via Paddle <span class="dashicons dashicons-yes"></span> Instant activation from WP admin <span class="dashicons dashicons-yes"></span> 100% No-Risk 7 Day Money Back Guarantee</span></td>2338 </tr>2339 </tbody>2340</table>’;2341 echo ‘<p class="upsell-footer">More pricing options & details about packages are available on <a href="’ . esc_url(self::generate_web_link(‘pricing-table-more-info’)) . '" target="_blank">underconstructionpage.com</a>. Already have a PRO license? <a href="#" class="go-to-license-key">Activate it</a>.</p>’;2342 echo '</div>’; // pricing tab2343 echo '</div>’;23442345 echo '</div>’; // upsell-dialog2346 } // main_page234723482349 // tests if any of the promotions are active and if so returns the name2350 static function is_promo_active()2351 {2352 $meta = self::get_meta();23532354 if ((time() - $meta[‘first_install’]) < HOUR_IN_SECONDS) {2355 return 'welcome’;2356 }23572358 if ((time() - $meta[‘first_install’]) > DAY_IN_SECONDS * 35) {2359 return 'olduser’;2360 }23612362 return false;2363 } // is_promo_active236423652366 // save and preview buttons2367 static function footer_buttons()2368 {2369 echo '<p class="submit">’;2370 self::wp_kses_wf(get_submit_button(esc_attr__('Save Changes’, ‘under-construction-page’), 'primary large’, ‘submit’, false));2371 echo '     <a id="ucp_preview" href="’ . esc_url(get_home_url()) . ‘/?ucp_preview" class="button button-large button-secondary" target="_blank">’ . esc_attr__('Preview’, ‘under-construction-page’) . '</a>’;2372 echo '</p>’;2373 } // footer_buttons237423752376 // reset all pointers to default state - visible2377 static function reset_pointers()2378 {2379 $pointers = array();23802381 $pointers[‘welcome’] = array(‘target’ => '#menu-settings’, ‘edge’ => 'left’, ‘align’ => 'right’, ‘content’ => ‘Thank you for installing the <b style="font-weight: 800; font-variant: small-caps;">UnderConstructionPage</b> plugin! Please open <a href="’ . admin_url(‘options-general.php?page=ucp’) . ‘">Settings - UnderConstruction</a> to create a beautiful under construction page.’);2382 $pointers[‘getting_started’] = array(‘target’ => '.ucp-main-tab li:nth-child(2)', ‘edge’ => 'top’, ‘align’ => 'left’, ‘content’ => ‘Watch the short <a href="https://www.youtube.com/watch?v=RN4XABhK7_w" target="_blank">getting started video</a> to get you up to speed with UCP in no time. If that doesn\’t answer your questions watch the longer <a href="https://www.youtube.com/watch?v=K3DF-NP6Fog" target="_blank">in-depth video walktrough</a>.<br>If you need the videos later, links are in the <a href="#" class="change_tab" data-tab="4">FAQ</a>.’);23832384 update_option(UCP_POINTERS_KEY, $pointers);2385 } // reset_pointers238623872388 // auto download / install / activate Weglot plugin2389 static function install_weglot()2390 {2391 if (false === current_user_can(‘administrator’)) {2392 wp_die(‘Sorry, you have to be an admin to run this action.’);2393 }23942395 $plugin_slug = 'weglot/weglot.php’;2396 $plugin_zip = 'https://downloads.wordpress.org/plugin/weglot.latest-stable.zip’;23972398 @include_once ABSPATH . 'wp-admin/includes/plugin.php’;2399 @include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php’;2400 @include_once ABSPATH . 'wp-admin/includes/plugin-install.php’;2401 @include_once ABSPATH . 'wp-admin/includes/file.php’;2402 @include_once ABSPATH . 'wp-admin/includes/misc.php’;2403 echo '<style>2404 body{2405 font-family: sans-serif;2406 font-size: 14px;2407 line-height: 1.5;2408 color: #444;2409 }2410 </style>’;24112412 echo '<div style="margin: 20px; color:#444;">’;2413 echo ‘If things are not done in a minute <a target="_parent" href="’ . admin_url(‘plugin-install.php?s=weglot&tab=search&type=term’) . '">install the plugin manually via Plugins page</a><br><br>’;2414 echo 'Starting …<br><br>’;24152416 wp_cache_flush();2417 $upgrader = new Plugin_Upgrader();2418 echo 'Check if Weglot is already installed … <br />’;2419 if (self::is_plugin_installed($plugin_slug)) {2420 echo 'Weglot is already installed! <br /><br />Making sure it\’s the latest version.<br />’;2421 $upgrader->upgrade($plugin_slug);2422 $installed = true;2423 } else {2424 echo 'Installing Weglot.<br />’;2425 $installed = $upgrader->install($plugin_zip);2426 }2427 wp_cache_flush();24282429 if (!is_wp_error($installed) && $installed) {2430 echo 'Activating Weglot.<br />’;2431 $activate = activate_plugin($plugin_slug);24322433 if (is_null($activate)) {2434 echo 'Weglot Activated.<br />’;24352436 echo '<script>setTimeout(function() { top.location = “options-general.php?page=ucp"; }, 1000);</script>’;2437 echo '<br>If you are not redirected in a few seconds - <a href="options-general.php?page=ucp” target="_parent">click here</a>.’;2438 }2439 } else {2440 echo ‘Could not install Weglot. You\’ll have to <a target="_parent" href="’ . admin_url(‘plugin-install.php?s=weglot&tab=search&type=term’) . '">download and install manually</a>.’;2441 }24422443 echo '</div>’;2444 } // install_weglot244524462447 // auto download / install / activate WP Force SSL plugin2448 static function install_wpfssl()2449 {2450 check_ajax_referer(‘install_wpfssl’);24512452 if (false === current_user_can(‘administrator’)) {2453 wp_die(‘Sorry, you have to be an admin to run this action.’);2454 }24552456 $plugin_slug = 'wp-force-ssl/wp-force-ssl.php’;2457 $plugin_zip = 'https://downloads.wordpress.org/plugin/wp-force-ssl.latest-stable.zip’;24582459 @include_once ABSPATH . 'wp-admin/includes/plugin.php’;2460 @include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php’;2461 @include_once ABSPATH . 'wp-admin/includes/plugin-install.php’;2462 @include_once ABSPATH . 'wp-admin/includes/file.php’;2463 @include_once ABSPATH . 'wp-admin/includes/misc.php’;2464 echo '<style>2465 body{2466 font-family: sans-serif;2467 font-size: 14px;2468 line-height: 1.5;2469 color: #444;2470 }2471 </style>’;24722473 echo '<div style="margin: 20px; color:#444;">’;2474 echo ‘If things are not done in a minute <a target="_parent" href="’ . admin_url(‘plugin-install.php?s=force%20ssl%20webfactory&tab=search&type=term’) . '">install the plugin manually via Plugins page</a><br><br>’;2475 echo 'Starting …<br><br>’;24762477 wp_cache_flush();2478 $upgrader = new Plugin_Upgrader();2479 echo 'Check if WP Force SSL is already installed … <br />’;2480 if (self::is_plugin_installed($plugin_slug)) {2481 echo 'WP Force SSL is already installed! <br /><br />Making sure it\’s the latest version.<br />’;2482 $upgrader->upgrade($plugin_slug);2483 $installed = true;2484 } else {2485 echo 'Installing WP Force SSL.<br />’;2486 $installed = $upgrader->install($plugin_zip);2487 }2488 wp_cache_flush();24892490 if (!is_wp_error($installed) && $installed) {2491 echo 'Activating WP Force SSL.<br />’;2492 $activate = activate_plugin($plugin_slug);24932494 if (is_null($activate)) {2495 echo 'WP Force SSL Activated.<br />’;24962497 echo '<script>setTimeout(function() { top.location = “options-general.php?page=ucp"; }, 1000);</script>’;2498 echo '<br>If you are not redirected in a few seconds - <a href="options-general.php?page=ucp” target="_parent">click here</a>.’;2499 }2500 } else {2501 echo ‘Could not install WP Force SSL. You\’ll have to <a target="_parent" href="’ . admin_url(‘plugin-install.php?s=force%20ssl%20webfactory&tab=search&type=term’) . '">download and install manually</a>.’;2502 }25032504 echo '</div>’;2505 } // install_wpfssl25062507 static function wp_kses_wf($html)2508 {2509 add_filter('safe_style_css’, function ($styles) {2510 $styles_wf = array(2511 'text-align’,2512 'margin’,2513 'color’,2514 'float’,2515 'border’,2516 'background’,2517 'background-color’,2518 'border-bottom’,2519 'border-bottom-color’,2520 'border-bottom-style’,2521 'border-bottom-width’,2522 'border-collapse’,2523 'border-color’,2524 'border-left’,2525 'border-left-color’,2526 'border-left-style’,2527 'border-left-width’,2528 'border-right’,2529 'border-right-color’,2530 'border-right-style’,2531 'border-right-width’,2532 'border-spacing’,2533 'border-style’,2534 'border-top’,2535 'border-top-color’,2536 'border-top-style’,2537 'border-top-width’,2538 'border-width’,2539 'caption-side’,2540 'clear’,2541 'cursor’,2542 'direction’,2543 'font’,2544 'font-family’,2545 'font-size’,2546 'font-style’,2547 'font-variant’,2548 'font-weight’,2549 'height’,2550 'letter-spacing’,2551 'line-height’,2552 'margin-bottom’,2553 'margin-left’,2554 'margin-right’,2555 'margin-top’,2556 'overflow’,2557 'padding’,2558 'padding-bottom’,2559 'padding-left’,2560 'padding-right’,2561 'padding-top’,2562 'text-decoration’,2563 'text-indent’,2564 'vertical-align’,2565 'width’,2566 'display’,2567 );25682569 foreach ($styles_wf as $style_wf) {2570 $styles[] = $style_wf;2571 }2572 return $styles;2573 });25742575 $allowed_tags = wp_kses_allowed_html(‘post’);2576 $allowed_tags[‘input’] = array(2577 ‘type’ => true,2578 ‘style’ => true,2579 ‘class’ => true,2580 ‘id’ => true,2581 ‘checked’ => true,2582 ‘disabled’ => true,2583 ‘name’ => true,2584 ‘size’ => true,2585 ‘placeholder’ => true,2586 ‘value’ => true,2587 ‘data-*’ => true,2588 ‘size’ => true,2589 ‘disabled’ => true2590 );25912592 $allowed_tags[‘textarea’] = array(2593 ‘type’ => true,2594 ‘style’ => true,2595 ‘class’ => true,2596 ‘id’ => true,2597 ‘checked’ => true,2598 ‘disabled’ => true,2599 ‘name’ => true,2600 ‘size’ => true,2601 ‘placeholder’ => true,2602 ‘value’ => true,2603 ‘data-*’ => true,2604 ‘cols’ => true,2605 ‘rows’ => true,2606 ‘disabled’ => true,2607 ‘autocomplete’ => true2608 );26092610 $allowed_tags[‘select’] = array(2611 ‘type’ => true,2612 ‘style’ => true,2613 ‘class’ => true,2614 ‘id’ => true,2615 ‘checked’ => true,2616 ‘disabled’ => true,2617 ‘name’ => true,2618 ‘size’ => true,2619 ‘placeholder’ => true,2620 ‘value’ => true,2621 ‘data-*’ => true,2622 ‘multiple’ => true,2623 ‘disabled’ => true2624 );26252626 $allowed_tags[‘option’] = array(2627 ‘type’ => true,2628 ‘style’ => true,2629 ‘class’ => true,2630 ‘id’ => true,2631 ‘checked’ => true,2632 ‘disabled’ => true,2633 ‘name’ => true,2634 ‘size’ => true,2635 ‘placeholder’ => true,2636 ‘value’ => true,2637 ‘selected’ => true,2638 ‘data-*’ => true2639 );2640 $allowed_tags[‘optgroup’] = array(2641 ‘type’ => true,2642 ‘style’ => true,2643 ‘class’ => true,2644 ‘id’ => true,2645 ‘checked’ => true,2646 ‘disabled’ => true,2647 ‘name’ => true,2648 ‘size’ => true,2649 ‘placeholder’ => true,2650 ‘value’ => true,2651 ‘selected’ => true,2652 ‘data-*’ => true,2653 ‘label’ => true2654 );26552656 $allowed_tags[‘a’] = array(2657 ‘href’ => true,2658 ‘data-*’ => true,2659 ‘class’ => true,2660 ‘style’ => true,2661 ‘id’ => true,2662 ‘target’ => true,2663 ‘data-*’ => true,2664 ‘role’ => true,2665 ‘aria-controls’ => true,2666 ‘aria-selected’ => true,2667 ‘disabled’ => true2668 );26692670 $allowed_tags[‘div’] = array(2671 ‘style’ => true,2672 ‘class’ => true,2673 ‘id’ => true,2674 ‘data-*’ => true,2675 ‘role’ => true,2676 ‘aria-labelledby’ => true,2677 ‘value’ => true,2678 ‘aria-modal’ => true,2679 ‘tabindex’ => true2680 );26812682 $allowed_tags[‘li’] = array(2683 ‘style’ => true,2684 ‘class’ => true,2685 ‘id’ => true,2686 ‘data-*’ => true,2687 ‘role’ => true,2688 ‘aria-labelledby’ => true,2689 ‘value’ => true,2690 ‘aria-modal’ => true,2691 ‘tabindex’ => true2692 );26932694 $allowed_tags[‘span’] = array(2695 ‘style’ => true,2696 ‘class’ => true,2697 ‘id’ => true,2698 ‘data-*’ => true,2699 ‘aria-hidden’ => true2700 );27012702 $allowed_tags[‘style’] = array(2703 ‘class’ => true,2704 ‘id’ => true,2705 ‘type’ => true2706 );27072708 $allowed_tags[‘fieldset’] = array(2709 ‘class’ => true,2710 ‘id’ => true,2711 ‘type’ => true2712 );27132714 $allowed_tags[‘link’] = array(2715 ‘class’ => true,2716 ‘id’ => true,2717 ‘type’ => true,2718 ‘rel’ => true,2719 ‘href’ => true,2720 ‘media’ => true2721 );27222723 $allowed_tags[‘form’] = array(2724 ‘style’ => true,2725 ‘class’ => true,2726 ‘id’ => true,2727 ‘method’ => true,2728 ‘action’ => true,2729 ‘data-*’ => true2730 );27312732 $allowed_tags[‘script’] = array(2733 ‘class’ => true,2734 ‘id’ => true,2735 ‘type’ => true,2736 ‘src’ => true2737 );27382739 echo wp_kses($html, $allowed_tags);27402741 add_filter('safe_style_css’, function ($styles) {2742 $styles_wf = array(2743 'text-align’,2744 'margin’,2745 'color’,2746 'float’,2747 'border’,2748 'background’,2749 'background-color’,2750 'border-bottom’,2751 'border-bottom-color’,2752 'border-bottom-style’,2753 'border-bottom-width’,2754 'border-collapse’,2755 'border-color’,2756 'border-left’,2757 'border-left-color’,2758 'border-left-style’,2759 'border-left-width’,2760 'border-right’,2761 'border-right-color’,2762 'border-right-style’,2763 'border-right-width’,2764 'border-spacing’,2765 'border-style’,2766 'border-top’,2767 'border-top-color’,2768 'border-top-style’,2769 'border-top-width’,2770 'border-width’,2771 'caption-side’,2772 'clear’,2773 'cursor’,2774 'direction’,2775 'font’,2776 'font-family’,2777 'font-size’,2778 'font-style’,2779 'font-variant’,2780 'font-weight’,2781 'height’,2782 'letter-spacing’,2783 'line-height’,2784 'margin-bottom’,2785 'margin-left’,2786 'margin-right’,2787 'margin-top’,2788 'overflow’,2789 'padding’,2790 'padding-bottom’,2791 'padding-left’,2792 'padding-right’,2793 'padding-top’,2794 'text-decoration’,2795 'text-indent’,2796 'vertical-align’,2797 'width’2798 );27992800 foreach ($styles_wf as $style_wf) {2801 if (($key = array_search($style_wf, $styles)) !== false) {2802 unset($styles[$key]);2803 }2804 }2805 return $styles;2806 });2807 }280828092810 static function is_plugin_installed($slug)2811 {2812 if (!function_exists(‘get_plugins’)) {2813 require_once ABSPATH . 'wp-admin/includes/plugin.php’;2814 }2815 $all_plugins = get_plugins();28162817 if (!empty($all_plugins[$slug])) {2818 return true;2819 } else {2820 return false;2821 }2822 } // is_plugin_installed282328242825 // check if Weglot plugin is active and min version installed2826 static function is_weglot_active()2827 {2828 if (!function_exists(‘is_plugin_active’) || !function_exists(‘get_plugin_data’)) {2829 require_once ABSPATH . 'wp-admin/includes/plugin.php’;2830 }28312832 if (is_plugin_active(‘weglot/weglot.php’)) {2833 $weglot_info = get_plugin_data(ABSPATH . ‘wp-content/plugins/weglot/weglot.php’);2834 if (version_compare($weglot_info[‘Version’], '2.5’, ‘<’)) {2835 return false;2836 } else {2837 return true;2838 }2839 } else {2840 return false;2841 }2842 } // is_weglot_active284328442845 // check if Weglot is completely set up2846 static function is_weglot_setup()2847 {2848 if (!self::is_weglot_active()) {2849 return false;2850 }28512852 $active_languages = weglot_get_destination_languages();2853 if (!empty($active_languages)) {2854 return true;2855 } else {2856 return false;2857 }2858 } // is_weglot_setup285928602861 // reset pointers on activation2862 static function activate()2863 {2864 self::reset_pointers();2865 self::empty_cache();2866 } // activate286728682869 // clean up on deactivation2870 static function deactivate()2871 {2872 delete_option(UCP_POINTERS_KEY);2873 delete_option(UCP_NOTICES_KEY);2874 self::empty_cache();2875 } // deactivate287628772878 // clean up on uninstall2879 static function uninstall()2880 {2881 delete_option(UCP_OPTIONS_KEY);2882 delete_option(UCP_META_KEY);2883 delete_option(UCP_POINTERS_KEY);2884 delete_option(UCP_NOTICES_KEY);2885 self::empty_cache();2886 } // uninstall2887} // class UCP288828892890// hook everything up2891register_activation_hook(__FILE__, array('UCP’, ‘activate’));2892register_deactivation_hook(__FILE__, array('UCP’, ‘deactivate’));2893register_uninstall_hook(__FILE__, array('UCP’, ‘uninstall’));2894add_action('init’, array('UCP’, ‘init’));2895add_action('plugins_loaded’, array('UCP’, ‘plugins_loaded’));

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907