Version Description
(02/09/2014) =
* Reintroduced some deprecated actions from old version (but still available in next 4 releases, after that will be removed) and replaced with new ones:
- wm_head
-> wpmm_head
- wm_footer
-> wpmm_footer
* Multisite settings link fix
* WP_Maintenance_Mode: init (array checking for custom_css arrays, move delete cache part into a helper, etc.), add_subscriber, send_contact, redirect fixes & optimizations
* WP_Maintenance_Mode_Admin: save_plugin_settings fixes, delete_cache (new method)
* Settings & Maintenance views fixes
* Readme.txt changes
Download this release
Release Info
Developer | GeorgeJipa |
Plugin | WP Maintenance Mode |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.0 to 2.0.1
- includes/classes/wp-maintenance-mode-admin.php +43 -15
- includes/classes/wp-maintenance-mode.php +10 -20
- readme.md +6 -6
- readme.txt +16 -6
- views/maintenance.php +30 -22
- views/settings.php +25 -25
- wp-maintenance-mode.php +2 -2
includes/classes/wp-maintenance-mode-admin.php
CHANGED
@@ -26,7 +26,8 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
26 |
// Add an action link pointing to the options page
|
27 |
$plugin_basename = plugin_basename(WPMM_PATH . $this->plugin_slug . '.php');
|
28 |
if (is_multisite() && is_plugin_active_for_network($plugin_basename)) {
|
29 |
-
|
|
|
30 |
} else {
|
31 |
add_filter('plugin_action_links_' . $plugin_basename, array($this, 'add_settings_link'));
|
32 |
}
|
@@ -201,29 +202,30 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
201 |
}
|
202 |
$_POST['options']['general']['notice'] = (int) $_POST['options']['general']['notice'];
|
203 |
$_POST['options']['general']['author_link'] = (int) $_POST['options']['general']['author_link'];
|
|
|
|
|
|
|
204 |
break;
|
205 |
case 'design':
|
206 |
$custom_css = array();
|
207 |
|
208 |
-
// CONTENT
|
209 |
$_POST['options']['design']['title'] = sanitize_text_field($_POST['options']['design']['title']);
|
210 |
$_POST['options']['design']['heading'] = sanitize_text_field($_POST['options']['design']['heading']);
|
|
|
|
|
|
|
|
|
211 |
$_POST['options']['design']['text'] = wp_kses_post($_POST['options']['design']['text']);
|
|
|
|
|
|
|
|
|
212 |
|
213 |
// BACKGROUND & CUSTOM CSS
|
214 |
if (!empty($_POST['options']['design']['bg_type'])) {
|
215 |
$_POST['options']['design']['bg_type'] = sanitize_text_field($_POST['options']['design']['bg_type']);
|
216 |
|
217 |
-
if (!empty($_POST['options']['design']['heading_color'])) {
|
218 |
-
$_POST['options']['design']['heading_color'] = sanitize_text_field($_POST['options']['design']['heading_color']);
|
219 |
-
$custom_css['heading_color'] = '.wrap h1 { color: ' . $_POST['options']['design']['heading_color'] . '; }';
|
220 |
-
}
|
221 |
-
|
222 |
-
if (!empty($_POST['options']['design']['text_color'])) {
|
223 |
-
$_POST['options']['design']['text_color'] = sanitize_text_field($_POST['options']['design']['text_color']);
|
224 |
-
$custom_css['text_color'] = '.wrap h2 { color: ' . $_POST['options']['design']['text_color'] . '; }';
|
225 |
-
}
|
226 |
-
|
227 |
if ($_POST['options']['design']['bg_type'] == 'color' && !empty($_POST['options']['design']['bg_color'])) {
|
228 |
$_POST['options']['design']['bg_color'] = sanitize_text_field($_POST['options']['design']['bg_color']);
|
229 |
$custom_css['bg_color'] = 'body { background-color: ' . $_POST['options']['design']['bg_color'] . '; }';
|
@@ -241,6 +243,11 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
241 |
}
|
242 |
|
243 |
$_POST['options']['design']['custom_css'] = $custom_css;
|
|
|
|
|
|
|
|
|
|
|
244 |
break;
|
245 |
case 'modules':
|
246 |
$custom_css = array();
|
@@ -248,7 +255,6 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
248 |
// COUNTDOWN & CUSTOM CSS
|
249 |
$_POST['options']['modules']['countdown_status'] = (int) $_POST['options']['modules']['countdown_status'];
|
250 |
$_POST['options']['modules']['countdown_start'] = sanitize_text_field($_POST['options']['modules']['countdown_start']);
|
251 |
-
$_POST['options']['modules']['countdown_start'] = sanitize_text_field($_POST['options']['modules']['countdown_start']);
|
252 |
$_POST['options']['modules']['countdown_details'] = array_map('trim', $_POST['options']['modules']['countdown_details']);
|
253 |
$_POST['options']['modules']['countdown_details']['days'] = !empty($_POST['options']['modules']['countdown_details']['days']) && is_numeric($_POST['options']['modules']['countdown_details']['days']) ? $_POST['options']['modules']['countdown_details']['days'] : 0;
|
254 |
$_POST['options']['modules']['countdown_details']['hours'] = !empty($_POST['options']['modules']['countdown_details']['hours']) && is_numeric($_POST['options']['modules']['countdown_details']['hours']) ? $_POST['options']['modules']['countdown_details']['hours'] : 1;
|
@@ -281,14 +287,36 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
281 |
$_POST['options']['modules']['contact_effects'] = sanitize_text_field($_POST['options']['modules']['contact_effects']);
|
282 |
|
283 |
$_POST['options']['modules']['custom_css'] = $custom_css;
|
|
|
|
|
|
|
|
|
|
|
284 |
break;
|
285 |
}
|
286 |
|
287 |
-
$this->plugin_settings[$tab] =
|
288 |
update_option('wpmm_settings', $this->plugin_settings);
|
289 |
}
|
290 |
}
|
291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
/**
|
293 |
* Add settings link
|
294 |
*
|
@@ -299,7 +327,7 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
299 |
public function add_settings_link($links) {
|
300 |
return array_merge(
|
301 |
array(
|
302 |
-
'
|
303 |
), $links
|
304 |
);
|
305 |
}
|
26 |
// Add an action link pointing to the options page
|
27 |
$plugin_basename = plugin_basename(WPMM_PATH . $this->plugin_slug . '.php');
|
28 |
if (is_multisite() && is_plugin_active_for_network($plugin_basename)) {
|
29 |
+
// settings link will point to admin_url of the main blog, not to network_admin_url
|
30 |
+
add_filter('network_admin_plugin_action_links_' . $plugin_basename, array($this, 'add_settings_link'));
|
31 |
} else {
|
32 |
add_filter('plugin_action_links_' . $plugin_basename, array($this, 'add_settings_link'));
|
33 |
}
|
202 |
}
|
203 |
$_POST['options']['general']['notice'] = (int) $_POST['options']['general']['notice'];
|
204 |
$_POST['options']['general']['author_link'] = (int) $_POST['options']['general']['author_link'];
|
205 |
+
|
206 |
+
// delete cache everytime
|
207 |
+
$this->delete_cache();
|
208 |
break;
|
209 |
case 'design':
|
210 |
$custom_css = array();
|
211 |
|
212 |
+
// CONTENT & CUSTOM CSS
|
213 |
$_POST['options']['design']['title'] = sanitize_text_field($_POST['options']['design']['title']);
|
214 |
$_POST['options']['design']['heading'] = sanitize_text_field($_POST['options']['design']['heading']);
|
215 |
+
if (!empty($_POST['options']['design']['heading_color'])) {
|
216 |
+
$_POST['options']['design']['heading_color'] = sanitize_text_field($_POST['options']['design']['heading_color']);
|
217 |
+
$custom_css['heading_color'] = '.wrap h1 { color: ' . $_POST['options']['design']['heading_color'] . '; }';
|
218 |
+
}
|
219 |
$_POST['options']['design']['text'] = wp_kses_post($_POST['options']['design']['text']);
|
220 |
+
if (!empty($_POST['options']['design']['text_color'])) {
|
221 |
+
$_POST['options']['design']['text_color'] = sanitize_text_field($_POST['options']['design']['text_color']);
|
222 |
+
$custom_css['text_color'] = '.wrap h2 { color: ' . $_POST['options']['design']['text_color'] . '; }';
|
223 |
+
}
|
224 |
|
225 |
// BACKGROUND & CUSTOM CSS
|
226 |
if (!empty($_POST['options']['design']['bg_type'])) {
|
227 |
$_POST['options']['design']['bg_type'] = sanitize_text_field($_POST['options']['design']['bg_type']);
|
228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
if ($_POST['options']['design']['bg_type'] == 'color' && !empty($_POST['options']['design']['bg_color'])) {
|
230 |
$_POST['options']['design']['bg_color'] = sanitize_text_field($_POST['options']['design']['bg_color']);
|
231 |
$custom_css['bg_color'] = 'body { background-color: ' . $_POST['options']['design']['bg_color'] . '; }';
|
243 |
}
|
244 |
|
245 |
$_POST['options']['design']['custom_css'] = $custom_css;
|
246 |
+
|
247 |
+
// delete cache when is activated
|
248 |
+
if (!empty($this->plugin_settings['general']['status']) && $this->plugin_settings['general']['status'] == 1) {
|
249 |
+
$this->delete_cache();
|
250 |
+
}
|
251 |
break;
|
252 |
case 'modules':
|
253 |
$custom_css = array();
|
255 |
// COUNTDOWN & CUSTOM CSS
|
256 |
$_POST['options']['modules']['countdown_status'] = (int) $_POST['options']['modules']['countdown_status'];
|
257 |
$_POST['options']['modules']['countdown_start'] = sanitize_text_field($_POST['options']['modules']['countdown_start']);
|
|
|
258 |
$_POST['options']['modules']['countdown_details'] = array_map('trim', $_POST['options']['modules']['countdown_details']);
|
259 |
$_POST['options']['modules']['countdown_details']['days'] = !empty($_POST['options']['modules']['countdown_details']['days']) && is_numeric($_POST['options']['modules']['countdown_details']['days']) ? $_POST['options']['modules']['countdown_details']['days'] : 0;
|
260 |
$_POST['options']['modules']['countdown_details']['hours'] = !empty($_POST['options']['modules']['countdown_details']['hours']) && is_numeric($_POST['options']['modules']['countdown_details']['hours']) ? $_POST['options']['modules']['countdown_details']['hours'] : 1;
|
287 |
$_POST['options']['modules']['contact_effects'] = sanitize_text_field($_POST['options']['modules']['contact_effects']);
|
288 |
|
289 |
$_POST['options']['modules']['custom_css'] = $custom_css;
|
290 |
+
|
291 |
+
// delete cache when is activated
|
292 |
+
if (!empty($this->plugin_settings['general']['status']) && $this->plugin_settings['general']['status'] == 1) {
|
293 |
+
$this->delete_cache();
|
294 |
+
}
|
295 |
break;
|
296 |
}
|
297 |
|
298 |
+
$this->plugin_settings[$tab] = $_POST['options'][$tab];
|
299 |
update_option('wpmm_settings', $this->plugin_settings);
|
300 |
}
|
301 |
}
|
302 |
|
303 |
+
/**
|
304 |
+
* Delete cache if any cache plugin (wp_cache or w3tc) is activated
|
305 |
+
*
|
306 |
+
* @since 2.0.1
|
307 |
+
*/
|
308 |
+
public function delete_cache() {
|
309 |
+
// Super Cache Plugin
|
310 |
+
if (function_exists('wp_cache_clear_cache')) {
|
311 |
+
wp_cache_clear_cache(get_current_blog_id());
|
312 |
+
}
|
313 |
+
|
314 |
+
// W3 Total Cache Plugin
|
315 |
+
if (function_exists('w3tc_pgcache_flush')) {
|
316 |
+
w3tc_pgcache_flush();
|
317 |
+
}
|
318 |
+
}
|
319 |
+
|
320 |
/**
|
321 |
* Add settings link
|
322 |
*
|
327 |
public function add_settings_link($links) {
|
328 |
return array_merge(
|
329 |
array(
|
330 |
+
'wpmm_settings' => '<a href="' . admin_url('options-general.php?page=' . $this->plugin_slug) . '">' . __('Settings', $this->plugin_slug) . '</a>'
|
331 |
), $links
|
332 |
);
|
333 |
}
|
includes/classes/wp-maintenance-mode.php
CHANGED
@@ -3,7 +3,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
3 |
|
4 |
class WP_Maintenance_Mode {
|
5 |
|
6 |
-
const VERSION = '2.0.
|
7 |
|
8 |
protected $plugin_slug = 'wp-maintenance-mode';
|
9 |
protected $plugin_settings;
|
@@ -391,19 +391,6 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
391 |
* Initialize when plugin is activated
|
392 |
*/
|
393 |
public function init() {
|
394 |
-
/**
|
395 |
-
* DELETE CACHE IF ACTIVATED
|
396 |
-
*/
|
397 |
-
// Super Cache Plugin
|
398 |
-
if (function_exists('wp_cache_clear_cache')) {
|
399 |
-
wp_cache_clear_cache(get_current_blog_id());
|
400 |
-
}
|
401 |
-
|
402 |
-
// W3 Total Cache Plugin
|
403 |
-
if (function_exists('w3tc_pgcache_flush')) {
|
404 |
-
w3tc_pgcache_flush();
|
405 |
-
}
|
406 |
-
|
407 |
/**
|
408 |
* CHECKS
|
409 |
*/
|
@@ -421,8 +408,8 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
421 |
// HEADER STUFF
|
422 |
$protocol = !empty($_SERVER['SERVER_PROTOCOL']) && in_array($_SERVER['SERVER_PROTOCOL'], array('HTTP/1.1', 'HTTP/1.0')) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';
|
423 |
$charset = get_bloginfo('charset') ? get_bloginfo('charset') : 'UTF-8';
|
424 |
-
$status_code = (int) apply_filters('wp_maintenance_mode_status_code',
|
425 |
-
$status_code = (int) apply_filters('wpmm_status_code',
|
426 |
$backtime_seconds = $this->calculate_backtime();
|
427 |
$backtime = (int) apply_filters('wpmm_backtime', $backtime_seconds);
|
428 |
|
@@ -447,7 +434,9 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
447 |
|
448 |
// CSS STUFF
|
449 |
$body_classes = !empty($this->plugin_settings['design']['bg_type']) && $this->plugin_settings['design']['bg_type'] != 'color' ? 'background' : '';
|
450 |
-
$
|
|
|
|
|
451 |
|
452 |
// CONTENT
|
453 |
$heading = !empty($this->plugin_settings['design']['heading']) ? $this->plugin_settings['design']['heading'] : '';
|
@@ -616,7 +605,8 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
616 |
}
|
617 |
|
618 |
if (preg_match('#wp-admin/#', $_SERVER['REQUEST_URI'])) {
|
619 |
-
|
|
|
620 |
}
|
621 |
}
|
622 |
|
@@ -635,7 +625,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
635 |
if (empty($exists)) {
|
636 |
$wpdb->insert(
|
637 |
$wpdb->prefix . 'wpmm_subscribers', array(
|
638 |
-
'email' => $_REQUEST['email'],
|
639 |
'insert_date' => date('Y-m-d H:i:s')
|
640 |
), array('%s', '%s'));
|
641 |
}
|
@@ -673,7 +663,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
673 |
$email_content = ob_get_contents();
|
674 |
ob_clean();
|
675 |
|
676 |
-
$send_to = !empty($this->plugin_settings['modules']['contact_email']) ? $this->plugin_settings['modules']['contact_email'] : get_option('admin_email');
|
677 |
$subject = __('Message via contact', $this->plugin_slug);
|
678 |
add_filter('wp_mail_content_type', create_function('', 'return "text/html";'));
|
679 |
|
3 |
|
4 |
class WP_Maintenance_Mode {
|
5 |
|
6 |
+
const VERSION = '2.0.1';
|
7 |
|
8 |
protected $plugin_slug = 'wp-maintenance-mode';
|
9 |
protected $plugin_settings;
|
391 |
* Initialize when plugin is activated
|
392 |
*/
|
393 |
public function init() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
/**
|
395 |
* CHECKS
|
396 |
*/
|
408 |
// HEADER STUFF
|
409 |
$protocol = !empty($_SERVER['SERVER_PROTOCOL']) && in_array($_SERVER['SERVER_PROTOCOL'], array('HTTP/1.1', 'HTTP/1.0')) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';
|
410 |
$charset = get_bloginfo('charset') ? get_bloginfo('charset') : 'UTF-8';
|
411 |
+
$status_code = (int) apply_filters('wp_maintenance_mode_status_code', 503); // this hook will be removed in the next versions
|
412 |
+
$status_code = (int) apply_filters('wpmm_status_code', 503);
|
413 |
$backtime_seconds = $this->calculate_backtime();
|
414 |
$backtime = (int) apply_filters('wpmm_backtime', $backtime_seconds);
|
415 |
|
434 |
|
435 |
// CSS STUFF
|
436 |
$body_classes = !empty($this->plugin_settings['design']['bg_type']) && $this->plugin_settings['design']['bg_type'] != 'color' ? 'background' : '';
|
437 |
+
$custom_css_design = !empty($this->plugin_settings['design']['custom_css']) && is_array($this->plugin_settings['design']['custom_css']) ? $this->plugin_settings['design']['custom_css'] : array();
|
438 |
+
$custom_css_modules = !empty($this->plugin_settings['modules']['custom_css']) && is_array($this->plugin_settings['modules']['custom_css']) ? $this->plugin_settings['modules']['custom_css'] : array();
|
439 |
+
$custom_css = array_merge($custom_css_design, $custom_css_modules);
|
440 |
|
441 |
// CONTENT
|
442 |
$heading = !empty($this->plugin_settings['design']['heading']) ? $this->plugin_settings['design']['heading'] : '';
|
605 |
}
|
606 |
|
607 |
if (preg_match('#wp-admin/#', $_SERVER['REQUEST_URI'])) {
|
608 |
+
$redirect_to = stripslashes($this->plugin_settings['general']['redirection']);
|
609 |
+
wp_redirect($redirect_to);
|
610 |
}
|
611 |
}
|
612 |
|
625 |
if (empty($exists)) {
|
626 |
$wpdb->insert(
|
627 |
$wpdb->prefix . 'wpmm_subscribers', array(
|
628 |
+
'email' => sanitize_text_field($_REQUEST['email']),
|
629 |
'insert_date' => date('Y-m-d H:i:s')
|
630 |
), array('%s', '%s'));
|
631 |
}
|
663 |
$email_content = ob_get_contents();
|
664 |
ob_clean();
|
665 |
|
666 |
+
$send_to = !empty($this->plugin_settings['modules']['contact_email']) ? stripslashes($this->plugin_settings['modules']['contact_email']) : get_option('admin_email');
|
667 |
$subject = __('Message via contact', $this->plugin_slug);
|
668 |
add_filter('wp_mail_content_type', create_function('', 'return "text/html";'));
|
669 |
|
readme.md
CHANGED
@@ -27,7 +27,7 @@ Also works with WordPress Multisite installs (each blog from the network has it'
|
|
27 |
|
28 |
**How to use plugin filters**
|
29 |
|
30 |
-
|
31 |
|
32 |
```php
|
33 |
function new_backtime() {
|
@@ -39,7 +39,7 @@ add_filter('wpmm_backtime', 'new_backtime');
|
|
39 |
|
40 |
Now... the search bots will retry to visit the page after 1800 seconds.
|
41 |
|
42 |
-
|
43 |
|
44 |
```php
|
45 |
function new_search_bots($bots) {
|
@@ -61,7 +61,7 @@ add_filter('wpmm_search_bots', 'new_search_bots');
|
|
61 |
|
62 |
We deleted a bot from list and added a new one.
|
63 |
|
64 |
-
|
65 |
|
66 |
```php
|
67 |
function new_text($text) {
|
@@ -76,7 +76,7 @@ add_filter('wpmm_text', 'new_text');
|
|
76 |
|
77 |
We replaced a string with another string. We can also add another text, add some extra html, etc.
|
78 |
|
79 |
-
|
80 |
|
81 |
```php
|
82 |
function new_css_styles($styles) {
|
@@ -92,7 +92,7 @@ We embedded a new css style on maintenance page. Same mechanism can be used for
|
|
92 |
|
93 |
**Cache Plugin Support**
|
94 |
|
95 |
-
|
96 |
|
97 |
## Other Notes
|
98 |
### License
|
@@ -102,4 +102,4 @@ Good news, this plugin is free for everyone! Since it's released under the GPL,
|
|
102 |
The plugin comes with various translations, please refer to the [WordPress Codex](http://codex.wordpress.org/Installing_WordPress_in_Your_Language "Installing WordPress in Your Language") for more information about activating the translation. If you want to help to translate the plugin to your language, please have a look at the .pot file which contains all defintions and may be used with a [gettext](http://www.gnu.org/software/gettext/) editor like [Poedit](http://www.poedit.net/) (Linux, Mac OS X, Windows).
|
103 |
|
104 |
### Contact & Feedback
|
105 |
-
Please let me know if you like the plugin or you hate it or whatever... Please fork it, add an issue for ideas and bugs.
|
27 |
|
28 |
**How to use plugin filters**
|
29 |
|
30 |
+
`wpmm_backtime` - can be used to change the backtime from page `Retry-After` header
|
31 |
|
32 |
```php
|
33 |
function new_backtime() {
|
39 |
|
40 |
Now... the search bots will retry to visit the page after 1800 seconds.
|
41 |
|
42 |
+
`wpmm_search_bots` - if you have `Bypass for Search Bots` option (from General) activated, it can be used to add / delete bots (useragents)
|
43 |
|
44 |
```php
|
45 |
function new_search_bots($bots) {
|
61 |
|
62 |
We deleted a bot from list and added a new one.
|
63 |
|
64 |
+
`wpmm_text` - can be used to change `Text` option
|
65 |
|
66 |
```php
|
67 |
function new_text($text) {
|
76 |
|
77 |
We replaced a string with another string. We can also add another text, add some extra html, etc.
|
78 |
|
79 |
+
`wpmm_styles` - can be used to embed new css files
|
80 |
|
81 |
```php
|
82 |
function new_css_styles($styles) {
|
92 |
|
93 |
**Cache Plugin Support**
|
94 |
|
95 |
+
WP Maintenance Mode can be unstable due the cache plugins, we recommend to deactivate any cache plugin when maintenance mode is active.
|
96 |
|
97 |
## Other Notes
|
98 |
### License
|
102 |
The plugin comes with various translations, please refer to the [WordPress Codex](http://codex.wordpress.org/Installing_WordPress_in_Your_Language "Installing WordPress in Your Language") for more information about activating the translation. If you want to help to translate the plugin to your language, please have a look at the .pot file which contains all defintions and may be used with a [gettext](http://www.gnu.org/software/gettext/) editor like [Poedit](http://www.poedit.net/) (Linux, Mac OS X, Windows).
|
103 |
|
104 |
### Contact & Feedback
|
105 |
+
Please let me know if you like the plugin or you hate it or whatever... Please fork it, add an issue for ideas and bugs.
|
readme.txt
CHANGED
@@ -7,8 +7,8 @@ Author URI: http://designmodo.com/
|
|
7 |
Tags: maintenance, mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
Requires at least: 3.5
|
9 |
Tested up to: 3.9.2
|
10 |
-
Stable tag: 2.0.
|
11 |
-
License: GPL
|
12 |
|
13 |
Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
|
14 |
|
@@ -60,19 +60,29 @@ Please give us feedback, contribute and file technical bugs on [GitHub Repo](htt
|
|
60 |
See [GitHub Repo] (https://github.com/Designmodocom/WP-Maintenance-Mode) FAQ.
|
61 |
|
62 |
= Cache Plugin Support =
|
63 |
-
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
-
= 2.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
* Changed design and functionality, new features
|
69 |
* Changed multisite behaviour: now you can activate maintenance individually (each blog from the network has it's own maintenance settings)
|
70 |
* Removed actions: `wm_header`, `wm_footer`, `wm_content`
|
71 |
* Removed filters: `wm_header`
|
72 |
* Removed [loginform] shortcode
|
73 |
-
* Some filters are
|
74 |
- `wm_heading` -> `wpmm_heading`,
|
75 |
-
- `wp_maintenance_mode_status_code` -> `
|
76 |
- `wm_title` -> `wpmm_meta_title`
|
77 |
- `wm_meta_author` -> `wpmm_meta_author`
|
78 |
- `wm_meta_description` -> `wpmm_meta_description`
|
7 |
Tags: maintenance, mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
Requires at least: 3.5
|
9 |
Tested up to: 3.9.2
|
10 |
+
Stable tag: 2.0.1
|
11 |
+
License: GPL-2.0+
|
12 |
|
13 |
Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
|
14 |
|
60 |
See [GitHub Repo] (https://github.com/Designmodocom/WP-Maintenance-Mode) FAQ.
|
61 |
|
62 |
= Cache Plugin Support =
|
63 |
+
WP Maintenance Mode can be unstable due the cache plugins, we recommend to deactivate any cache plugin when maintenance mode is active.
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 2.0.1 (02/09/2014) =
|
68 |
+
* Reintroduced some deprecated actions from old version (but still available in next 4 releases, after that will be removed) and replaced with new ones:
|
69 |
+
- `wm_head` -> `wpmm_head`
|
70 |
+
- `wm_footer` -> `wpmm_footer`
|
71 |
+
* Multisite settings link fix
|
72 |
+
* WP_Maintenance_Mode: init (array checking for custom_css arrays, move delete cache part into a helper, etc.), add_subscriber, send_contact, redirect fixes & optimizations
|
73 |
+
* WP_Maintenance_Mode_Admin: save_plugin_settings fixes, delete_cache (new method)
|
74 |
+
* Settings & Maintenance views fixes
|
75 |
+
* Readme.txt changes
|
76 |
+
|
77 |
+
= 2.0.0 (01/09/2014) =
|
78 |
* Changed design and functionality, new features
|
79 |
* Changed multisite behaviour: now you can activate maintenance individually (each blog from the network has it's own maintenance settings)
|
80 |
* Removed actions: `wm_header`, `wm_footer`, `wm_content`
|
81 |
* Removed filters: `wm_header`
|
82 |
* Removed [loginform] shortcode
|
83 |
+
* Some filters are deprecated (but still available in next 4 releases, after that will be removed) and replaced with new ones:
|
84 |
- `wm_heading` -> `wpmm_heading`,
|
85 |
+
- `wp_maintenance_mode_status_code` -> `wpmm_status_code`
|
86 |
- `wm_title` -> `wpmm_meta_title`
|
87 |
- `wm_meta_author` -> `wpmm_meta_author`
|
88 |
- `wm_meta_description` -> `wpmm_meta_description`
|
views/maintenance.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
<html>
|
3 |
<head>
|
4 |
-
<title><?php echo $title; ?></title>
|
5 |
<?php
|
6 |
if (!empty($styles) && is_array($styles)) {
|
7 |
foreach ($styles as $src) {
|
@@ -11,26 +11,30 @@
|
|
11 |
}
|
12 |
}
|
13 |
?>
|
14 |
-
<meta name="author" content="<?php echo $author; ?>" />
|
15 |
-
<meta name="description" content="<?php echo $description; ?>" />
|
16 |
-
<meta name="keywords" content="<?php echo $keywords; ?>" />
|
17 |
-
<meta name="robots" content="<?php echo $robots; ?>" />
|
18 |
<?php if (!empty($custom_css) && is_array($custom_css)) { ?>
|
19 |
<style>
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
</style>
|
26 |
<?php
|
27 |
}
|
|
|
|
|
|
|
|
|
28 |
?>
|
29 |
</head>
|
30 |
<body class="<?php echo $body_classes ? $body_classes : ''; ?>">
|
31 |
<div class="wrap">
|
32 |
-
<?php if (!empty($heading)) { ?><h1><?php echo $heading; ?></h1><?php } ?>
|
33 |
-
<?php if (!empty($text)) { ?><h2><?php echo $text; ?></h2><?php } ?>
|
34 |
|
35 |
<?php
|
36 |
if (!empty($this->plugin_settings['modules']['countdown_status']) && $this->plugin_settings['modules']['countdown_status'] == 1) {
|
@@ -39,7 +43,7 @@
|
|
39 |
<?php } ?>
|
40 |
|
41 |
<?php if (!empty($this->plugin_settings['modules']['subscribe_status']) && $this->plugin_settings['modules']['subscribe_status'] == 1) { ?>
|
42 |
-
<?php if (!empty($this->plugin_settings['modules']['subscribe_text'])) { ?><h3><?php echo $this->plugin_settings['modules']['subscribe_text']; ?></h3><?php } ?>
|
43 |
<div class="subscribe_wrapper" style="min-height: 100px;">
|
44 |
<form class="subscribe_form">
|
45 |
<input type="text" placeholder="<?php _e('your e-mail...', $this->plugin_slug); ?>" name="email" class="email_input" data-rule-required="true" data-rule-email="true" />
|
@@ -51,34 +55,34 @@
|
|
51 |
<?php if (!empty($this->plugin_settings['modules']['social_status']) && $this->plugin_settings['modules']['social_status'] == 1) { ?>
|
52 |
<div class="social">
|
53 |
<?php if (!empty($this->plugin_settings['modules']['social_twitter'])) { ?>
|
54 |
-
<a class="tw" href="<?php echo $this->plugin_settings['modules']['social_twitter']; ?>">twitter</a>
|
55 |
<?php } ?>
|
56 |
|
57 |
<?php if (!empty($this->plugin_settings['modules']['social_facebook'])) { ?>
|
58 |
-
<a class="fb" href="<?php echo $this->plugin_settings['modules']['social_facebook']; ?>">facebook</a>
|
59 |
<?php } ?>
|
60 |
|
61 |
<?php if (!empty($this->plugin_settings['modules']['social_pinterest'])) { ?>
|
62 |
-
<a class="pin" href="<?php echo $this->plugin_settings['modules']['social_pinterest']; ?>">pinterest</a>
|
63 |
<?php } ?>
|
64 |
|
65 |
<?php if (!empty($this->plugin_settings['modules']['social_github'])) { ?>
|
66 |
-
<a class="git" href="<?php echo $this->plugin_settings['modules']['social_github']; ?>">github</a>
|
67 |
<?php } ?>
|
68 |
|
69 |
<?php if (!empty($this->plugin_settings['modules']['social_dribbble'])) { ?>
|
70 |
-
<a class="dribbble" href="<?php echo $this->plugin_settings['modules']['social_dribbble']; ?>">dribbble</a>
|
71 |
<?php } ?>
|
72 |
|
73 |
<?php if (!empty($this->plugin_settings['modules']['social_google+'])) { ?>
|
74 |
-
<a class="gplus" href="<?php echo $this->plugin_settings['modules']['social_google+']; ?>">google plus</a>
|
75 |
<?php } ?>
|
76 |
</div>
|
77 |
<?php } ?>
|
78 |
<?php if (!empty($this->plugin_settings['modules']['contact_status']) && $this->plugin_settings['modules']['contact_status'] == 1) { ?>
|
79 |
<div class="contact">
|
80 |
-
<?php list($open, $close) = explode('|', $this->plugin_settings['modules']['contact_effects']); ?>
|
81 |
-
<div class="form <?php echo $open; ?>">
|
82 |
<form class="contact_form">
|
83 |
<p class="col"><input type="text" placeholder="<?php _e('Name', $this->plugin_slug); ?>" data-rule-required="true" name="name" class="name_input" /></p>
|
84 |
<p class="col last"><input type="text" placeholder="<?php _e('E-mail', $this->plugin_slug); ?>" data-rule-required="true" data-rule-email="true" name="email" class="email_input" /></p>
|
@@ -89,7 +93,7 @@
|
|
89 |
</div>
|
90 |
</div>
|
91 |
|
92 |
-
<a class="contact_us" href="javascript:void(0);" data-open="<?php echo $open; ?>" data-close="<?php echo $close; ?>"><?php _e('Contact us', $this->plugin_slug); ?></a>
|
93 |
<?php } ?>
|
94 |
|
95 |
<?php if (!empty($this->plugin_settings['general']['author_link']) && $this->plugin_settings['general']['author_link'] == 1) { ?>
|
@@ -110,6 +114,10 @@
|
|
110 |
<?php
|
111 |
}
|
112 |
}
|
|
|
|
|
|
|
|
|
113 |
?>
|
114 |
</body>
|
115 |
</html>
|
1 |
<!DOCTYPE html>
|
2 |
<html>
|
3 |
<head>
|
4 |
+
<title><?php echo stripslashes($title); ?></title>
|
5 |
<?php
|
6 |
if (!empty($styles) && is_array($styles)) {
|
7 |
foreach ($styles as $src) {
|
11 |
}
|
12 |
}
|
13 |
?>
|
14 |
+
<meta name="author" content="<?php echo esc_attr($author); ?>" />
|
15 |
+
<meta name="description" content="<?php echo esc_attr($description); ?>" />
|
16 |
+
<meta name="keywords" content="<?php echo esc_attr($keywords); ?>" />
|
17 |
+
<meta name="robots" content="<?php echo esc_attr($robots); ?>" />
|
18 |
<?php if (!empty($custom_css) && is_array($custom_css)) { ?>
|
19 |
<style>
|
20 |
+
<?php
|
21 |
+
foreach ($custom_css as $css_line) {
|
22 |
+
echo stripslashes($css_line) . "\n";
|
23 |
+
}
|
24 |
+
?>
|
25 |
</style>
|
26 |
<?php
|
27 |
}
|
28 |
+
|
29 |
+
// do some actions
|
30 |
+
do_action('wm_head'); // this hook will be removed in the next versions
|
31 |
+
do_action('wpmm_head');
|
32 |
?>
|
33 |
</head>
|
34 |
<body class="<?php echo $body_classes ? $body_classes : ''; ?>">
|
35 |
<div class="wrap">
|
36 |
+
<?php if (!empty($heading)) { ?><h1><?php echo stripslashes($heading); ?></h1><?php } ?>
|
37 |
+
<?php if (!empty($text)) { ?><h2><?php echo stripslashes($text); ?></h2><?php } ?>
|
38 |
|
39 |
<?php
|
40 |
if (!empty($this->plugin_settings['modules']['countdown_status']) && $this->plugin_settings['modules']['countdown_status'] == 1) {
|
43 |
<?php } ?>
|
44 |
|
45 |
<?php if (!empty($this->plugin_settings['modules']['subscribe_status']) && $this->plugin_settings['modules']['subscribe_status'] == 1) { ?>
|
46 |
+
<?php if (!empty($this->plugin_settings['modules']['subscribe_text'])) { ?><h3><?php echo stripslashes($this->plugin_settings['modules']['subscribe_text']); ?></h3><?php } ?>
|
47 |
<div class="subscribe_wrapper" style="min-height: 100px;">
|
48 |
<form class="subscribe_form">
|
49 |
<input type="text" placeholder="<?php _e('your e-mail...', $this->plugin_slug); ?>" name="email" class="email_input" data-rule-required="true" data-rule-email="true" />
|
55 |
<?php if (!empty($this->plugin_settings['modules']['social_status']) && $this->plugin_settings['modules']['social_status'] == 1) { ?>
|
56 |
<div class="social">
|
57 |
<?php if (!empty($this->plugin_settings['modules']['social_twitter'])) { ?>
|
58 |
+
<a class="tw" href="<?php echo stripslashes($this->plugin_settings['modules']['social_twitter']); ?>">twitter</a>
|
59 |
<?php } ?>
|
60 |
|
61 |
<?php if (!empty($this->plugin_settings['modules']['social_facebook'])) { ?>
|
62 |
+
<a class="fb" href="<?php echo stripslashes($this->plugin_settings['modules']['social_facebook']); ?>">facebook</a>
|
63 |
<?php } ?>
|
64 |
|
65 |
<?php if (!empty($this->plugin_settings['modules']['social_pinterest'])) { ?>
|
66 |
+
<a class="pin" href="<?php echo stripslashes($this->plugin_settings['modules']['social_pinterest']); ?>">pinterest</a>
|
67 |
<?php } ?>
|
68 |
|
69 |
<?php if (!empty($this->plugin_settings['modules']['social_github'])) { ?>
|
70 |
+
<a class="git" href="<?php echo stripslashes($this->plugin_settings['modules']['social_github']); ?>">github</a>
|
71 |
<?php } ?>
|
72 |
|
73 |
<?php if (!empty($this->plugin_settings['modules']['social_dribbble'])) { ?>
|
74 |
+
<a class="dribbble" href="<?php echo stripslashes($this->plugin_settings['modules']['social_dribbble']); ?>">dribbble</a>
|
75 |
<?php } ?>
|
76 |
|
77 |
<?php if (!empty($this->plugin_settings['modules']['social_google+'])) { ?>
|
78 |
+
<a class="gplus" href="<?php echo stripslashes($this->plugin_settings['modules']['social_google+']); ?>">google plus</a>
|
79 |
<?php } ?>
|
80 |
</div>
|
81 |
<?php } ?>
|
82 |
<?php if (!empty($this->plugin_settings['modules']['contact_status']) && $this->plugin_settings['modules']['contact_status'] == 1) { ?>
|
83 |
<div class="contact">
|
84 |
+
<?php list($open, $close) = !empty($this->plugin_settings['modules']['contact_effects']) && strstr($this->plugin_settings['modules']['contact_effects'], '|') ? explode('|', $this->plugin_settings['modules']['contact_effects']) : explode('|', 'move_top|move_bottom'); ?>
|
85 |
+
<div class="form <?php echo esc_attr($open); ?>">
|
86 |
<form class="contact_form">
|
87 |
<p class="col"><input type="text" placeholder="<?php _e('Name', $this->plugin_slug); ?>" data-rule-required="true" name="name" class="name_input" /></p>
|
88 |
<p class="col last"><input type="text" placeholder="<?php _e('E-mail', $this->plugin_slug); ?>" data-rule-required="true" data-rule-email="true" name="email" class="email_input" /></p>
|
93 |
</div>
|
94 |
</div>
|
95 |
|
96 |
+
<a class="contact_us" href="javascript:void(0);" data-open="<?php echo esc_attr($open); ?>" data-close="<?php echo esc_attr($close); ?>"><?php _e('Contact us', $this->plugin_slug); ?></a>
|
97 |
<?php } ?>
|
98 |
|
99 |
<?php if (!empty($this->plugin_settings['general']['author_link']) && $this->plugin_settings['general']['author_link'] == 1) { ?>
|
114 |
<?php
|
115 |
}
|
116 |
}
|
117 |
+
|
118 |
+
// Do some actions
|
119 |
+
do_action('wm_footer'); // this hook will be removed in the next versions
|
120 |
+
do_action('wpmm_footer');
|
121 |
?>
|
122 |
</body>
|
123 |
</html>
|
views/settings.php
CHANGED
@@ -42,7 +42,7 @@
|
|
42 |
<td>
|
43 |
<select name="options[general][backend_role]">
|
44 |
<?php foreach ($wp_roles->roles as $role => $details) { ?>
|
45 |
-
<option value="<?php echo $role; ?>" <?php selected($this->plugin_settings['general']['backend_role'], $role); ?>><?php echo $details['name'] . ' (' . $role . ')'; ?></option>
|
46 |
<?php } ?>
|
47 |
</select>
|
48 |
<p class="description"><?php _e('Which user role is allowed to access the backend of this blog?', $this->plugin_slug); ?></p>
|
@@ -53,7 +53,7 @@
|
|
53 |
<td>
|
54 |
<select name="options[general][frontend_role]">
|
55 |
<?php foreach ($wp_roles->roles as $role => $details) { ?>
|
56 |
-
<option value="<?php echo $role; ?>" <?php selected($this->plugin_settings['general']['frontend_role'], $role); ?>><?php echo $details['name'] . ' (' . $role . ')'; ?></option>
|
57 |
<?php } ?>
|
58 |
</select>
|
59 |
<p class="description"><?php _e('Which user role is allowed to access the frontend of this blog?', $this->plugin_slug); ?></p>
|
@@ -72,7 +72,7 @@
|
|
72 |
<tr valign="top">
|
73 |
<th scope="row"><label for="options[general][redirection]"><?php _e('Redirection', $this->plugin_slug); ?></label></th>
|
74 |
<td>
|
75 |
-
<input type="text" value="<?php echo $this->plugin_settings['general']['redirection']; ?>" name="options[general][redirection]" />
|
76 |
<p class="description"><?php _e('If you want to redirect a user to a URL (which is not the WordPress dashboard) after login, then define a URL (incl. http://)', $this->plugin_slug); ?></p>
|
77 |
</td>
|
78 |
</tr>
|
@@ -81,7 +81,7 @@
|
|
81 |
<td>
|
82 |
<textarea rows="7" name="options[general][exclude]" style="width: 625px;"><?php
|
83 |
if (!empty($this->plugin_settings['general']['exclude']) && is_array($this->plugin_settings['general']['exclude'])) {
|
84 |
-
echo implode("\n", $this->plugin_settings['general']['exclude']);
|
85 |
}
|
86 |
?></textarea>
|
87 |
<p class="description"><?php _e('Exclude feed, pages, archives or IPs from maintenance mode. Add one slug / IP per line!', $this->plugin_slug); ?></p>
|
@@ -125,21 +125,21 @@
|
|
125 |
<tr valign="top">
|
126 |
<th scope="row"><label for="options[design][title]"><?php _e('Title (HTML tag)', $this->plugin_slug); ?></label></th>
|
127 |
<td>
|
128 |
-
<input type="text" value="<?php echo $this->plugin_settings['design']['title']; ?>" name="options[design][title]" />
|
129 |
</td>
|
130 |
</tr>
|
131 |
<tr valign="top">
|
132 |
<th scope="row"><label for="options[design][heading]"><?php _e('Heading', $this->plugin_slug); ?></label></th>
|
133 |
<td>
|
134 |
-
<input type="text" value="<?php echo $this->plugin_settings['design']['heading']; ?>" name="options[design][heading]" />
|
135 |
-
<input type="text" value="<?php echo $this->plugin_settings['design']['heading_color']; ?>" name="options[design][heading_color]" data-default-color="<?php echo $this->plugin_settings['design']['heading_color']; ?>" class="color_picker_trigger"/>
|
136 |
</td>
|
137 |
</tr>
|
138 |
<tr valign="top">
|
139 |
<th scope="row"><label for="options[design][text]"><?php _e('Text', $this->plugin_slug); ?></label></th>
|
140 |
<td>
|
141 |
<?php
|
142 |
-
wp_editor($this->plugin_settings['design']['text'], 'options_design_text', array(
|
143 |
'textarea_name' => 'options[design][text]',
|
144 |
'textarea_rows' => 8,
|
145 |
'editor_class' => 'large-text',
|
@@ -150,7 +150,7 @@
|
|
150 |
));
|
151 |
?>
|
152 |
<br />
|
153 |
-
<input type="text" value="<?php echo $this->plugin_settings['design']['text_color']; ?>" data-default-color="<?php echo $this->plugin_settings['design']['text_color']; ?>" name="options[design][text_color]" class="color_picker_trigger" />
|
154 |
</td>
|
155 |
</tr>
|
156 |
</tbody>
|
@@ -179,7 +179,7 @@
|
|
179 |
<tr valign="top" class="design_bg_types <?php echo $this->plugin_settings['design']['bg_type'] != 'custom' ? 'hidden' : ''; ?>" id="show_custom">
|
180 |
<th scope="row"><label for="options[design][bg_custom]"><?php _e('Upload background', $this->plugin_slug); ?></label></th>
|
181 |
<td>
|
182 |
-
<input type="text" value="<?php echo $this->plugin_settings['design']['bg_custom']; ?>" name="options[design][bg_custom]" class="upload_image_url" />
|
183 |
<input type="button" value="Upload" class="button" id="upload_image_trigger" />
|
184 |
<p class="description"><?php _e('Backgrounds should have 1920x1280 px size.', $this->plugin_slug); ?></p>
|
185 |
</td>
|
@@ -198,7 +198,7 @@
|
|
198 |
?>
|
199 |
<li class="<?php echo $this->plugin_settings['design']['bg_predefined'] == $file ? 'active' : ''; ?>">
|
200 |
<label>
|
201 |
-
<input type="radio" value="<?php echo $file; ?>" name="options[design][bg_predefined]" <?php checked($this->plugin_settings['design']['bg_predefined'], $file); ?>>
|
202 |
<img src="<?php echo WPMM_URL . 'assets/images/backgrounds/' . $file_thumb; ?>" width="200" height="150" />
|
203 |
</label>
|
204 |
</li>
|
@@ -235,21 +235,21 @@
|
|
235 |
<tr valign="top">
|
236 |
<th scope="row"><label for="options[modules][countdown_start]"><?php _e('Start date', $this->plugin_slug); ?></label></th>
|
237 |
<td>
|
238 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['countdown_start']; ?>" name="options[modules][countdown_start]" class="countdown_start" />
|
239 |
</td>
|
240 |
</tr>
|
241 |
<tr valign="top">
|
242 |
<th scope="row"><label for="options[modules][countdown_details]"><?php _e('Countdown (remaining time)', $this->plugin_slug); ?></label></th>
|
243 |
<td class="countdown_details">
|
244 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['countdown_details']['days']; ?>" name="options[modules][countdown_details][days]" /> <?php _e('Days', $this->plugin_slug); ?>
|
245 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['countdown_details']['hours']; ?>" name="options[modules][countdown_details][hours]" class="margin_left"/> <?php _e('Hours', $this->plugin_slug); ?>
|
246 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['countdown_details']['minutes']; ?>" name="options[modules][countdown_details][minutes]" class="margin_left" /> <?php _e('Minutes', $this->plugin_slug); ?>
|
247 |
</td>
|
248 |
</tr>
|
249 |
<tr valign="top">
|
250 |
<th scope="row"><label for="options[modules][countdown_color]"><?php _e('Color', $this->plugin_slug); ?></label></th>
|
251 |
<td>
|
252 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['countdown_color']; ?>" name="options[modules][countdown_color]" data-default-color="<?php echo $this->plugin_settings['modules']['countdown_color']; ?>" class="color_picker_trigger"/>
|
253 |
</td>
|
254 |
</tr>
|
255 |
</tbody>
|
@@ -271,8 +271,8 @@
|
|
271 |
<tr valign="top">
|
272 |
<th scope="row"><label for="options[modules][subscribe_text]"><?php _e('Text', $this->plugin_slug); ?></label></th>
|
273 |
<td>
|
274 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['subscribe_text']; ?>" name="options[modules][subscribe_text]" />
|
275 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['subscribe_text_color']; ?>" name="options[modules][subscribe_text_color]" data-default-color="<?php echo $this->plugin_settings['modules']['subscribe_text_color']; ?>" class="color_picker_trigger"/>
|
276 |
</td>
|
277 |
</tr>
|
278 |
<tr valign="top">
|
@@ -308,37 +308,37 @@
|
|
308 |
<tr valign="top">
|
309 |
<th scope="row"><label for="options[modules][social_github]">Github</label></th>
|
310 |
<td>
|
311 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['social_github']; ?>" name="options[modules][social_github]" />
|
312 |
</td>
|
313 |
</tr>
|
314 |
<tr valign="top">
|
315 |
<th scope="row"><label for="options[modules][social_dribbble]">Dribbble</label></th>
|
316 |
<td>
|
317 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['social_dribbble']; ?>" name="options[modules][social_dribbble]" />
|
318 |
</td>
|
319 |
</tr>
|
320 |
<tr valign="top">
|
321 |
<th scope="row"><label for="options[modules][social_twitter]">Twitter</label></th>
|
322 |
<td>
|
323 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['social_twitter']; ?>" name="options[modules][social_twitter]" />
|
324 |
</td>
|
325 |
</tr>
|
326 |
<tr valign="top">
|
327 |
<th scope="row"><label for="options[modules][social_facebook]">Facebook</label></th>
|
328 |
<td>
|
329 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['social_facebook']; ?>" name="options[modules][social_facebook]" />
|
330 |
</td>
|
331 |
</tr>
|
332 |
<tr valign="top">
|
333 |
<th scope="row"><label for="options[modules][social_pinterest]">Pinterest</label></th>
|
334 |
<td>
|
335 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['social_pinterest']; ?>" name="options[modules][social_pinterest]" />
|
336 |
</td>
|
337 |
</tr>
|
338 |
<tr valign="top">
|
339 |
<th scope="row"><label for="options[modules][social_google+]">Google+</label></th>
|
340 |
<td>
|
341 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['social_google+']; ?>" name="options[modules][social_google+]" />
|
342 |
</td>
|
343 |
</tr>
|
344 |
|
@@ -361,7 +361,7 @@
|
|
361 |
<tr valign="top">
|
362 |
<th scope="row"><label for="options[modules][contact_email]"><?php _e('Email address', $this->plugin_slug); ?></label></th>
|
363 |
<td>
|
364 |
-
<input type="text" value="<?php echo $this->plugin_settings['modules']['contact_email']; ?>" name="options[modules][contact_email]" />
|
365 |
</td>
|
366 |
</tr>
|
367 |
<tr valign="top">
|
42 |
<td>
|
43 |
<select name="options[general][backend_role]">
|
44 |
<?php foreach ($wp_roles->roles as $role => $details) { ?>
|
45 |
+
<option value="<?php echo esc_attr($role); ?>" <?php selected($this->plugin_settings['general']['backend_role'], $role); ?>><?php echo $details['name'] . ' (' . $role . ')'; ?></option>
|
46 |
<?php } ?>
|
47 |
</select>
|
48 |
<p class="description"><?php _e('Which user role is allowed to access the backend of this blog?', $this->plugin_slug); ?></p>
|
53 |
<td>
|
54 |
<select name="options[general][frontend_role]">
|
55 |
<?php foreach ($wp_roles->roles as $role => $details) { ?>
|
56 |
+
<option value="<?php echo esc_attr($role); ?>" <?php selected($this->plugin_settings['general']['frontend_role'], $role); ?>><?php echo $details['name'] . ' (' . $role . ')'; ?></option>
|
57 |
<?php } ?>
|
58 |
</select>
|
59 |
<p class="description"><?php _e('Which user role is allowed to access the frontend of this blog?', $this->plugin_slug); ?></p>
|
72 |
<tr valign="top">
|
73 |
<th scope="row"><label for="options[general][redirection]"><?php _e('Redirection', $this->plugin_slug); ?></label></th>
|
74 |
<td>
|
75 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['general']['redirection'])); ?>" name="options[general][redirection]" />
|
76 |
<p class="description"><?php _e('If you want to redirect a user to a URL (which is not the WordPress dashboard) after login, then define a URL (incl. http://)', $this->plugin_slug); ?></p>
|
77 |
</td>
|
78 |
</tr>
|
81 |
<td>
|
82 |
<textarea rows="7" name="options[general][exclude]" style="width: 625px;"><?php
|
83 |
if (!empty($this->plugin_settings['general']['exclude']) && is_array($this->plugin_settings['general']['exclude'])) {
|
84 |
+
echo implode("\n", stripslashes_deep($this->plugin_settings['general']['exclude']));
|
85 |
}
|
86 |
?></textarea>
|
87 |
<p class="description"><?php _e('Exclude feed, pages, archives or IPs from maintenance mode. Add one slug / IP per line!', $this->plugin_slug); ?></p>
|
125 |
<tr valign="top">
|
126 |
<th scope="row"><label for="options[design][title]"><?php _e('Title (HTML tag)', $this->plugin_slug); ?></label></th>
|
127 |
<td>
|
128 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['design']['title'])); ?>" name="options[design][title]" />
|
129 |
</td>
|
130 |
</tr>
|
131 |
<tr valign="top">
|
132 |
<th scope="row"><label for="options[design][heading]"><?php _e('Heading', $this->plugin_slug); ?></label></th>
|
133 |
<td>
|
134 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['design']['heading'])); ?>" name="options[design][heading]" />
|
135 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['design']['heading_color'])); ?>" name="options[design][heading_color]" data-default-color="<?php echo esc_attr(stripslashes($this->plugin_settings['design']['heading_color'])); ?>" class="color_picker_trigger"/>
|
136 |
</td>
|
137 |
</tr>
|
138 |
<tr valign="top">
|
139 |
<th scope="row"><label for="options[design][text]"><?php _e('Text', $this->plugin_slug); ?></label></th>
|
140 |
<td>
|
141 |
<?php
|
142 |
+
wp_editor(stripslashes($this->plugin_settings['design']['text']), 'options_design_text', array(
|
143 |
'textarea_name' => 'options[design][text]',
|
144 |
'textarea_rows' => 8,
|
145 |
'editor_class' => 'large-text',
|
150 |
));
|
151 |
?>
|
152 |
<br />
|
153 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['design']['text_color'])); ?>" data-default-color="<?php echo esc_attr(stripslashes($this->plugin_settings['design']['text_color'])); ?>" name="options[design][text_color]" class="color_picker_trigger" />
|
154 |
</td>
|
155 |
</tr>
|
156 |
</tbody>
|
179 |
<tr valign="top" class="design_bg_types <?php echo $this->plugin_settings['design']['bg_type'] != 'custom' ? 'hidden' : ''; ?>" id="show_custom">
|
180 |
<th scope="row"><label for="options[design][bg_custom]"><?php _e('Upload background', $this->plugin_slug); ?></label></th>
|
181 |
<td>
|
182 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['design']['bg_custom'])); ?>" name="options[design][bg_custom]" class="upload_image_url" />
|
183 |
<input type="button" value="Upload" class="button" id="upload_image_trigger" />
|
184 |
<p class="description"><?php _e('Backgrounds should have 1920x1280 px size.', $this->plugin_slug); ?></p>
|
185 |
</td>
|
198 |
?>
|
199 |
<li class="<?php echo $this->plugin_settings['design']['bg_predefined'] == $file ? 'active' : ''; ?>">
|
200 |
<label>
|
201 |
+
<input type="radio" value="<?php echo esc_attr($file); ?>" name="options[design][bg_predefined]" <?php checked($this->plugin_settings['design']['bg_predefined'], $file); ?>>
|
202 |
<img src="<?php echo WPMM_URL . 'assets/images/backgrounds/' . $file_thumb; ?>" width="200" height="150" />
|
203 |
</label>
|
204 |
</li>
|
235 |
<tr valign="top">
|
236 |
<th scope="row"><label for="options[modules][countdown_start]"><?php _e('Start date', $this->plugin_slug); ?></label></th>
|
237 |
<td>
|
238 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['countdown_start'])); ?>" name="options[modules][countdown_start]" class="countdown_start" />
|
239 |
</td>
|
240 |
</tr>
|
241 |
<tr valign="top">
|
242 |
<th scope="row"><label for="options[modules][countdown_details]"><?php _e('Countdown (remaining time)', $this->plugin_slug); ?></label></th>
|
243 |
<td class="countdown_details">
|
244 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['countdown_details']['days'])); ?>" name="options[modules][countdown_details][days]" /> <?php _e('Days', $this->plugin_slug); ?>
|
245 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['countdown_details']['hours'])); ?>" name="options[modules][countdown_details][hours]" class="margin_left"/> <?php _e('Hours', $this->plugin_slug); ?>
|
246 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['countdown_details']['minutes'])); ?>" name="options[modules][countdown_details][minutes]" class="margin_left" /> <?php _e('Minutes', $this->plugin_slug); ?>
|
247 |
</td>
|
248 |
</tr>
|
249 |
<tr valign="top">
|
250 |
<th scope="row"><label for="options[modules][countdown_color]"><?php _e('Color', $this->plugin_slug); ?></label></th>
|
251 |
<td>
|
252 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['countdown_color'])); ?>" name="options[modules][countdown_color]" data-default-color="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['countdown_color'])); ?>" class="color_picker_trigger"/>
|
253 |
</td>
|
254 |
</tr>
|
255 |
</tbody>
|
271 |
<tr valign="top">
|
272 |
<th scope="row"><label for="options[modules][subscribe_text]"><?php _e('Text', $this->plugin_slug); ?></label></th>
|
273 |
<td>
|
274 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['subscribe_text'])); ?>" name="options[modules][subscribe_text]" />
|
275 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['subscribe_text_color'])); ?>" name="options[modules][subscribe_text_color]" data-default-color="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['subscribe_text_color'])); ?>" class="color_picker_trigger"/>
|
276 |
</td>
|
277 |
</tr>
|
278 |
<tr valign="top">
|
308 |
<tr valign="top">
|
309 |
<th scope="row"><label for="options[modules][social_github]">Github</label></th>
|
310 |
<td>
|
311 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['social_github'])); ?>" name="options[modules][social_github]" />
|
312 |
</td>
|
313 |
</tr>
|
314 |
<tr valign="top">
|
315 |
<th scope="row"><label for="options[modules][social_dribbble]">Dribbble</label></th>
|
316 |
<td>
|
317 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['social_dribbble'])); ?>" name="options[modules][social_dribbble]" />
|
318 |
</td>
|
319 |
</tr>
|
320 |
<tr valign="top">
|
321 |
<th scope="row"><label for="options[modules][social_twitter]">Twitter</label></th>
|
322 |
<td>
|
323 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['social_twitter'])); ?>" name="options[modules][social_twitter]" />
|
324 |
</td>
|
325 |
</tr>
|
326 |
<tr valign="top">
|
327 |
<th scope="row"><label for="options[modules][social_facebook]">Facebook</label></th>
|
328 |
<td>
|
329 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['social_facebook'])); ?>" name="options[modules][social_facebook]" />
|
330 |
</td>
|
331 |
</tr>
|
332 |
<tr valign="top">
|
333 |
<th scope="row"><label for="options[modules][social_pinterest]">Pinterest</label></th>
|
334 |
<td>
|
335 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['social_pinterest'])); ?>" name="options[modules][social_pinterest]" />
|
336 |
</td>
|
337 |
</tr>
|
338 |
<tr valign="top">
|
339 |
<th scope="row"><label for="options[modules][social_google+]">Google+</label></th>
|
340 |
<td>
|
341 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['social_google+'])); ?>" name="options[modules][social_google+]" />
|
342 |
</td>
|
343 |
</tr>
|
344 |
|
361 |
<tr valign="top">
|
362 |
<th scope="row"><label for="options[modules][contact_email]"><?php _e('Email address', $this->plugin_slug); ?></label></th>
|
363 |
<td>
|
364 |
+
<input type="text" value="<?php echo esc_attr(stripslashes($this->plugin_settings['modules']['contact_email'])); ?>" name="options[modules][contact_email]" />
|
365 |
</td>
|
366 |
</tr>
|
367 |
<tr valign="top">
|
wp-maintenance-mode.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*
|
6 |
* Plugin Name: WP Maintenance Mode
|
7 |
* Plugin URI: http://designmodo.com/
|
8 |
-
* Description:
|
9 |
-
* Version: 2.0.
|
10 |
* Author: Designmodo
|
11 |
* Author URI: http://designmodo.com/
|
12 |
* Twitter: designmodo
|
5 |
*
|
6 |
* Plugin Name: WP Maintenance Mode
|
7 |
* Plugin URI: http://designmodo.com/
|
8 |
+
* Description: Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
|
9 |
+
* Version: 2.0.1
|
10 |
* Author: Designmodo
|
11 |
* Author URI: http://designmodo.com/
|
12 |
* Twitter: designmodo
|