Maintenance - Version 1.2

Version Description

  • Translation ready
  • Add Russian language
  • Add option for display admin bar
  • Css fixes for WP 3.5
Download this release

Release Info

Developer fruitfulcode
Plugin Icon 128x128 Maintenance
Version 1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.2

assets/banner-772x250.png CHANGED
File without changes
css/admin.css CHANGED
@@ -27,10 +27,10 @@
27
  #maintenance-options h3{margin:0 0 16px 4px;}
28
  #maintenance-options #steps{margin:0 0 20px 15px;padding:0 0 0 14px;}
29
  #maintenance-options #steps li{margin:0 0 5px 0;padding:0;}
30
- .theme-options{border:0;margin:0;padding:0;width:471px; float: left;}
31
  .theme-options h4{margin-top:0;}
32
  .theme-options div{border:0;margin:0 0 30px 0;padding:10px 0 0 0px;}
33
- .theme-options label{display:block;float:left;margin:0 0 5px;padding-right:15px;text-align:right;width:118px;padding-top:4px;}
34
  .theme-options input,#options #tabs .theme-options textarea{margin:0 0 15px 0;width:300px;}
35
  .theme-options textarea{height:80px;}
36
  .theme-options .explanation{margin-top:-15px;font-size:10px;color:#ccc;}
@@ -47,8 +47,16 @@
47
  .tzCBPart{background:url( '../images/background.png ') no-repeat left bottom;width:14px;position:absolute;top:0;left:-14px;height:33px;overflow:hidden;}
48
  .tzCheckBox.checked .tzCBPart{background-position:top right;left:auto;right:-14px;}
49
  .logo{float:left;margin-right:20px;padding-top:15px;}
50
- .button-primary{width:82px !important;float:right}
 
51
  #contact-support {background-image: url("../images/mini-logo.png"); background-position: 0 3px; background-repeat: no-repeat; display: block; float: left; height: 30px; margin-left: 16px; margin-top: 50px; padding: 4px 42px;}
 
 
 
 
 
 
 
52
 
53
  *+html #maintenance-options.wrap form #general .title h1 {line-height:1em !important; margin-top:15px; }
54
  *+html .time-block, .video-block, .html-block {margin-top:20px;}
27
  #maintenance-options h3{margin:0 0 16px 4px;}
28
  #maintenance-options #steps{margin:0 0 20px 15px;padding:0 0 0 14px;}
29
  #maintenance-options #steps li{margin:0 0 5px 0;padding:0;}
30
+ .theme-options{border:0;margin:0;padding:0;width:508px; float: left;}
31
  .theme-options h4{margin-top:0;}
32
  .theme-options div{border:0;margin:0 0 30px 0;padding:10px 0 0 0px;}
33
+ .theme-options label{display:block;float:left;margin:0 0 5px;padding-right:15px;text-align:right;width:150px;padding-top:4px;}
34
  .theme-options input,#options #tabs .theme-options textarea{margin:0 0 15px 0;width:300px;}
35
  .theme-options textarea{height:80px;}
36
  .theme-options .explanation{margin-top:-15px;font-size:10px;color:#ccc;}
47
  .tzCBPart{background:url( '../images/background.png ') no-repeat left bottom;width:14px;position:absolute;top:0;left:-14px;height:33px;overflow:hidden;}
48
  .tzCheckBox.checked .tzCBPart{background-position:top right;left:auto;right:-14px;}
49
  .logo{float:left;margin-right:20px;padding-top:15px;}
50
+ .button-primary{float: right; margin-right: 41px !important; width: 95px !important;}
51
+
52
  #contact-support {background-image: url("../images/mini-logo.png"); background-position: 0 3px; background-repeat: no-repeat; display: block; float: left; height: 30px; margin-left: 16px; margin-top: 50px; padding: 4px 42px;}
53
+ #admin_bar_enabled {float: left; margin: 5px 0 0 0; width: 16px;}
54
+ .theme-options .option-box {float:left; width:100%; display:block; padding:0; margin:0}
55
+
56
+ @media screen and (-webkit-min-device-pixel-ratio:0) {
57
+ .theme-options .option-box .option-box input#theme_logo,
58
+ .theme-options .option-box .option-box input#body_bg { width:292px }
59
+ }
60
 
61
  *+html #maintenance-options.wrap form #general .title h1 {line-height:1em !important; margin-top:15px; }
62
  *+html .time-block, .video-block, .html-block {margin-top:20px;}
functions.php CHANGED
File without changes
images/background.png CHANGED
File without changes
images/body_bg.jpg CHANGED
File without changes
images/buttons.png CHANGED
File without changes
images/header_bg.jpg CHANGED
File without changes
images/icon-small.png CHANGED
File without changes
images/icon.png CHANGED
File without changes
images/ie.png CHANGED
File without changes
images/mini-logo.png CHANGED
File without changes
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Maintenance
4
  Plugin URI: http://wordpress.org/extend/plugins/maintenance/
5
  Description: Take your site down from public view with a click of a button hiding the site when you need to change a few things or run an upgrade, making it only accessible by login and password. There is also an area to add a custom message which will be shown to the users while your site is down. Users stay on the same page when they input wrong initials.
6
- Version: 1.1.1
7
  Author: fruitfulcode
8
  Author URI: http://fruitfulcode.com
9
  License: GPL2
@@ -31,10 +31,14 @@
31
  include_once 'functions.php';
32
 
33
  $mt_options = mt_get_option();
34
- if ($mt_options['state'] == "maintenance") {
 
 
35
  add_filter('show_admin_bar', '__return_false');
36
- }
37
-
 
 
38
  add_action( 'template_redirect', 'mt_template_redirect' );
39
  add_action( 'admin_menu', 'dashboard_menu' );
40
  add_action( 'wp_logout','user_logout');
@@ -48,6 +52,12 @@
48
  add_action( "admin_print_styles-$page", 'admin_head' );
49
  }
50
 
 
 
 
 
 
 
51
  function admin_head()
52
  {
53
 
3
  Plugin Name: Maintenance
4
  Plugin URI: http://wordpress.org/extend/plugins/maintenance/
5
  Description: Take your site down from public view with a click of a button hiding the site when you need to change a few things or run an upgrade, making it only accessible by login and password. There is also an area to add a custom message which will be shown to the users while your site is down. Users stay on the same page when they input wrong initials.
6
+ Version: 1.2
7
  Author: fruitfulcode
8
  Author URI: http://fruitfulcode.com
9
  License: GPL2
31
  include_once 'functions.php';
32
 
33
  $mt_options = mt_get_option();
34
+ if (($mt_options['lib_options']['admin_bar_enabled'] == "1")) {
35
+ add_filter('show_admin_bar', '__return_true');
36
+ } else {
37
  add_filter('show_admin_bar', '__return_false');
38
+ }
39
+
40
+ if ($mt_options['state'] == "maintenance") {/*maintenance mode is active*/}
41
+
42
  add_action( 'template_redirect', 'mt_template_redirect' );
43
  add_action( 'admin_menu', 'dashboard_menu' );
44
  add_action( 'wp_logout','user_logout');
52
  add_action( "admin_print_styles-$page", 'admin_head' );
53
  }
54
 
55
+
56
+ function mn_plugin_init() {
57
+ load_plugin_textdomain( 'maintenance', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
58
+ }
59
+ add_action('plugins_loaded', 'mn_plugin_init');
60
+
61
  function admin_head()
62
  {
63
 
js/init.js CHANGED
File without changes
languages/maintenance-ru_RU.mo ADDED
Binary file
languages/maintenance-ru_RU.po ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: maintenance\n"
4
+ "POT-Creation-Date: 2012-12-21 15:51+0200\n"
5
+ "PO-Revision-Date: 2012-12-21 16:11+0200\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: fruitfulcode.com\n"
8
+ "Language: Russian\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.5.4\n"
13
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
14
+ "X-Poedit-Basepath: C:\\wamp\\www\\yakovlev\\wr_browser\\wp-content\\plugins"
15
+ "\\maintenance\n"
16
+ "X-Poedit-SearchPath-0: C:\\wamp\\www\\yakovlev\\wr_browser\\wp-content"
17
+ "\\plugins\\maintenance\\lib\n"
18
+
19
+ #: lib/index.php:94
20
+ msgid "Your session has expired."
21
+ msgstr "Ваша сессия истеклаю"
22
+
23
+ #: lib/index.php:195
24
+ msgid "Sign In"
25
+ msgstr "Войти"
26
+
27
+ #: lib/options.php:2
28
+ msgid "Page title"
29
+ msgstr "Заголовок страницы"
30
+
31
+ #: lib/options.php:3
32
+ msgid "Website is under construction"
33
+ msgstr "Сайт находится на стадии разработки"
34
+
35
+ #: lib/options.php:4
36
+ msgid "Headline"
37
+ msgstr "Заголовок"
38
+
39
+ #: lib/options.php:5
40
+ msgid "Customer login"
41
+ msgstr "Вход для администратора"
42
+
43
+ #: lib/options.php:6
44
+ msgid "Description"
45
+ msgstr "Описание"
46
+
47
+ #: lib/options.php:7
48
+ msgid "Please login to see website"
49
+ msgstr "Пожалуйста, войдите, чтобы сайт стал доступным"
50
+
51
+ #: lib/options.php:8
52
+ msgid "Logo"
53
+ msgstr "Логотип"
54
+
55
+ #: lib/options.php:11
56
+ msgid "Background image"
57
+ msgstr "Фоновое изображение"
58
+
59
+ #: lib/options.php:14
60
+ msgid "Background color"
61
+ msgstr "Цвет фона"
62
+
63
+ #: lib/options.php:16
64
+ msgid "Admin Bar"
65
+ msgstr "Админ. панель"
66
+
67
+ #: page-options:44
68
+ msgid "Save changes"
69
+ msgstr "Сохранить"
70
+
71
+ #: page-options:52
72
+ msgid "Contact Support"
73
+ msgstr "Контактная информация"
74
+
75
+ #: page-options:54
76
+ msgid "Premium version"
77
+ msgstr "Premium версия"
78
+
79
+ #: page-options:55
80
+ msgid "Check out our extended version of plugin with new features"
81
+ msgstr "Узнайте возможности расширенной версии"
lib/functions.php CHANGED
File without changes
lib/images/error.png CHANGED
File without changes
lib/images/fruitfulcode.png CHANGED
File without changes
lib/images/logo-bg-default.png CHANGED
File without changes
lib/images/pass-icon.png CHANGED
File without changes
lib/images/theme-bg-default.jpg CHANGED
File without changes
lib/images/user-icon.png CHANGED
File without changes
lib/index.php CHANGED
File without changes
lib/js/DD_belatedPNG_0.0.7a-min.js CHANGED
File without changes
lib/js/jquery.countdown.js CHANGED
File without changes
lib/js/jquery.placeholder.js CHANGED
File without changes
lib/options.php CHANGED
@@ -1,15 +1,30 @@
1
  <?php global $mt_option; $lib_options = ''; $lib_options = $mt_option['lib_options']; ?>
2
- <label for="page_title">Page title</label>
3
- <input type="text" id="page_title" name="lib_options[page_title]" value="<?php echo ( isset( $lib_options['page_title'] ) ) ? $lib_options['page_title'] : 'Website is under construction'; ?>" />
4
- <label for="heading">Headline</label>
5
- <input type="text" id="heading" name="lib_options[heading]" value="<?php echo ( isset( $lib_options['heading'] ) ) ? $lib_options['heading'] : 'Customer login'; ?>" />
6
- <label for="time_text">Description</label>
7
- <input type="text" id="time_text" name="lib_options[time_text]" value="<?php echo ( isset( $lib_options['time_text'] ) ) ? $lib_options['time_text'] : 'Please login to see website'; ?>" />
8
- <label for="theme_logo">Logo</label>
 
 
 
 
 
 
9
  <input type="file" id="theme_logo" name="lib_options[logo]" />
10
  <?php if ( $lib_options['logo'] ): ?><input class="button remove" type="submit" name="remove_logo" value="x" /><?php endif; ?>
11
- <label for="body_bg">Background image</label>
 
 
12
  <input type="file" id="body_bg" name="lib_options[body_bg]" />
13
  <?php if ( $lib_options['body_bg'] ): ?><input class="button remove" type="submit" name="remove_bg" value="x" /><?php endif; ?>
14
- <label for="body_bg_color">Background color</label>
15
- <input type="text" id="body_bg_color" name="lib_options[body_bg_color]" value="<?php echo ( isset( $lib_options['body_bg_color'] ) ) ? stripslashes($lib_options['body_bg_color']) : '#fff'; ?>" />
 
 
 
 
 
 
 
1
  <?php global $mt_option; $lib_options = ''; $lib_options = $mt_option['lib_options']; ?>
2
+ <div class="option-box">
3
+ <label for="page_title"><?php _e('Page title', 'maintenance');?></label>
4
+ <input type="text" id="page_title" name="lib_options[page_title]" value="<?php echo ( isset( $lib_options['page_title'] ) ) ? $lib_options['page_title'] : _e('Website is under construction', 'maintenance'); ?>" />
5
+ </div>
6
+ <div class="option-box">
7
+ <label for="heading"><?php _e('Headline', 'maintenance');?></label>
8
+ <input type="text" id="heading" name="lib_options[heading]" value="<?php echo ( isset( $lib_options['heading'] ) ) ? $lib_options['heading'] : _e('Customer login', 'maintenance'); ?>" />
9
+ </div>
10
+ <div class="option-box">
11
+ <label for="time_text"><?php _e('Description', 'maintenance');?></label>
12
+ <input type="text" id="time_text" name="lib_options[time_text]" value="<?php echo ( isset( $lib_options['time_text'] ) ) ? $lib_options['time_text'] : _e('Please login to see website', 'maintenance'); ?>" />
13
+ <div class="option-box">
14
+ <label for="theme_logo"><?php _e('Logo', 'maintenance');?></label>
15
  <input type="file" id="theme_logo" name="lib_options[logo]" />
16
  <?php if ( $lib_options['logo'] ): ?><input class="button remove" type="submit" name="remove_logo" value="x" /><?php endif; ?>
17
+ </div>
18
+ <div class="option-box">
19
+ <label for="body_bg"><?php _e('Background image', 'maintenance');?></label>
20
  <input type="file" id="body_bg" name="lib_options[body_bg]" />
21
  <?php if ( $lib_options['body_bg'] ): ?><input class="button remove" type="submit" name="remove_bg" value="x" /><?php endif; ?>
22
+ </div>
23
+ <div class="option-box">
24
+ <label for="body_bg_color"><?php _e('Background color', 'maintenance');?></label>
25
+ <input type="text" id="body_bg_color" name="lib_options[body_bg_color]" value="<?php echo ( isset( $lib_options['body_bg_color'] ) ) ? stripslashes($lib_options['body_bg_color']) : '#fff'; ?>" />
26
+ </div>
27
+ <div class="option-box">
28
+ <label for='Admin Bar'><?php _e('Admin Bar', 'maintenance');?></label>
29
+ <input type="checkbox" id="admin_bar_enabled" name="lib_options[admin_bar_enabled]" value="1" <?php if (isset($lib_options['admin_bar_enabled'])) { if ($lib_options['admin_bar_enabled'] == "1") { echo 'checked="checked"'; }} ?>/>
30
+ </div>
lib/style.css CHANGED
File without changes
page-options.php CHANGED
@@ -41,18 +41,18 @@
41
 
42
  <div class="theme-options">
43
  <?php include_once dirname( __FILE__ ).'/'.LIB_DIR.'/options.php'; ?>
44
- <input type="submit" id="mt-submit" name="save_changes" class="button-primary" value="Save changes" />
45
  </div>
46
  </div>
47
  </form>
48
 
49
  <!-- Contact Support-->
50
  <div id="contact-support">
51
- <a href="mailto:support@fruitfulcode.com" title="Contact Support" target="_blank">
52
- Contact Support
53
  </a><br>
54
- <a href="http://codecanyon.net/item/maintenance-wordpress-plugin/2781350" title="Premium version" target="_blank">
55
- Check out our extended version of plugin with new features
56
  </a><br>
57
  </div>
58
  <!-- End Contact Support-->
41
 
42
  <div class="theme-options">
43
  <?php include_once dirname( __FILE__ ).'/'.LIB_DIR.'/options.php'; ?>
44
+ <input type="submit" id="mt-submit" name="save_changes" class="button-primary" value="<?php _e('Save changes', 'maintenance');?>" />
45
  </div>
46
  </div>
47
  </form>
48
 
49
  <!-- Contact Support-->
50
  <div id="contact-support">
51
+ <a href="mailto:support@fruitfulcode.com" title="<?php _e('Contact Support', 'maintenance');?>" target="_blank">
52
+ <?php _e('Contact Support', 'maintenance');?>
53
  </a><br>
54
+ <a href="http://codecanyon.net/item/maintenance-wordpress-plugin/2781350" title="<?php _e('Premium version', 'maintenance');?>" target="_blank">
55
+ <?php _e('Check out our extended version of plugin with new features', 'maintenance');?>
56
  </a><br>
57
  </div>
58
  <!-- End Contact Support-->
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: fruitfulcode
3
  Donate link: http://fruitfulcode.com/
4
  Tags: maintenance, login, under-construction, administration, offline, unavailable, landing page
5
  Requires at least: 3.0
6
- Tested up to: 3.3.2
7
- Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -48,6 +48,12 @@ No, it will be display error on current maintenance page, without redirect to wp
48
 
49
  == Changelog ==
50
 
 
 
 
 
 
 
51
  = 1.1.1 =
52
 
53
  Css fixes
3
  Donate link: http://fruitfulcode.com/
4
  Tags: maintenance, login, under-construction, administration, offline, unavailable, landing page
5
  Requires at least: 3.0
6
+ Tested up to: 3.5
7
+ Stable tag: 1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
48
 
49
  == Changelog ==
50
 
51
+ = 1.2 =
52
+ * Translation ready
53
+ * Add Russian language
54
+ * Add option for display admin bar
55
+ * Css fixes for WP 3.5
56
+
57
  = 1.1.1 =
58
 
59
  Css fixes
screenshot-1.png CHANGED
File without changes
screenshot-2.png CHANGED
File without changes