Maintenance - Version 3.3

Version Description

  • New: Add og meta content
  • New: Default site title
  • Update: WordPress 4.7.1
  • Bug fix: Add function not filter to add paragraph
Download this release

Release Info

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

Code changes from version 3.2 to 3.3

includes/admin.php CHANGED
@@ -12,7 +12,7 @@
12
 
13
  function maintenance_page_add_meta_boxes() {
14
  global $maintenance_variable;
15
- do_action('add_meta_boxes', $maintenance_variable->options_page);
16
 
17
  }
18
 
12
 
13
  function maintenance_page_add_meta_boxes() {
14
  global $maintenance_variable;
15
+ do_action('add_mt_meta_boxes', $maintenance_variable->options_page);
16
 
17
  }
18
 
includes/functions.php CHANGED
@@ -241,32 +241,32 @@ function generate_number_filed($title, $id, $name, $value, $placeholder = '') {
241
  add_meta_box( 'maintenance-css', __( 'Custom CSS', 'maintenance' ), 'add_css_fields', $maintenance_variable->options_page, 'normal', 'default');
242
  add_meta_box( 'maintenance-excludepages', __( 'Exclude pages from maintenance mode', 'maintenance' ), 'add_exclude_pages_fields', $maintenance_variable->options_page, 'normal', 'default');
243
  }
244
- add_action('add_meta_boxes', 'maintenance_page_create_meta_boxes', 10);
245
 
246
  function maintenance_page_create_meta_boxes_widget_pro() {
247
  global $maintenance_variable;
248
  add_meta_box( 'promo-extended', __( 'Pro version', 'maintenance' ), 'maintenanace_extended_version', $maintenance_variable->options_page, 'side', 'default' );
249
  }
250
- add_action('add_meta_boxes', 'maintenance_page_create_meta_boxes_widget_pro', 11);
251
 
252
 
253
  function maintenance_page_create_meta_boxes_our_themes() {
254
  global $maintenance_variable;
255
  add_meta_box( 'promo-our-themes', __( 'Fruitful Code projects', 'maintenance' ), 'maintenanace_our_themes', $maintenance_variable->options_page, 'side', 'default' );
256
  }
257
- add_action('add_meta_boxes', 'maintenance_page_create_meta_boxes_our_themes', 12);
258
 
259
  function maintenance_page_create_meta_boxes_widget_support() {
260
  global $maintenance_variable;
261
  add_meta_box( 'promo-content', __( 'Support', 'maintenance' ), 'maintenanace_contact_support', $maintenance_variable->options_page, 'side', 'default' );
262
  }
263
- add_action('add_meta_boxes', 'maintenance_page_create_meta_boxes_widget_support', 13);
264
 
265
  function maintenance_page_create_meta_boxes_improve_translate() {
266
  global $maintenance_variable;
267
  add_meta_box( 'promo-translate', __( 'Translation', 'maintenance' ), 'maintenanace_improve_translate', $maintenance_variable->options_page, 'side', 'default' );
268
  }
269
- add_action('add_meta_boxes', 'maintenance_page_create_meta_boxes_improve_translate', 14);
270
 
271
  function add_data_fields ($object, $box) {
272
  $mt_option = mt_get_plugin_options(true);
@@ -275,13 +275,13 @@ function generate_number_filed($title, $id, $name, $value, $placeholder = '') {
275
  /*Deafult Variable*/
276
  $page_title = $heading = $description = $logo_width = $logo_height = '';
277
 
278
-
279
- if (isset($mt_option['page_title'])) $page_title = wp_kses_post($mt_option['page_title']);
280
- if (isset($mt_option['heading'])) $heading = wp_kses_post($mt_option['heading']);
281
- if (isset($mt_option['description'])) $description = wp_kses_post($mt_option['description']);
282
- if (isset($mt_option['footer_text'])) $footer_text = wp_kses_post($mt_option['footer_text']);
283
- if (isset($mt_option['logo_width'])) $logo_width = wp_kses_post($mt_option['logo_width']);
284
- if (isset($mt_option['logo_height'])) $logo_height = wp_kses_post($mt_option['logo_height']);
285
 
286
  ?>
287
  <table class="form-table">
241
  add_meta_box( 'maintenance-css', __( 'Custom CSS', 'maintenance' ), 'add_css_fields', $maintenance_variable->options_page, 'normal', 'default');
242
  add_meta_box( 'maintenance-excludepages', __( 'Exclude pages from maintenance mode', 'maintenance' ), 'add_exclude_pages_fields', $maintenance_variable->options_page, 'normal', 'default');
243
  }
244
+ add_action('add_mt_meta_boxes', 'maintenance_page_create_meta_boxes', 10);
245
 
246
  function maintenance_page_create_meta_boxes_widget_pro() {
247
  global $maintenance_variable;
248
  add_meta_box( 'promo-extended', __( 'Pro version', 'maintenance' ), 'maintenanace_extended_version', $maintenance_variable->options_page, 'side', 'default' );
249
  }
250
+ add_action('add_mt_meta_boxes', 'maintenance_page_create_meta_boxes_widget_pro', 11);
251
 
252
 
253
  function maintenance_page_create_meta_boxes_our_themes() {
254
  global $maintenance_variable;
255
  add_meta_box( 'promo-our-themes', __( 'Fruitful Code projects', 'maintenance' ), 'maintenanace_our_themes', $maintenance_variable->options_page, 'side', 'default' );
256
  }
257
+ add_action('add_mt_meta_boxes', 'maintenance_page_create_meta_boxes_our_themes', 12);
258
 
259
  function maintenance_page_create_meta_boxes_widget_support() {
260
  global $maintenance_variable;
261
  add_meta_box( 'promo-content', __( 'Support', 'maintenance' ), 'maintenanace_contact_support', $maintenance_variable->options_page, 'side', 'default' );
262
  }
263
+ add_action('add_mt_meta_boxes', 'maintenance_page_create_meta_boxes_widget_support', 13);
264
 
265
  function maintenance_page_create_meta_boxes_improve_translate() {
266
  global $maintenance_variable;
267
  add_meta_box( 'promo-translate', __( 'Translation', 'maintenance' ), 'maintenanace_improve_translate', $maintenance_variable->options_page, 'side', 'default' );
268
  }
269
+ add_action('add_mt_meta_boxes', 'maintenance_page_create_meta_boxes_improve_translate', 14);
270
 
271
  function add_data_fields ($object, $box) {
272
  $mt_option = mt_get_plugin_options(true);
275
  /*Deafult Variable*/
276
  $page_title = $heading = $description = $logo_width = $logo_height = '';
277
 
278
+ $allowed_tags = wp_kses_allowed_html( 'post' );
279
+ if (isset($mt_option['page_title'])) $page_title = wp_kses_post($mt_option['page_title']);
280
+ if (isset($mt_option['heading'])) $heading = wp_kses_post($mt_option['heading']);
281
+ if (isset($mt_option['description'])) $description = wp_kses(stripslashes($mt_option['description']), $allowed_tags) ;
282
+ if (isset($mt_option['footer_text'])) $footer_text = wp_kses_post($mt_option['footer_text']);
283
+ if (isset($mt_option['logo_width'])) $logo_width = wp_kses_post($mt_option['logo_width']);
284
+ if (isset($mt_option['logo_height'])) $logo_height = wp_kses_post($mt_option['logo_height']);
285
 
286
  ?>
287
  <table class="form-table">
load/functions.php CHANGED
@@ -220,18 +220,20 @@ function get_custom_login_code() {
220
 
221
  }
222
  add_action ('logo_box', 'get_logo_box', 10);
223
-
224
-
225
  function get_content_section() {
226
  $mt_options = mt_get_plugin_options(true);
227
- $out_content = '';
228
  if (!empty($mt_options['heading'])) {
229
- $out_content .= '<h2 class="heading font-center">' . wp_kses_post(stripslashes($mt_options['heading'])) .'</h2>';
230
  }
231
-
232
  if (!empty($mt_options['description'])) {
233
- $description_content = apply_filters( 'the_content', $mt_options['description'] );
234
- $out_content .= '<h3 class="description font-center">' . $description_content .'</h3>';
 
 
 
235
  }
236
 
237
  echo $out_content;
220
 
221
  }
222
  add_action ('logo_box', 'get_logo_box', 10);
223
+
 
224
  function get_content_section() {
225
  $mt_options = mt_get_plugin_options(true);
226
+ $out_content = null;
227
  if (!empty($mt_options['heading'])) {
228
+ $out_content .= '<h2 class="heading font-center">' . wp_kses_post(stripslashes($mt_options['heading'])) .'</h2>';
229
  }
230
+
231
  if (!empty($mt_options['description'])) {
232
+ $description_content = wpautop(wp_kses_post(stripslashes($mt_options['description'])), true);
233
+ $out_content .= '<div class="description">' . $description_content .'</div>';
234
+ } else {
235
+ $site_description = get_bloginfo('description');
236
+ $out_content .= '<div class="description"><h3>' . $site_description .'</h3></div>';
237
  }
238
 
239
  echo $out_content;
load/index.php CHANGED
@@ -2,10 +2,30 @@
2
  $mess_arr = array();
3
  $ebody_class = null;
4
  $mess_arr = get_custom_login_code();
5
- if (!empty($mess_arr[0])) $ebody_class = 'error';
6
- $mt_options = mt_get_plugin_options(true);
7
- $page_title = get_bloginfo('title');
8
- $description = get_bloginfo('description');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  ?>
10
  <!DOCTYPE html>
11
  <!--[if IE 7]>
@@ -21,12 +41,19 @@
21
  <meta charset="<?php bloginfo( 'charset' ); ?>" />
22
  <?php get_page_title(esc_attr($mess_arr[0])); ?>
23
  <meta name="viewport" content="width=device-width, user-scalable=no, maximum-scale=1, initial-scale=1, minimum-scale=1">
24
- <meta name="description" content="<?php echo $description; ?>"/>
25
- <meta property="og:title" content="<?php echo $page_title; ?>"/>
26
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
 
 
27
  <meta property="og:type" content="Maintenance"/>
28
  <meta property="og:url" content="<?php echo site_url(); ?>"/>
29
- <meta property="og:description" content="<?php echo $description; ?>"/>
 
 
 
 
 
 
30
  <link rel="profile" href="http://gmpg.org/xfn/11" />
31
  <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
32
  <?php do_action('load_custom_scripts'); ?>
2
  $mess_arr = array();
3
  $ebody_class = null;
4
  $mess_arr = get_custom_login_code();
5
+ if (!empty($mess_arr[0])) {
6
+ $ebody_class = 'error';
7
+ }
8
+ $mt_options = mt_get_plugin_options(true);
9
+ $site_title = get_bloginfo('title');
10
+ $site_description = get_bloginfo('description');
11
+
12
+
13
+ $page_title = (isset($mt_options['page_title']) && !empty($mt_options['page_title'])) ? esc_attr($mt_options['page_title']) : $site_title;
14
+ $logo = (isset($mt_options['logo']) && !empty($mt_options['logo'])) ? esc_attr($mt_options['logo']) : null;
15
+ $logo_ext = null;
16
+
17
+ if (!empty($logo)) {
18
+ $logo = wp_get_attachment_image_src($logo, 'full');
19
+ $logo = esc_url($logo[0]);
20
+ $logo_info = getimagesize($logo);
21
+ $logo_ext = image_type_to_extension($logo_info[2]);
22
+ $logo_ext = str_replace('.', '', $logo_ext);
23
+ }
24
+
25
+ $page_description = (isset($mt_options['description']) && !empty($mt_options['description'])) ? esc_attr($mt_options['description']) : $site_description;
26
+ if (!empty($page_description)) {
27
+ $page_description = urlencode_deep(apply_filters( 'wpautop', wp_kses_post(stripslashes($page_description))));
28
+ }
29
  ?>
30
  <!DOCTYPE html>
31
  <!--[if IE 7]>
41
  <meta charset="<?php bloginfo( 'charset' ); ?>" />
42
  <?php get_page_title(esc_attr($mess_arr[0])); ?>
43
  <meta name="viewport" content="width=device-width, user-scalable=no, maximum-scale=1, initial-scale=1, minimum-scale=1">
44
+ <meta name="description" content="<?php echo $site_description; ?>"/>
 
45
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
46
+ <meta property="og:site_name" content="<?php echo $site_title . ' - ' . $site_description; ?>"/>
47
+ <meta property="og:title" content="<?php echo $page_title; ?>"/>
48
  <meta property="og:type" content="Maintenance"/>
49
  <meta property="og:url" content="<?php echo site_url(); ?>"/>
50
+ <meta property="og:description" content="<?php echo $page_description; ?>"/>
51
+ <?php if (!empty($logo)) { ?>
52
+ <meta property="og:image" content="<?php echo $logo; ?>" />
53
+ <meta property="og:image:url" content="<?php echo $logo; ?>"/>
54
+ <meta property="og:image:secure_url" content="<?php echo $logo; ?>"/>
55
+ <meta property="og:image:type" content="<?php echo $logo_ext; ?>"/>
56
+ <?php } ?>
57
  <link rel="profile" href="http://gmpg.org/xfn/11" />
58
  <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
59
  <?php do_action('load_custom_scripts'); ?>
load/style.css CHANGED
@@ -181,17 +181,60 @@ header {
181
  font-weight:lighter;
182
  }
183
 
184
- .site-content h3.description {
185
  font-size:28px;
186
  font-weight:lighter;
 
187
  }
188
 
189
- .site-content h3.description p {
190
- font-size: 28px;
191
  margin: 0;
192
  line-height: normal;
193
  }
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  .site-content p {
196
  font-size: 16px;
197
  margin: 0 0 15px 0;
@@ -596,7 +639,7 @@ and (orientation : landscape) {
596
  .site-content h2.heading {
597
  font-size: 24px;
598
  }
599
- .site-content h3.description {
600
  font-size: 18px;
601
  }
602
 
@@ -637,7 +680,7 @@ and (orientation : landscape) {
637
  .site-content h2.heading {
638
  font-size: 24px;
639
  }
640
- .site-content h3.description {
641
  font-size: 18px;
642
  }
643
  .btn-open-login-form {
181
  font-weight:lighter;
182
  }
183
 
184
+ .site-content .description h3 {
185
  font-size:28px;
186
  font-weight:lighter;
187
+ text-align:center;
188
  }
189
 
190
+ .site-content .description p {
191
+ font-size: 14px;
192
  margin: 0;
193
  line-height: normal;
194
  }
195
 
196
+ .site-content .description ul,
197
+ .site-content .description ol {
198
+ margin:5px 0;
199
+ }
200
+
201
+ .site-content .description p {
202
+ margin-bottom:10px;
203
+ }
204
+
205
+ .site-content .description blockquote {
206
+ font-size: 18px;
207
+ font-style: italic;
208
+ margin: 0.25em 0;
209
+ padding: 1.5em 40px 0 40px;
210
+ line-height: 1.45;
211
+ position: relative;
212
+ text-align:left;
213
+ display:block;
214
+ }
215
+
216
+ .site-content .description blockquote:before {
217
+ display: block;
218
+ font-family: Georgia, serif;
219
+ content: "\201C";
220
+ font-size: 80px;
221
+ position: absolute;
222
+ left: -5px;
223
+ top: -5px;
224
+ opacity:0.85;
225
+ }
226
+
227
+ .site-content .description blockquote cite {
228
+ font-size: 14px;
229
+ display: block;
230
+ margin-top: 5px;
231
+ opacity:0.85;
232
+ }
233
+
234
+ .site-content .description blockquote cite:before {
235
+ content: "\2014 \2009";
236
+ }
237
+
238
  .site-content p {
239
  font-size: 16px;
240
  margin: 0 0 15px 0;
639
  .site-content h2.heading {
640
  font-size: 24px;
641
  }
642
+ .site-content .description h3 {
643
  font-size: 18px;
644
  }
645
 
680
  .site-content h2.heading {
681
  font-size: 24px;
682
  }
683
+ .site-content .description h3{
684
  font-size: 18px;
685
  }
686
  .btn-open-login-form {
maintenance.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Maintenance
4
  Plugin URI: http://wordpress.org/plugins/maintenance/
5
  Description: Take your website for maintenance away from 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 by login and password. Plugin has a options to add a logo, background, headline, message, colors, login, etc. Extended PRO with more features version is available for purchase.
6
- Version: 3.2
7
  Author: fruitfulcode
8
  Author URI: http://fruitfulcode.com
9
  License: GPL2
3
  Plugin Name: Maintenance
4
  Plugin URI: http://wordpress.org/plugins/maintenance/
5
  Description: Take your website for maintenance away from 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 by login and password. Plugin has a options to add a logo, background, headline, message, colors, login, etc. Extended PRO with more features version is available for purchase.
6
+ Version: 3.3
7
  Author: fruitfulcode
8
  Author URI: http://fruitfulcode.com
9
  License: GPL2
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: fruitfulcode
3
  Donate link: http://fruitfulcode.com/
4
  Tags: maintenance, maintenance mode, coming soon, splash page, under-construction, 503 error, administration, login, customize page, background, fullscreen, blur
5
  Requires at least: 3.4
6
- Tested up to: 4.6.1
7
- Stable tag: 3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -122,6 +122,12 @@ You can check <a href="http://wordpress.org/support/plugin/maintenance">support
122
 
123
  == Change log ==
124
 
 
 
 
 
 
 
125
  = 3.2 =
126
  * New: Hungarian translation
127
  * New: Persian translation
3
  Donate link: http://fruitfulcode.com/
4
  Tags: maintenance, maintenance mode, coming soon, splash page, under-construction, 503 error, administration, login, customize page, background, fullscreen, blur
5
  Requires at least: 3.4
6
+ Tested up to: 4.7.1
7
+ Stable tag: 3.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
122
 
123
  == Change log ==
124
 
125
+ = 3.3 =
126
+ * New: Add og meta content
127
+ * New: Default site title
128
+ * Update: WordPress 4.7.1
129
+ * Bug fix: Add function not filter to add paragraph
130
+
131
  = 3.2 =
132
  * New: Hungarian translation
133
  * New: Persian translation