Version Description
Download this release
Release Info
Developer | WebFactory |
Plugin | Maintenance |
Version | 3.90 |
Comparing to | |
See all releases |
Code changes from version 3.85 to 3.90
- css/admin.css +6 -25
- images/amelia-logo-white.png +0 -0
- images/amelia.png +0 -0
- images/mailoptin-logo-white.png +0 -0
- images/security-ninja.png +0 -0
- includes/admin.php +31 -37
- includes/functions.php +10 -102
- js/init.js +0 -89
- load/css/style.css +7 -3
- load/functions.php +4 -0
- load/index.php +0 -35
- maintenance.php +8 -171
- readme.txt +11 -5
css/admin.css
CHANGED
@@ -44,48 +44,29 @@
|
|
44 |
line-height: 150%;
|
45 |
}
|
46 |
|
47 |
-
.weglot-upsell-dialog .ui-dialog-titlebar
|
48 |
-
.amelia-upsell-dialog .ui-dialog-titlebar {
|
49 |
background: linear-gradient(140deg, #335ee2 10%, #271f50 90%);
|
50 |
text-align: center;
|
51 |
height: 55px;
|
52 |
}
|
53 |
|
54 |
-
.weglot-upsell-dialog .ui-dialog-titlebar img
|
55 |
-
.mailoptin-upsell-dialog .ui-dialog-titlebar img,
|
56 |
-
.amelia-upsell-dialog .ui-dialog-titlebar img {
|
57 |
height: 32px;
|
58 |
display: inline-block;
|
59 |
margin: 11px 0 0 0;
|
60 |
}
|
61 |
-
.mailoptin-upsell-dialog .ui-dialog-titlebar{
|
62 |
-
background: #2980b9;
|
63 |
-
text-align: center;
|
64 |
-
height: 55px;
|
65 |
-
}
|
66 |
-
|
67 |
-
.amelia-upsell-dialog .ui-dialog-titlebar {
|
68 |
-
background: #3ba6ff;
|
69 |
-
text-align: center;
|
70 |
-
height: 55px;
|
71 |
-
}
|
72 |
|
73 |
-
.weglot-upsell-dialog .ui-button.ui-dialog-titlebar-close
|
74 |
-
.mailoptin-upsell-dialog .ui-button.ui-dialog-titlebar-close,
|
75 |
-
.amelia-upsell-dialog .ui-button.ui-dialog-titlebar-close {
|
76 |
color: #fff;
|
77 |
height: 55px;
|
78 |
}
|
79 |
|
80 |
-
#promo-extended img
|
81 |
-
#promo-amelia img {
|
82 |
max-width: 100%;
|
83 |
}
|
84 |
|
85 |
-
#promo-
|
86 |
-
|
87 |
-
padding: 0;
|
88 |
-
line-height: 1;
|
89 |
}
|
90 |
|
91 |
#wpbody-content .metabox-holder {
|
44 |
line-height: 150%;
|
45 |
}
|
46 |
|
47 |
+
.weglot-upsell-dialog .ui-dialog-titlebar {
|
|
|
48 |
background: linear-gradient(140deg, #335ee2 10%, #271f50 90%);
|
49 |
text-align: center;
|
50 |
height: 55px;
|
51 |
}
|
52 |
|
53 |
+
.weglot-upsell-dialog .ui-dialog-titlebar img {
|
|
|
|
|
54 |
height: 32px;
|
55 |
display: inline-block;
|
56 |
margin: 11px 0 0 0;
|
57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
+
.weglot-upsell-dialog .ui-button.ui-dialog-titlebar-close {
|
|
|
|
|
60 |
color: #fff;
|
61 |
height: 55px;
|
62 |
}
|
63 |
|
64 |
+
#promo-extended img {
|
|
|
65 |
max-width: 100%;
|
66 |
}
|
67 |
|
68 |
+
#promo-sn img {
|
69 |
+
max-width: 100%;
|
|
|
|
|
70 |
}
|
71 |
|
72 |
#wpbody-content .metabox-holder {
|
images/amelia-logo-white.png
DELETED
Binary file
|
images/amelia.png
DELETED
Binary file
|
images/mailoptin-logo-white.png
DELETED
Binary file
|
images/security-ninja.png
ADDED
Binary file
|
includes/admin.php
CHANGED
@@ -12,6 +12,17 @@ function mtnc_admin_setup()
|
|
12 |
add_action("load-{$mtnc_variable->options_page}", 'mtnc_page_add_meta_boxes');
|
13 |
add_action('admin_enqueue_scripts', 'mtnc_load_later_scripts', 1);
|
14 |
add_action('admin_enqueue_scripts', 'mtnc_codemirror_enqueue_scripts');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
|
17 |
function mtnc_page_add_meta_boxes()
|
@@ -56,6 +67,9 @@ function mtnc_admin_print_custom_styles()
|
|
56 |
wp_enqueue_script('wp-lists');
|
57 |
wp_enqueue_script('postbox');
|
58 |
|
|
|
|
|
|
|
59 |
wp_enqueue_style('arvo', '//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700|Arvo:400,400italic,700,700italic');
|
60 |
wp_enqueue_style('wp-color-picker');
|
61 |
|
@@ -63,16 +77,28 @@ function mtnc_admin_print_custom_styles()
|
|
63 |
wp_register_script('mtnc', MTNC_URI . 'js/init.js', array('wp-color-picker'), filemtime(MTNC_DIR . 'js/init.js'), true);
|
64 |
wp_localize_script('mtnc', 'mtnc', array('path' => MTNC_URI,
|
65 |
'weglot_install_url' => add_query_arg(array('action' => 'mtnc_install_weglot', 'rnd' => rand()), admin_url('admin.php')),
|
66 |
-
'weglot_dialog_upsell_title' => '<img alt="Weglot" title="Weglot" src="' . MTNC_URI . 'images/weglot-logo-white.png' . '">'
|
67 |
-
'amelia_install_url' => add_query_arg(array('action' => 'mtnc_install_amelia', 'rnd' => rand()), admin_url('admin.php')),
|
68 |
-
'amelia_dialog_upsell_title' => '<img alt="Amelia Booking" title="Amelia Booking" src="' . MTNC_URI . 'images/amelia-logo-white.png' . '">',
|
69 |
-
'mailoptin_dialog_upsell_title' => '<img alt="MailOptin" title="MailOptin" src="' . MTNC_URI . 'images/mailoptin-logo-white.png' . '">',
|
70 |
-
'mailoptin_install_url' => add_query_arg(array('action' => 'mtnc_install_mailoptin'), admin_url('admin.php'))));
|
71 |
wp_enqueue_script('mtnc');
|
72 |
wp_enqueue_style('mtnc', MTNC_URI . 'css/admin.css', '', filemtime(MTNC_DIR . 'css/admin.css'));
|
73 |
|
74 |
wp_enqueue_style('wp-jquery-ui-dialog');
|
75 |
wp_enqueue_script('jquery-ui-dialog');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
|
78 |
function mtnc_codemirror_enqueue_scripts($hook)
|
@@ -155,22 +181,6 @@ function mtnc_generate_plugin_page()
|
|
155 |
</form>
|
156 |
</div>
|
157 |
<?php
|
158 |
-
// mailoptin install dialog
|
159 |
-
echo '<div id="mailoptin-upsell-dialog" style="display: none;" title="MailOptin"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
|
160 |
-
echo '<div style="padding: 20px; font-size: 14px;">';
|
161 |
-
echo '<ul class="mtnc-list">';
|
162 |
-
echo '<li>completely free plugin that integrates with Maintenance</li>';
|
163 |
-
echo '<li>instantly start collecting leads & subscribers</li>';
|
164 |
-
echo '<li>use an optin form on the bottom of Maintenance content</li>';
|
165 |
-
echo '<li>or try a popup/lightbox optin</li>';
|
166 |
-
echo '<li>easily connect with Mailchimp and other leading autoresponder services</li>';
|
167 |
-
echo '<li>completely customize the look & feel of the optin form</li>';
|
168 |
-
echo '</ul>';
|
169 |
-
echo '<p class="upsell-footer"><a class="button button-primary" id="install-mailoptin">Install & activate MailOptin to start collecting leads</a></p>';
|
170 |
-
echo '</div>';
|
171 |
-
echo '</div>';
|
172 |
-
// mailoptin install dialog
|
173 |
-
|
174 |
// weglot install dialog
|
175 |
echo '<div id="weglot-upsell-dialog" style="display: none;" title="Weglot"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
|
176 |
echo '<div style="padding: 20px; font-size: 15px;">';
|
@@ -186,20 +196,4 @@ echo '<p class="upsell-footer"><a class="button button-primary" id="install-wegl
|
|
186 |
echo '</div>';
|
187 |
echo '</div>';
|
188 |
// weglot install dialog
|
189 |
-
|
190 |
-
// amelia install dialog
|
191 |
-
echo '<div id="amelia-upsell-dialog" style="display: none;" title="Amelia Booking"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
|
192 |
-
echo '<div style="padding: 0 20px 20px 20px; font-size: 15px;">';
|
193 |
-
echo '<ul class="mtnc-list">';
|
194 |
-
echo '<li>Start booking events and appointements for free</li>';
|
195 |
-
echo '<li>A convenient Calendar view on the back-end, giving a full overview on all the appointments and the statuses</li>';
|
196 |
-
echo '<li>Flexible Appointment Management page, with an option to add appointments by your staff from the WordPress admin dashboard</li>';
|
197 |
-
echo '<li>All key numbers are available in the Dashboard</li>';
|
198 |
-
echo '<li>Email notifications to the customer and yourself when the appointment status changes</li>';
|
199 |
-
echo '<li>Free and used by +10,000 sites</li>';
|
200 |
-
echo '</ul>';
|
201 |
-
echo '<p class="upsell-footer textcenter"><br><a class="button button-primary" id="install-amelia">Install & activate Amelia Booking to enable bookings calendar</a></p>';
|
202 |
-
echo '</div>';
|
203 |
-
echo '</div>';
|
204 |
-
// amelia install dialog
|
205 |
}
|
12 |
add_action("load-{$mtnc_variable->options_page}", 'mtnc_page_add_meta_boxes');
|
13 |
add_action('admin_enqueue_scripts', 'mtnc_load_later_scripts', 1);
|
14 |
add_action('admin_enqueue_scripts', 'mtnc_codemirror_enqueue_scripts');
|
15 |
+
add_action('admin_footer', 'mtnc_plugin_information', 1, 0);
|
16 |
+
}
|
17 |
+
|
18 |
+
function mtnc_plugin_information() {
|
19 |
+
if (empty($_GET['fix-install-button']) || empty($_GET['tab']) || $_GET['tab'] != 'plugin-information') {
|
20 |
+
return;
|
21 |
+
}
|
22 |
+
|
23 |
+
echo '<script>';
|
24 |
+
echo "jQuery('#plugin_install_from_iframe').on('click', function() { window.location.href = jQuery(this).attr('href'); return false;});";
|
25 |
+
echo '</script>';
|
26 |
}
|
27 |
|
28 |
function mtnc_page_add_meta_boxes()
|
67 |
wp_enqueue_script('wp-lists');
|
68 |
wp_enqueue_script('postbox');
|
69 |
|
70 |
+
wp_enqueue_style('plugin-install');
|
71 |
+
wp_enqueue_script('plugin-install');
|
72 |
+
|
73 |
wp_enqueue_style('arvo', '//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700|Arvo:400,400italic,700,700italic');
|
74 |
wp_enqueue_style('wp-color-picker');
|
75 |
|
77 |
wp_register_script('mtnc', MTNC_URI . 'js/init.js', array('wp-color-picker'), filemtime(MTNC_DIR . 'js/init.js'), true);
|
78 |
wp_localize_script('mtnc', 'mtnc', array('path' => MTNC_URI,
|
79 |
'weglot_install_url' => add_query_arg(array('action' => 'mtnc_install_weglot', 'rnd' => rand()), admin_url('admin.php')),
|
80 |
+
'weglot_dialog_upsell_title' => '<img alt="Weglot" title="Weglot" src="' . MTNC_URI . 'images/weglot-logo-white.png' . '">'));
|
|
|
|
|
|
|
|
|
81 |
wp_enqueue_script('mtnc');
|
82 |
wp_enqueue_style('mtnc', MTNC_URI . 'css/admin.css', '', filemtime(MTNC_DIR . 'css/admin.css'));
|
83 |
|
84 |
wp_enqueue_style('wp-jquery-ui-dialog');
|
85 |
wp_enqueue_script('jquery-ui-dialog');
|
86 |
+
|
87 |
+
add_thickbox();
|
88 |
+
|
89 |
+
// fix for aggressive plugins that include their CSS on all pages
|
90 |
+
wp_dequeue_style('uiStyleSheet');
|
91 |
+
wp_dequeue_style('wpcufpnAdmin');
|
92 |
+
wp_dequeue_style('unifStyleSheet');
|
93 |
+
wp_dequeue_style('wpcufpn_codemirror');
|
94 |
+
wp_dequeue_style('wpcufpn_codemirrorTheme');
|
95 |
+
wp_dequeue_style('collapse-admin-css');
|
96 |
+
wp_dequeue_style('jquery-ui-css');
|
97 |
+
wp_dequeue_style('tribe-common-admin');
|
98 |
+
wp_dequeue_style('file-manager__jquery-ui-css');
|
99 |
+
wp_dequeue_style('file-manager__jquery-ui-css-theme');
|
100 |
+
wp_dequeue_style('wpmegmaps-jqueryui');
|
101 |
+
wp_dequeue_style('wp-botwatch-css');
|
102 |
}
|
103 |
|
104 |
function mtnc_codemirror_enqueue_scripts($hook)
|
181 |
</form>
|
182 |
</div>
|
183 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
// weglot install dialog
|
185 |
echo '<div id="weglot-upsell-dialog" style="display: none;" title="Weglot"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
|
186 |
echo '<div style="padding: 20px; font-size: 15px;">';
|
196 |
echo '</div>';
|
197 |
echo '</div>';
|
198 |
// weglot install dialog
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
includes/functions.php
CHANGED
@@ -136,7 +136,7 @@ function mtnc_generate_image_filed($title, $id, $name, $value, $class, $name_btn
|
|
136 |
$url = '';
|
137 |
if ($value !== '') {
|
138 |
$image = wp_get_attachment_image_src($value, 'full');
|
139 |
-
$url = esc_url($image[0]);
|
140 |
}
|
141 |
|
142 |
$out_filed .= '<div class="' . esc_attr($class) . '" style="background-image:url(' . $url . ')">';
|
@@ -303,8 +303,8 @@ function mtnc_page_create_meta_boxes_widget_support()
|
|
303 |
global $mtnc_variable;
|
304 |
|
305 |
add_meta_box('promo-review2', __('Help us keep the plugin free & maintained', 'maintenance'), 'mtnc_review_box', $mtnc_variable->options_page, 'side', 'high');
|
306 |
-
if (!
|
307 |
-
add_meta_box('promo-
|
308 |
}
|
309 |
add_meta_box('promo-content2', __('Something is not working? Do you need our help?', 'maintenance'), 'mtnc_contact_support', $mtnc_variable->options_page, 'side', 'default');
|
310 |
//add_meta_box('promo-extended', __('Translate Maintanance page to 100+ languages', 'maintenance'), 'mtnc_extended_version', $mtnc_variable->options_page, 'side', 'default');
|
@@ -346,7 +346,6 @@ function mtnc_add_data_fields($object, $box)
|
|
346 |
mtnc_generate_input_filed(__('Headline', 'maintenance'), 'heading', 'heading', $heading);
|
347 |
mtnc_generate_tinymce_filed(__('Description', 'maintenance'), 'description', 'description', $description);
|
348 |
mtnc_generate_input_filed(__('Footer Text', 'maintenance'), 'footer_text', 'footer_text', $footer_text);
|
349 |
-
mtnc_amelia_option();
|
350 |
mtnc_weglot_option();
|
351 |
mtnc_generate_check_filed(__('Show Some Love', 'maintenance'), __('Show a small link in the footer to let others know you\'re using this awesome & free plugin', 'maintenance'), 'show_some_love', 'show_some_love', !empty($mt_option['show_some_love']));
|
352 |
mtnc_generate_number_filed(__('Set Logo width', 'maintenance'), 'logo_width', 'logo_width', $logo_width);
|
@@ -359,7 +358,6 @@ function mtnc_add_data_fields($object, $box)
|
|
359 |
|
360 |
do_action('mtnc_color_fields');
|
361 |
do_action('mtnc_font_fields');
|
362 |
-
mtnc_mailoptin_option();
|
363 |
mtnc_generate_check_filed(__('503 Response Code', 'maintenance'), __('Service temporarily unavailable, Google analytics will be disabled.', 'maintenance'), '503_enabled', '503_enabled', !empty($mt_option['503_enabled']));
|
364 |
|
365 |
$gg_analytics_id = '';
|
@@ -387,70 +385,6 @@ function mtnc_add_data_fields($object, $box)
|
|
387 |
<?php
|
388 |
}
|
389 |
|
390 |
-
// check if MailOptin plugin is active and min version installed
|
391 |
-
function mtnc_is_mailoptin_active() {
|
392 |
-
if (!function_exists('is_plugin_active') || !function_exists('get_plugin_data')) {
|
393 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
394 |
-
}
|
395 |
-
|
396 |
-
if (is_plugin_active('mailoptin/mailoptin.php')) {
|
397 |
-
$mailoptin_info = get_plugin_data(ABSPATH . 'wp-content/plugins/mailoptin/mailoptin.php');
|
398 |
-
if( version_compare($mailoptin_info['Version'], '1.2.10.1', '<')) {
|
399 |
-
return false;
|
400 |
-
} else {
|
401 |
-
return true;
|
402 |
-
}
|
403 |
-
} else {
|
404 |
-
return false;
|
405 |
-
}
|
406 |
-
} // is_mailoptin_active
|
407 |
-
|
408 |
-
function mtnc_mailoptin_option() {
|
409 |
-
$mt_option = mtnc_get_plugin_options(true);
|
410 |
-
|
411 |
-
if (mtnc_is_mailoptin_active()) {
|
412 |
-
global $wpdb;
|
413 |
-
|
414 |
-
$mailoptin_campaigns = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'mo_optin_campaigns');
|
415 |
-
$campaigns = array();
|
416 |
-
|
417 |
-
if (!empty($mailoptin_campaigns)) {
|
418 |
-
$campaigns[] = array('val' => -1, 'label' => 'Disable optins');
|
419 |
-
foreach ($mailoptin_campaigns as $mailoptin_campaign) {
|
420 |
-
if ($mailoptin_campaign->optin_type == 'lightbox') {
|
421 |
-
$type = 'lightbox optin';
|
422 |
-
} else {
|
423 |
-
$type = 'content box optin';
|
424 |
-
}
|
425 |
-
$campaigns[] = array('val' => $mailoptin_campaign->id, 'label' => $mailoptin_campaign->name . ' - ' . $type);
|
426 |
-
} // foreach
|
427 |
-
} // if campaigns
|
428 |
-
|
429 |
-
echo '<tr id="mailoptin-settings">';
|
430 |
-
echo '<th><label for="mailoptin_campaign">Optin Boxes & Popups</label></th>';
|
431 |
-
echo '<td>';
|
432 |
-
if ($campaigns) {
|
433 |
-
echo '<select name="lib_options[mailoptin_campaign]" id="mailoptin_campaign">';
|
434 |
-
echo mtnc_create_select_options($campaigns, $mt_option['mailoptin_campaign']);
|
435 |
-
echo '</select>';
|
436 |
-
} else {
|
437 |
-
echo '<p><a href="' . admin_url('admin.php?page=mailoptin-optin-campaigns') . '">Create your first optin</a> to start collecting leads and subscribers</p>';
|
438 |
-
}
|
439 |
-
echo 'Create, edit and manage optins on the <a href="' . admin_url('admin.php?page=mailoptin-optin-campaigns') . '">MailOptin campaigns page</a>. Lightbox optins are more prominent but some users find them annoying. Content box optins tend to generate leads of higher quality.';
|
440 |
-
echo '</td>';
|
441 |
-
echo '</tr>';
|
442 |
-
} else {
|
443 |
-
echo '<tr>';
|
444 |
-
echo '<th><label for="">Optin Boxes & Popups</label></th>';
|
445 |
-
echo '<td>';
|
446 |
-
echo '<input type="checkbox" id="mailoptin_support" type="checkbox" value="1" class="skip-save open-mailoptin-upsell">';
|
447 |
-
echo '<p class="description">Collecting leads and subscribers is one of the most important aspect of any business. ';
|
448 |
-
echo 'To add optin boxes & optin popups compatible with Mailchimp and many other autoresponders <a href="#" class="open-mailoptin-upsell">install the free MailOptin plugin</a>. It seamlessly integrates with Maintenance, offers numerous options and will enable you to collect leads without any additional costs.</p>';
|
449 |
-
echo '</td>';
|
450 |
-
echo '</tr>';
|
451 |
-
} // mailoptin not active
|
452 |
-
}
|
453 |
-
|
454 |
// helper function for creating dropdowns
|
455 |
function mtnc_create_select_options($options, $selected = null, $output = true) {
|
456 |
$out = "\n";
|
@@ -517,23 +451,6 @@ function mtnc_weglot_option() {
|
|
517 |
} // weglot not active
|
518 |
}
|
519 |
|
520 |
-
function mtnc_amelia_option() {
|
521 |
-
$mt_option = mtnc_get_plugin_options(true);
|
522 |
-
|
523 |
-
if (mtnc_is_amelia_active()) {
|
524 |
-
mtnc_generate_check_filed(__('Show Events & Appointments Booking Calendar', 'maintenance'), __('Amelia is an events & appointments booking plugin that allows to set up a fully-featured automated booking system on your WordPress website and is a handy tool for small businesses and individuals that depend on stable appointment booking processes.', 'maintenance'), 'amelia_enabled', 'amelia_enabled', !empty($mt_option['amelia_enabled']));
|
525 |
-
} else {
|
526 |
-
echo '<tr>';
|
527 |
-
echo '<th><label for="amelia_enabled">Show Events & Appointments Booking Calendar</label></th>';
|
528 |
-
echo '<td>';
|
529 |
-
echo '<input type="checkbox" id="amelia_enabled" type="checkbox" value="1" class="skip-save open-amelia-upsell">';
|
530 |
-
echo 'Amelia is a free events & appointments booking plugin that allows to set up a fully-featured automated booking system on your WordPress site and is a handy tool for small businesses and individuals that depend on stable appointment booking processes. ';
|
531 |
-
echo '<a href="#" class="open-amelia-upsell">Install the Amelia Booking plugin</a>';
|
532 |
-
echo '</td>';
|
533 |
-
echo '</tr>';
|
534 |
-
} // weglot not active
|
535 |
-
}
|
536 |
-
|
537 |
// check if Weglot is completely set up
|
538 |
function mtnc_is_weglot_setup() {
|
539 |
if (!mtnc_is_weglot_active()) {
|
@@ -567,22 +484,17 @@ function mtnc_is_weglot_active() {
|
|
567 |
} // is_weglot_active
|
568 |
|
569 |
// check if Weglot plugin is active and min version installed
|
570 |
-
function
|
571 |
if (!function_exists('is_plugin_active') || !function_exists('get_plugin_data')) {
|
572 |
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
573 |
}
|
574 |
|
575 |
-
if (is_plugin_active('
|
576 |
-
|
577 |
-
if( version_compare($weglot_info['Version'], '1.0.10', '<')) {
|
578 |
-
return false;
|
579 |
-
} else {
|
580 |
-
return true;
|
581 |
-
}
|
582 |
} else {
|
583 |
return false;
|
584 |
}
|
585 |
-
} //
|
586 |
|
587 |
function mtnc_add_css_fields()
|
588 |
{
|
@@ -2185,13 +2097,11 @@ function mtnc_extended_version()
|
|
2185 |
echo $promo_text; // phpcs:ignore WordPress.Security.EscapeOutput
|
2186 |
}
|
2187 |
|
2188 |
-
function
|
2189 |
{
|
2190 |
$promo_text = '';
|
2191 |
-
if (
|
2192 |
-
$promo_text .= '<
|
2193 |
-
} else {
|
2194 |
-
$promo_text .= '<a title="Install Amelia and add Event and Appointments Booking" href="#" class="open-amelia-upsell"><img src="' . MTNC_URI . 'images/amelia.png" alt="Install Amelia and add Event and Appointments Booking" title="Install Amelia and add Event and Appointments Booking"></a>';
|
2195 |
}
|
2196 |
echo $promo_text;
|
2197 |
}
|
@@ -2454,9 +2364,7 @@ function mtnc_get_default_array()
|
|
2454 |
'is_login' => true,
|
2455 |
'custom_css' => '',
|
2456 |
'exclude_pages' => '',
|
2457 |
-
'mailoptin_campaign'=> '-1',
|
2458 |
'default_settings' => true,
|
2459 |
-
'amelia_enabled' => 0
|
2460 |
);
|
2461 |
|
2462 |
return apply_filters('mtnc_get_default_array', $defaults);
|
136 |
$url = '';
|
137 |
if ($value !== '') {
|
138 |
$image = wp_get_attachment_image_src($value, 'full');
|
139 |
+
$url = @esc_url($image[0]);
|
140 |
}
|
141 |
|
142 |
$out_filed .= '<div class="' . esc_attr($class) . '" style="background-image:url(' . $url . ')">';
|
303 |
global $mtnc_variable;
|
304 |
|
305 |
add_meta_box('promo-review2', __('Help us keep the plugin free & maintained', 'maintenance'), 'mtnc_review_box', $mtnc_variable->options_page, 'side', 'high');
|
306 |
+
if (!mtnc_is_sn_active()) {
|
307 |
+
add_meta_box('promo-sn', __('Protect your site from day one with Security Ninja', 'maintenance'), 'mtnc_promo_sn', $mtnc_variable->options_page, 'side', 'default');
|
308 |
}
|
309 |
add_meta_box('promo-content2', __('Something is not working? Do you need our help?', 'maintenance'), 'mtnc_contact_support', $mtnc_variable->options_page, 'side', 'default');
|
310 |
//add_meta_box('promo-extended', __('Translate Maintanance page to 100+ languages', 'maintenance'), 'mtnc_extended_version', $mtnc_variable->options_page, 'side', 'default');
|
346 |
mtnc_generate_input_filed(__('Headline', 'maintenance'), 'heading', 'heading', $heading);
|
347 |
mtnc_generate_tinymce_filed(__('Description', 'maintenance'), 'description', 'description', $description);
|
348 |
mtnc_generate_input_filed(__('Footer Text', 'maintenance'), 'footer_text', 'footer_text', $footer_text);
|
|
|
349 |
mtnc_weglot_option();
|
350 |
mtnc_generate_check_filed(__('Show Some Love', 'maintenance'), __('Show a small link in the footer to let others know you\'re using this awesome & free plugin', 'maintenance'), 'show_some_love', 'show_some_love', !empty($mt_option['show_some_love']));
|
351 |
mtnc_generate_number_filed(__('Set Logo width', 'maintenance'), 'logo_width', 'logo_width', $logo_width);
|
358 |
|
359 |
do_action('mtnc_color_fields');
|
360 |
do_action('mtnc_font_fields');
|
|
|
361 |
mtnc_generate_check_filed(__('503 Response Code', 'maintenance'), __('Service temporarily unavailable, Google analytics will be disabled.', 'maintenance'), '503_enabled', '503_enabled', !empty($mt_option['503_enabled']));
|
362 |
|
363 |
$gg_analytics_id = '';
|
385 |
<?php
|
386 |
}
|
387 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
388 |
// helper function for creating dropdowns
|
389 |
function mtnc_create_select_options($options, $selected = null, $output = true) {
|
390 |
$out = "\n";
|
451 |
} // weglot not active
|
452 |
}
|
453 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
// check if Weglot is completely set up
|
455 |
function mtnc_is_weglot_setup() {
|
456 |
if (!mtnc_is_weglot_active()) {
|
484 |
} // is_weglot_active
|
485 |
|
486 |
// check if Weglot plugin is active and min version installed
|
487 |
+
function mtnc_is_sn_active() {
|
488 |
if (!function_exists('is_plugin_active') || !function_exists('get_plugin_data')) {
|
489 |
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
490 |
}
|
491 |
|
492 |
+
if (is_plugin_active('security-ninja/security-ninja.php')) {
|
493 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
494 |
} else {
|
495 |
return false;
|
496 |
}
|
497 |
+
} // is_sn_active
|
498 |
|
499 |
function mtnc_add_css_fields()
|
500 |
{
|
2097 |
echo $promo_text; // phpcs:ignore WordPress.Security.EscapeOutput
|
2098 |
}
|
2099 |
|
2100 |
+
function mtnc_promo_sn()
|
2101 |
{
|
2102 |
$promo_text = '';
|
2103 |
+
if (!mtnc_is_sn_active()) {
|
2104 |
+
$promo_text .= '<a href="' . admin_url('plugin-install.php?fix-install-button=1&tab=plugin-information&plugin=security-ninja&TB_iframe=true&width=600&height=550') . '" class="thickbox open-plugin-details-modal"><img src="' . MTNC_URI . 'images/security-ninja.png" alt="Security Ninja" title="Security Ninja"></a>';
|
|
|
|
|
2105 |
}
|
2106 |
echo $promo_text;
|
2107 |
}
|
2364 |
'is_login' => true,
|
2365 |
'custom_css' => '',
|
2366 |
'exclude_pages' => '',
|
|
|
2367 |
'default_settings' => true,
|
|
|
2368 |
);
|
2369 |
|
2370 |
return apply_filters('mtnc_get_default_array', $defaults);
|
js/init.js
CHANGED
@@ -111,14 +111,6 @@ jQuery(window).ready(function($) {
|
|
111 |
|
112 |
return false;
|
113 |
});
|
114 |
-
$('#mailoptin_support').on('click change', function(e) {
|
115 |
-
e.preventDefault();
|
116 |
-
$(this).prop("checked", false);
|
117 |
-
|
118 |
-
$('#mailoptin-upsell-dialog').dialog('open');
|
119 |
-
|
120 |
-
return false;
|
121 |
-
});
|
122 |
|
123 |
// upsell dialog init
|
124 |
$('#weglot-upsell-dialog').dialog({'dialogClass': 'wp-dialog weglot-upsell-dialog',
|
@@ -152,48 +144,6 @@ jQuery(window).ready(function($) {
|
|
152 |
return false;
|
153 |
});
|
154 |
|
155 |
-
$('#amelia-upsell-dialog').dialog({'dialogClass': 'wp-dialog amelia-upsell-dialog',
|
156 |
-
'modal': 1,
|
157 |
-
'resizable': false,
|
158 |
-
'title': 'Translate your maintenance page to any language', //todo
|
159 |
-
'zIndex': 9999,
|
160 |
-
'width': 550,
|
161 |
-
'height': 'auto',
|
162 |
-
'show': 'fade',
|
163 |
-
'hide': 'fade',
|
164 |
-
'open': function(event, ui) {
|
165 |
-
maintenance_fix_dialog_close(event, ui);
|
166 |
-
$(this).siblings().find('span.ui-dialog-title').html(mtnc.amelia_dialog_upsell_title);
|
167 |
-
},
|
168 |
-
'close': function(event, ui) { },
|
169 |
-
'autoOpen': false,
|
170 |
-
'closeOnEscape': true
|
171 |
-
});
|
172 |
-
$(window).resize(function(e) {
|
173 |
-
$('#amelia-upsell-dialog').dialog("option", "position", {my: "center", at: "center", of: window});
|
174 |
-
});
|
175 |
-
|
176 |
-
$('body').on('click', '.open-amelia-upsell', function(e) {
|
177 |
-
e.preventDefault();
|
178 |
-
|
179 |
-
$(this).blur();
|
180 |
-
|
181 |
-
$('#amelia-upsell-dialog').dialog('open');
|
182 |
-
|
183 |
-
return false;
|
184 |
-
});
|
185 |
-
|
186 |
-
$('body').on('click', '.open-mailoptin-upsell', function(e) {
|
187 |
-
e.preventDefault();
|
188 |
-
|
189 |
-
$(this).blur();
|
190 |
-
|
191 |
-
$('#mailoptin-upsell-dialog').dialog('open');
|
192 |
-
|
193 |
-
return false;
|
194 |
-
});
|
195 |
-
|
196 |
-
|
197 |
jQuery('#install-weglot').on('click',function(e){
|
198 |
$('#weglot-upsell-dialog').dialog('close');
|
199 |
jQuery('body').append('<div style="width:550px;height:450px; position:fixed;top:10%;left:50%;margin-left:-275px; color:#444; background-color: #fbfbfb;border:1px solid #DDD; border-radius:4px;box-shadow: 0px 0px 0px 4000px rgba(0, 0, 0, 0.85);z-index: 9999999;"><iframe src="' + mtnc.weglot_install_url + '" style="width:100%;height:100%;border:none;" /></div>');
|
@@ -202,45 +152,6 @@ jQuery(window).ready(function($) {
|
|
202 |
return false;
|
203 |
});
|
204 |
|
205 |
-
jQuery('#install-amelia').on('click',function(e){
|
206 |
-
$('#amelia-upsell-dialog').dialog('close');
|
207 |
-
jQuery('body').append('<div style="width:550px;height:450px; position:fixed;top:10%;left:50%;margin-left:-275px; color:#444; background-color: #fbfbfb;border:1px solid #DDD; border-radius:4px;box-shadow: 0px 0px 0px 4000px rgba(0, 0, 0, 0.85);z-index: 9999999;"><iframe src="' + mtnc.amelia_install_url + '" style="width:100%;height:100%;border:none;" /></div>');
|
208 |
-
jQuery('#wpwrap').css('pointer-events', 'none');
|
209 |
-
e.preventDefault();
|
210 |
-
return false;
|
211 |
-
});
|
212 |
-
|
213 |
-
// upsell dialog init
|
214 |
-
$('#mailoptin-upsell-dialog').dialog({'dialogClass': 'wp-dialog mailoptin-upsell-dialog',
|
215 |
-
'modal': 1,
|
216 |
-
'resizable': false,
|
217 |
-
'title': 'Start Collecting Leads and Subscribers',
|
218 |
-
'zIndex': 9999,
|
219 |
-
'width': 550,
|
220 |
-
'height': 'auto',
|
221 |
-
'show': 'fade',
|
222 |
-
'hide': 'fade',
|
223 |
-
'open': function(event, ui) {
|
224 |
-
maintenance_fix_dialog_close(event, ui);
|
225 |
-
$(this).siblings().find('span.ui-dialog-title').html(mtnc.mailoptin_dialog_upsell_title);
|
226 |
-
},
|
227 |
-
'close': function(event, ui) { },
|
228 |
-
'autoOpen': false,
|
229 |
-
'closeOnEscape': true
|
230 |
-
});
|
231 |
-
$(window).resize(function(e) {
|
232 |
-
$('#mailoptin-upsell-dialog').dialog("option", "position", {my: "center", at: "center", of: window});
|
233 |
-
});
|
234 |
-
|
235 |
-
|
236 |
-
jQuery('#install-mailoptin').on('click',function(e){
|
237 |
-
$('#mailoptin-upsell-dialog').dialog('close');
|
238 |
-
jQuery('body').append('<div style="width:550px;height:450px; position:fixed;top:10%;left:50%;margin-left:-275px; color:#444; background-color: #fbfbfb;border:1px solid #DDD; border-radius:4px;box-shadow: 0px 0px 0px 4000px rgba(0, 0, 0, 0.85);z-index: 9999999;"><iframe src="' + mtnc.mailoptin_install_url + '" style="width:100%;height:100%;border:none;" /></div>');
|
239 |
-
jQuery('#wpwrap').css('pointer-events', 'none');
|
240 |
-
e.preventDefault();
|
241 |
-
return false;
|
242 |
-
});
|
243 |
-
|
244 |
|
245 |
/******************* */
|
246 |
|
111 |
|
112 |
return false;
|
113 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
// upsell dialog init
|
116 |
$('#weglot-upsell-dialog').dialog({'dialogClass': 'wp-dialog weglot-upsell-dialog',
|
144 |
return false;
|
145 |
});
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
jQuery('#install-weglot').on('click',function(e){
|
148 |
$('#weglot-upsell-dialog').dialog('close');
|
149 |
jQuery('body').append('<div style="width:550px;height:450px; position:fixed;top:10%;left:50%;margin-left:-275px; color:#444; background-color: #fbfbfb;border:1px solid #DDD; border-radius:4px;box-shadow: 0px 0px 0px 4000px rgba(0, 0, 0, 0.85);z-index: 9999999;"><iframe src="' + mtnc.weglot_install_url + '" style="width:100%;height:100%;border:none;" /></div>');
|
152 |
return false;
|
153 |
});
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
/******************* */
|
157 |
|
load/css/style.css
CHANGED
@@ -326,9 +326,13 @@ footer .center {
|
|
326 |
max-width: 100%;
|
327 |
}
|
328 |
|
329 |
-
|
330 |
-
|
331 |
-
|
|
|
|
|
|
|
|
|
332 |
|
333 |
.logo.istext {
|
334 |
max-width: 100%;
|
326 |
max-width: 100%;
|
327 |
}
|
328 |
|
329 |
+
@media only screen and (min-width: 200px) and (max-width: 670px) {
|
330 |
+
div.logo-box > img {
|
331 |
+
display: block;
|
332 |
+
width: 100%;
|
333 |
+
height: auto;
|
334 |
+
}
|
335 |
+
}
|
336 |
|
337 |
.logo.istext {
|
338 |
max-width: 100%;
|
load/functions.php
CHANGED
@@ -227,6 +227,10 @@ function mtnc_get_options_style()
|
|
227 |
$options_style .= '}';
|
228 |
}
|
229 |
|
|
|
|
|
|
|
|
|
230 |
if (!empty($mt_options['body_font_family'])) {
|
231 |
$options_style .= 'body {font-family: ' . esc_attr($mt_options['body_font_family']) . '; }';
|
232 |
}
|
227 |
$options_style .= '}';
|
228 |
}
|
229 |
|
230 |
+
if ($mt_options['blur_intensity'] == '0') {
|
231 |
+
$options_style .= ' body > .main-container:after { background-color: transparent; } ';
|
232 |
+
}
|
233 |
+
|
234 |
if (!empty($mt_options['body_font_family'])) {
|
235 |
$options_style .= 'body {font-family: ' . esc_attr($mt_options['body_font_family']) . '; }';
|
236 |
}
|
load/index.php
CHANGED
@@ -81,10 +81,6 @@ $google_fonts = mtnc_add_google_fonts();
|
|
81 |
echo '<link rel="stylesheet" href="' . WEGLOT_URL_DIST . '/css/front-css.css?v=' . WEGLOT_VERSION . '" type="text/css">';
|
82 |
echo '<script src="' . WEGLOT_URL_DIST . '/front-js.js?v=' . WEGLOT_VERSION . '"></script>';
|
83 |
}
|
84 |
-
|
85 |
-
if (mtnc_is_amelia_active() && $mt_options['amelia_enabled'] == 1) {
|
86 |
-
$mtnc->mtcn_amelia_scripts_and_styles();
|
87 |
-
}
|
88 |
?>
|
89 |
</head>
|
90 |
|
@@ -102,18 +98,6 @@ $google_fonts = mtnc_add_google_fonts();
|
|
102 |
<div id="content" class="site-content">
|
103 |
<div class="center">
|
104 |
<?php do_action( 'content_section' ); ?>
|
105 |
-
|
106 |
-
<?php
|
107 |
-
if (mtnc_is_amelia_active() && $mt_options['amelia_enabled'] == 1) {
|
108 |
-
echo do_shortcode('[ameliabooking]');
|
109 |
-
}
|
110 |
-
?>
|
111 |
-
|
112 |
-
<?php
|
113 |
-
if (mtnc_is_mailoptin_active() && $mt_options['mailoptin_campaign'] > 0) {
|
114 |
-
echo MailOptin\Core\Admin\Customizer\OptinForm\OptinFormFactory::build($mt_options['mailoptin_campaign']);
|
115 |
-
}
|
116 |
-
?>
|
117 |
</div>
|
118 |
</div>
|
119 |
</div> <!-- end wrapper -->
|
@@ -150,25 +134,6 @@ $google_fonts = mtnc_add_google_fonts();
|
|
150 |
<?php endif; ?>
|
151 |
<?php do_action( 'load_options_style' ); ?>
|
152 |
<?php do_action( 'load_custom_scripts' );
|
153 |
-
if (mtnc_is_mailoptin_active()) {
|
154 |
-
echo '<script type="text/javascript">
|
155 |
-
var mailoptin_globals = {
|
156 |
-
"admin_url":"' . admin_url() . '",
|
157 |
-
"public_js":"' . MAILOPTIN_ASSETS_URL . 'js/src",
|
158 |
-
"nonce":"' . wp_create_nonce('mailoptin-admin-nonce') . '",
|
159 |
-
"mailoptin_ajaxurl":"' . MailOptin\Core\AjaxHandler::get_endpoint() . '",
|
160 |
-
"ajaxurl":"' . admin_url('admin-ajax.php') . '",
|
161 |
-
"split_test_start_label":"Start Test",
|
162 |
-
"split_test_pause_label":"Pause Test",
|
163 |
-
"is_customize_preview":"false",
|
164 |
-
"disable_impression_tracking":"false",
|
165 |
-
"chosen_search_placeholder":"Type to search",
|
166 |
-
"js_confirm_text":"Are you sure you want to do this?",
|
167 |
-
"js_clear_stat_text":"Are you sure you want to do this? Clicking OK will delete all your optin analytics records."};
|
168 |
-
</script>';
|
169 |
-
echo '<script src="' . MAILOPTIN_ASSETS_URL . '/js/mailoptin.min.js"></script>';
|
170 |
-
}
|
171 |
-
|
172 |
|
173 |
?>
|
174 |
|
81 |
echo '<link rel="stylesheet" href="' . WEGLOT_URL_DIST . '/css/front-css.css?v=' . WEGLOT_VERSION . '" type="text/css">';
|
82 |
echo '<script src="' . WEGLOT_URL_DIST . '/front-js.js?v=' . WEGLOT_VERSION . '"></script>';
|
83 |
}
|
|
|
|
|
|
|
|
|
84 |
?>
|
85 |
</head>
|
86 |
|
98 |
<div id="content" class="site-content">
|
99 |
<div class="center">
|
100 |
<?php do_action( 'content_section' ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
</div>
|
102 |
</div>
|
103 |
</div> <!-- end wrapper -->
|
134 |
<?php endif; ?>
|
135 |
<?php do_action( 'load_options_style' ); ?>
|
136 |
<?php do_action( 'load_custom_scripts' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
?>
|
139 |
|
maintenance.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Maintenance
|
4 |
Plugin URI: http://wordpress.org/plugins/maintenance/
|
5 |
Description: Put your site in maintenance mode, away from the public view. Use maintenance plugin if your website is in development or you need to change a few things, run an upgrade. Make it only accessible to logged in users.
|
6 |
-
Version: 3.
|
7 |
Author: WP Maintenance
|
8 |
Author URI: https://wpmaintenancemode.com/
|
9 |
License: GPL2
|
@@ -48,15 +48,14 @@ class MTNC
|
|
48 |
add_action('init', array(&$this, 'mtnc_admin_bar'));
|
49 |
add_action('init', array(&$this, 'mtnc_set_global_options'), 1);
|
50 |
|
51 |
-
add_action('admin_action_mtnc_install_mailoptin', array(&$this, 'install_mailoptin'));
|
52 |
add_action('admin_action_mtnc_install_weglot', array(&$this, 'install_weglot'));
|
53 |
-
add_action('admin_action_mtnc_install_amelia', array(&$this, 'install_amelia'));
|
54 |
|
55 |
add_filter(
|
56 |
'plugin_action_links_' . plugin_basename(__FILE__),
|
57 |
array(&$this, 'plugin_action_links')
|
58 |
);
|
59 |
add_filter('install_plugins_table_api_args_featured', array(&$this, 'featured_plugins_tab'));
|
|
|
60 |
}
|
61 |
|
62 |
// add settings link to plugins page
|
@@ -149,6 +148,9 @@ class MTNC
|
|
149 |
if (is_callable(array('Hummingbird\WP_Hummingbird', 'flush_cache'))) {
|
150 |
Hummingbird\WP_Hummingbird::flush_cache(true, false);
|
151 |
}
|
|
|
|
|
|
|
152 |
}
|
153 |
|
154 |
public function mtnc_user_logout()
|
@@ -232,9 +234,10 @@ class MTNC
|
|
232 |
{
|
233 |
remove_filter('plugins_api_result', array(__CLASS__, 'plugins_api_result'), 10, 3);
|
234 |
|
235 |
-
$res = $this->add_plugin_favs('
|
236 |
$res = $this->add_plugin_favs('eps-301-redirects', $res);
|
237 |
$res = $this->add_plugin_favs('wp-force-ssl', $res);
|
|
|
238 |
|
239 |
return $res;
|
240 |
} // plugins_api_result
|
@@ -298,123 +301,7 @@ class MTNC
|
|
298 |
echo '</div>';
|
299 |
} // install_weglot
|
300 |
|
301 |
-
// auto download / install / activate Amelia Booking plugin
|
302 |
-
function install_amelia()
|
303 |
-
{
|
304 |
-
if (false === current_user_can('administrator')) {
|
305 |
-
wp_die('Sorry, you have to be an admin to run this action.');
|
306 |
-
}
|
307 |
|
308 |
-
$plugin_slug = 'ameliabooking/ameliabooking.php';
|
309 |
-
$plugin_zip = 'https://downloads.wordpress.org/plugin/ameliabooking.latest-stable.zip';
|
310 |
-
|
311 |
-
@include_once ABSPATH . 'wp-admin/includes/plugin.php';
|
312 |
-
@include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
313 |
-
@include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
314 |
-
@include_once ABSPATH . 'wp-admin/includes/file.php';
|
315 |
-
@include_once ABSPATH . 'wp-admin/includes/misc.php';
|
316 |
-
echo '<style>
|
317 |
-
body{
|
318 |
-
font-family: sans-serif;
|
319 |
-
font-size: 14px;
|
320 |
-
line-height: 1.5;
|
321 |
-
color: #444;
|
322 |
-
}
|
323 |
-
</style>';
|
324 |
-
|
325 |
-
echo '<div style="margin: 20px; color:#444;">';
|
326 |
-
echo 'If things are not done in a minute <a target="_parent" href="' . admin_url('plugin-install.php?s=ameliabooking&tab=search&type=term') . '">install the plugin manually via Plugins page</a><br><br>';
|
327 |
-
echo 'Starting ...<br><br>';
|
328 |
-
|
329 |
-
wp_cache_flush();
|
330 |
-
$upgrader = new Plugin_Upgrader();
|
331 |
-
echo 'Check if Amelia Booking is already installed ... <br />';
|
332 |
-
if ($this->is_plugin_installed($plugin_slug)) {
|
333 |
-
echo 'Amelia Booking is already installed! <br /><br />Making sure it\'s the latest version.<br />';
|
334 |
-
$upgrader->upgrade($plugin_slug);
|
335 |
-
$installed = true;
|
336 |
-
} else {
|
337 |
-
echo 'Installing Amelia Booking.<br />';
|
338 |
-
$installed = $upgrader->install($plugin_zip);
|
339 |
-
}
|
340 |
-
wp_cache_flush();
|
341 |
-
|
342 |
-
if (!is_wp_error($installed) && $installed) {
|
343 |
-
echo 'Activating Amelia Booking.<br />';
|
344 |
-
$activate = activate_plugin($plugin_slug);
|
345 |
-
|
346 |
-
echo 'Amelia Booking Activated.<br />';
|
347 |
-
|
348 |
-
$mt_options = mtnc_get_plugin_options(true);
|
349 |
-
$mt_options['amelia_enabled'] = 1;
|
350 |
-
update_option('maintenance_options', $mt_options);
|
351 |
-
|
352 |
-
echo '<script>setTimeout(function() { top.location = "admin.php?page=maintenance"; }, 1000);</script>';
|
353 |
-
echo '<br>If you are not redirected in a few seconds - <a href="admin.php?page=maintenance" target="_parent">click here</a>.';
|
354 |
-
|
355 |
-
} else {
|
356 |
-
echo 'Could not install Amelia Booking. You\'ll have to <a target="_parent" href="' . admin_url('plugin-install.php?s=ameliabooking&tab=search&type=term') . '">download and install manually</a>.';
|
357 |
-
}
|
358 |
-
|
359 |
-
echo '</div>';
|
360 |
-
} // install_ameliabooking
|
361 |
-
|
362 |
-
// auto download / install / activate MailOptin plugin
|
363 |
-
function install_mailoptin() {
|
364 |
-
if (false === current_user_can('administrator')) {
|
365 |
-
wp_die('Sorry, you have to be an admin to run this action.');
|
366 |
-
}
|
367 |
-
|
368 |
-
$plugin_slug = 'mailoptin/mailoptin.php';
|
369 |
-
$plugin_zip = 'https://downloads.wordpress.org/plugin/mailoptin.latest-stable.zip';
|
370 |
-
|
371 |
-
@include_once ABSPATH . 'wp-admin/includes/plugin.php';
|
372 |
-
@include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
373 |
-
@include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
374 |
-
@include_once ABSPATH . 'wp-admin/includes/file.php';
|
375 |
-
@include_once ABSPATH . 'wp-admin/includes/misc.php';
|
376 |
-
echo '<style>
|
377 |
-
body{
|
378 |
-
font-family: sans-serif;
|
379 |
-
font-size: 14px;
|
380 |
-
line-height: 1.5;
|
381 |
-
color: #444;
|
382 |
-
}
|
383 |
-
</style>';
|
384 |
-
|
385 |
-
echo '<div style="margin: 20px; color:#444;">';
|
386 |
-
echo 'If things are not done in a minute <a target="_parent" href="' . admin_url('plugin-install.php?s=mailoptin&tab=search&type=term') . '">install the plugin manually via Plugins page</a><br><br>';
|
387 |
-
echo 'Starting ...<br><br>';
|
388 |
-
|
389 |
-
wp_cache_flush();
|
390 |
-
$upgrader = new Plugin_Upgrader();
|
391 |
-
echo 'Check if MailOptin is already installed ... <br />';
|
392 |
-
if ($this->is_plugin_installed($plugin_slug)) {
|
393 |
-
echo 'MailOptin is already installed! <br /><br />Making sure it\'s the latest version.<br />';
|
394 |
-
$upgrader->upgrade($plugin_slug);
|
395 |
-
$installed = true;
|
396 |
-
} else {
|
397 |
-
echo 'Installing MailOptin.<br />';
|
398 |
-
$installed = $upgrader->install($plugin_zip);
|
399 |
-
}
|
400 |
-
wp_cache_flush();
|
401 |
-
|
402 |
-
if (!is_wp_error($installed) && $installed) {
|
403 |
-
echo 'Activating MailOptin.<br />';
|
404 |
-
$activate = activate_plugin($plugin_slug);
|
405 |
-
|
406 |
-
if (is_null($activate)) {
|
407 |
-
echo 'MailOptin Activated.<br />';
|
408 |
-
|
409 |
-
echo '<script>setTimeout(function() { top.location = "admin.php?page=maintenance"; }, 1000);</script>';
|
410 |
-
echo '<br>If you are not redirected in a few seconds - <a href="admin.php?page=maintenance" target="_parent">click here</a>.';
|
411 |
-
}
|
412 |
-
} else {
|
413 |
-
echo 'Could not install MailOptin. You\'ll have to <a target="_parent" href="' . admin_url('plugin-install.php?s=mailoptin&tab=search&type=term') .'">download and install manually</a>.';
|
414 |
-
}
|
415 |
-
|
416 |
-
echo '</div>';
|
417 |
-
} // install_mailoptin
|
418 |
|
419 |
function is_plugin_installed($slug)
|
420 |
{
|
@@ -430,56 +317,6 @@ class MTNC
|
|
430 |
}
|
431 |
} // is_plugin_installed
|
432 |
|
433 |
-
|
434 |
-
{
|
435 |
-
$settingsService = new AmeliaBooking\Domain\Services\Settings\SettingsService(new AmeliaBooking\Infrastructure\WP\SettingsService\SettingsStorage());
|
436 |
-
|
437 |
-
// Enqueue Scripts
|
438 |
-
if ($settingsService->getSetting('payments', 'payPal')['enabled'] === true) {
|
439 |
-
echo '<script src="https://www.paypalobjects.com/api/checkout.js"></script>';
|
440 |
-
}
|
441 |
-
|
442 |
-
echo '<script src="https://polyfill.io/v2/polyfill.js?features=Intl.~locale.en"></script>';
|
443 |
-
|
444 |
-
echo '<script>
|
445 |
-
var wpAmeliaUrls = '.wp_json_encode( [
|
446 |
-
'wpAmeliaPluginURL' => AMELIA_URL,
|
447 |
-
'wpAmeliaPluginAjaxURL' => AMELIA_ACTION_URL
|
448 |
-
] ).';
|
449 |
-
</script>';
|
450 |
-
|
451 |
-
echo '<script>
|
452 |
-
var wpAmeliaLabels = '.wp_json_encode( AmeliaBooking\Infrastructure\WP\Translations\FrontendStrings::getAllStrings() ).';
|
453 |
-
</script>';
|
454 |
-
|
455 |
-
echo '<script>
|
456 |
-
var wpAmeliaSettings = '.wp_json_encode( $settingsService->getFrontendSettings() ).';
|
457 |
-
</script>';
|
458 |
-
|
459 |
-
echo '<script>
|
460 |
-
var localeLanguage = '.wp_json_encode( AMELIA_LOCALE ).';
|
461 |
-
</script>';
|
462 |
-
|
463 |
-
echo '<script>
|
464 |
-
var fileUploadExtensions = '.wp_json_encode( array_keys(AmeliaBooking\Application\Services\CustomField\CustomFieldApplicationService::$allowedUploadedFileExtensions) ).';
|
465 |
-
</script>';
|
466 |
-
|
467 |
-
// Fix for Divi theme.
|
468 |
-
// Don't enqueue script if it's activated Divi Visual Page Builder
|
469 |
-
if (empty($_GET['et_fb'])) {
|
470 |
-
echo '<script src="' . AMELIA_URL . 'public/js/frontend/amelia-booking.js?v=' . AMELIA_VERSION . '"></script>';
|
471 |
-
}
|
472 |
-
|
473 |
-
if ($settingsService->getSetting('payments', 'stripe')['enabled'] === true) {
|
474 |
-
echo '<script src="https://js.stripe.com/v3/"></script>';
|
475 |
-
}
|
476 |
-
|
477 |
-
// Enqueue Styles
|
478 |
-
echo '<link rel="stylesheet" href="' . AMELIA_URL . 'public/css/frontend/vendor.css?v=' . AMELIA_VERSION . '" type="text/css">';
|
479 |
-
echo '<link rel="stylesheet" href="' . UPLOADS_URL . '/amelia/css/amelia-booking.css?v=' . AMELIA_VERSION . '" type="text/css">';
|
480 |
-
|
481 |
-
}
|
482 |
-
|
483 |
-
}
|
484 |
|
485 |
$mtnc = new MTNC();
|
3 |
Plugin Name: Maintenance
|
4 |
Plugin URI: http://wordpress.org/plugins/maintenance/
|
5 |
Description: Put your site in maintenance mode, away from the public view. Use maintenance plugin if your website is in development or you need to change a few things, run an upgrade. Make it only accessible to logged in users.
|
6 |
+
Version: 3.90
|
7 |
Author: WP Maintenance
|
8 |
Author URI: https://wpmaintenancemode.com/
|
9 |
License: GPL2
|
48 |
add_action('init', array(&$this, 'mtnc_admin_bar'));
|
49 |
add_action('init', array(&$this, 'mtnc_set_global_options'), 1);
|
50 |
|
|
|
51 |
add_action('admin_action_mtnc_install_weglot', array(&$this, 'install_weglot'));
|
|
|
52 |
|
53 |
add_filter(
|
54 |
'plugin_action_links_' . plugin_basename(__FILE__),
|
55 |
array(&$this, 'plugin_action_links')
|
56 |
);
|
57 |
add_filter('install_plugins_table_api_args_featured', array(&$this, 'featured_plugins_tab'));
|
58 |
+
add_filter('install_plugins_table_api_args_recommended', array(&$this, 'featured_plugins_tab'));
|
59 |
}
|
60 |
|
61 |
// add settings link to plugins page
|
148 |
if (is_callable(array('Hummingbird\WP_Hummingbird', 'flush_cache'))) {
|
149 |
Hummingbird\WP_Hummingbird::flush_cache(true, false);
|
150 |
}
|
151 |
+
if (function_exists('rocket_clean_domain')) {
|
152 |
+
rocket_clean_domain();
|
153 |
+
}
|
154 |
}
|
155 |
|
156 |
public function mtnc_user_logout()
|
234 |
{
|
235 |
remove_filter('plugins_api_result', array(__CLASS__, 'plugins_api_result'), 10, 3);
|
236 |
|
237 |
+
$res = $this->add_plugin_favs('simple-author-box', $res);
|
238 |
$res = $this->add_plugin_favs('eps-301-redirects', $res);
|
239 |
$res = $this->add_plugin_favs('wp-force-ssl', $res);
|
240 |
+
$res = $this->add_plugin_favs('security-ninja', $res);
|
241 |
|
242 |
return $res;
|
243 |
} // plugins_api_result
|
301 |
echo '</div>';
|
302 |
} // install_weglot
|
303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
|
306 |
function is_plugin_installed($slug)
|
307 |
{
|
317 |
}
|
318 |
} // is_plugin_installed
|
319 |
|
320 |
+
} // class MTNC
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
|
322 |
$mtnc = new MTNC();
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Maintenance ===
|
2 |
-
Contributors: WebFactory, UnderConstructionPage, googlemapswidget, wpreset
|
3 |
Tags: maintenance, maintenance mode, maintenance page, coming soon, coming soon page, under construction, under construction page
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.4
|
6 |
-
Stable tag: 3.
|
7 |
Requires PHP: 5.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -16,9 +16,8 @@ Maintenance plugin allows the WordPress site administrator to close the website
|
|
16 |
|
17 |
Thanks to our partners at <a href="https://wordpress.org/plugins/weglot/">Weglot</a>, Maintenance is fully multilanguage ready and you can instantly translate your maintenance page to 100+ languages with one click.
|
18 |
|
19 |
-
|
20 |
|
21 |
-
You can easily add events and bookings calendar to your maintenance page thanks to our integration with <a href="https://wordpress.org/plugins/ameliabooking/">Amelia</a> - a free events & appointments booking calendar. It sets up in minutes and you can immediately start taking appointments.
|
22 |
|
23 |
<h3>Features</h3>
|
24 |
<ul>
|
@@ -86,7 +85,14 @@ No, it will be display error on current maintenance page, without redirect to wp
|
|
86 |
Please post the question on the <a href="http://wordpress.org/support/plugin/maintenance">support forum</a>.
|
87 |
|
88 |
|
89 |
-
==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
= v3.85 =
|
92 |
- 2019/11/28
|
1 |
=== Maintenance ===
|
2 |
+
Contributors: WebFactory, UnderConstructionPage, googlemapswidget, wpreset, securityninja
|
3 |
Tags: maintenance, maintenance mode, maintenance page, coming soon, coming soon page, under construction, under construction page
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.4
|
6 |
+
Stable tag: 3.90
|
7 |
Requires PHP: 5.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
16 |
|
17 |
Thanks to our partners at <a href="https://wordpress.org/plugins/weglot/">Weglot</a>, Maintenance is fully multilanguage ready and you can instantly translate your maintenance page to 100+ languages with one click.
|
18 |
|
19 |
+
Let <a href="https://wordpress.org/plugins/security-ninja/">Security Ninja</a> take care of your site's security from day one! Run over 50 security tests with one click. Get a detailed report and automatically fix security issues.
|
20 |
|
|
|
21 |
|
22 |
<h3>Features</h3>
|
23 |
<ul>
|
85 |
Please post the question on the <a href="http://wordpress.org/support/plugin/maintenance">support forum</a>.
|
86 |
|
87 |
|
88 |
+
== Changelog ==
|
89 |
+
|
90 |
+
= v3.90 =
|
91 |
+
- 2020/05/30
|
92 |
+
- bug fixes
|
93 |
+
- removed integration with Amelia Booking
|
94 |
+
- added support for WP Rocket Cache plugin
|
95 |
+
- fixed blur issue
|
96 |
|
97 |
= v3.85 =
|
98 |
- 2019/11/28
|