Under Construction - Version 2.40

Version Description

  • 2017/08/07
  • new social icon - Telegram
  • removed autoresponders survey
  • we've crossed the 100k users mark & 515k downloads on August 5th
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Under Construction
Version 2.40
Comparing to
See all releases

Code changes from version 2.35 to 2.40

images/surveys/activecampaign.png DELETED
Binary file
images/surveys/aweber.png DELETED
Binary file
images/surveys/campaign_monitor.png DELETED
Binary file
images/surveys/drip.png DELETED
Binary file
images/surveys/getresponse.png DELETED
Binary file
images/surveys/mad_mimi.png DELETED
Binary file
images/surveys/mailchimp.png DELETED
Binary file
images/surveys/zapier.png DELETED
Binary file
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: WebFactory, UnderConstructionPage
3
  Tags: maintenance mode, maintenance page, coming soon page, landing page, under construction
4
  Requires at least: 4.0
5
  Tested up to: 4.8
6
- Stable tag: 2.35
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -45,6 +45,7 @@ A simple, no-nonsense plugin for all those situations when you have to hide the
45
  * Email
46
  * Phone
47
  * Skype
 
48
  * WhatsApp
49
  * Tumblr
50
  * Whitelisted User Roles - user roles who see the site, instead of maintenance page
@@ -104,6 +105,12 @@ Or if needed, upload manually;
104
 
105
  == Changelog ==
106
 
 
 
 
 
 
 
107
  = 2.35 =
108
  * 2017/07/24
109
  * UCP can now be quickly disabled/enabled directly from the admin bar menu
@@ -113,7 +120,7 @@ Or if needed, upload manually;
113
  = 2.30 =
114
  * 2017/07/10
115
  * we've crossed the 90k users mark on July 8th
116
- * added Autoresponders survey
117
  * new filter - ucp_is_construction_mode_enabled
118
  * CSS in all themes is now enqueued, not hardcoded
119
 
3
  Tags: maintenance mode, maintenance page, coming soon page, landing page, under construction
4
  Requires at least: 4.0
5
  Tested up to: 4.8
6
+ Stable tag: 2.40
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
45
  * Email
46
  * Phone
47
  * Skype
48
+ * Telegram
49
  * WhatsApp
50
  * Tumblr
51
  * Whitelisted User Roles - user roles who see the site, instead of maintenance page
105
 
106
  == Changelog ==
107
 
108
+ = 2.40 =
109
+ * 2017/08/07
110
+ * new social icon - Telegram
111
+ * removed autoresponders survey
112
+ * we've crossed the 100k users mark & 515k downloads on August 5th
113
+
114
  = 2.35 =
115
  * 2017/07/24
116
  * UCP can now be quickly disabled/enabled directly from the admin bar menu
120
  = 2.30 =
121
  * 2017/07/10
122
  * we've crossed the 90k users mark on July 8th
123
+ * added autoresponders survey
124
  * new filter - ucp_is_construction_mode_enabled
125
  * CSS in all themes is now enqueued, not hardcoded
126
 
themes/stop/style.css CHANGED
@@ -24,6 +24,10 @@ body {
24
  background-attachment: fixed;
25
  }
26
 
 
 
 
 
27
  .top-container {
28
  padding: 100px 0;
29
  }
24
  background-attachment: fixed;
25
  }
26
 
27
+ a {
28
+ color: #000000;
29
+ }
30
+
31
  .top-container {
32
  padding: 100px 0;
33
  }
under-construction.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: https://underconstructionpage.com/
5
  Description: Hide your site behind a great looking under construction page while you do maintenance work.
6
  Author: Web factory Ltd
7
- Version: 2.35
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
@@ -76,6 +76,7 @@ class UCP {
76
  add_filter('plugin_action_links_' . plugin_basename(__FILE__),
77
  array(__CLASS__, 'plugin_action_links'));
78
  add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
 
79
 
80
  // manages admin header notifications
81
  add_action('admin_notices', array(__CLASS__, 'admin_notices'));
@@ -257,8 +258,9 @@ class UCP {
257
  $surveys = get_option(UCP_SURVEYS_KEY);
258
  $meta = self::get_meta();
259
 
260
- // survey is shown min 5 min after install
261
- if (empty($surveys['autoresponders']) && current_time('timestamp') - $meta['first_install'] > 300) {
 
262
  $open_survey = true;
263
  } else {
264
  $open_survey = false;
@@ -454,6 +456,9 @@ class UCP {
454
  if (!empty($options['social_whatsapp'])) {
455
  $out .= '<a title="WhatsApp" href="whatsapp:' . $options['social_whatsapp'] . '"><i class="fa fa-whatsapp fa-3x"></i></a>';
456
  }
 
 
 
457
  if (!empty($options['social_email'])) {
458
  $out .= '<a title="Email" href="mailto:' . self::encode_email($options['social_email']) . '"><i class="fa fa-envelope fa-3x"></i></a>';
459
  }
@@ -735,28 +740,28 @@ class UCP {
735
 
736
  $wp_admin_bar->add_menu(array(
737
  'parent' => '',
738
- 'id' => 'under-construction-page',
739
- 'title' => $main_label,
740
- 'href' => admin_url('options-general.php?page=ucp'),
741
- 'meta' => array('class' => $class)
742
  ));
743
  $wp_admin_bar->add_node( array(
744
  'id' => 'ucp-info',
745
  'title' => $status,
746
- 'href' => false,
747
  'parent'=> 'under-construction-page'
748
  ));
749
  $wp_admin_bar->add_node( array(
750
  'id' => 'ucp-status',
751
  'title' => $action,
752
- 'href' => $action_url,
753
  'parent'=> 'under-construction-page'
754
  ));
755
  $wp_admin_bar->add_node( array(
756
- 'id' => 'ucp-settings',
757
- 'title' => __('Settings', 'under-construction-page'),
758
- 'href' => admin_url('options-general.php?page=ucp'),
759
- 'parent'=> 'under-construction-page'
760
  ));
761
  } // admin_bar_notice
762
 
@@ -792,6 +797,30 @@ class UCP {
792
  } // plugin_meta_links
793
 
794
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
795
  // create the admin menu item
796
  static function admin_menu() {
797
  add_options_page('UnderConstruction', 'UnderConstruction', 'manage_options', 'ucp', array(__CLASS__, 'main_page'));
@@ -829,6 +858,7 @@ class UCP {
829
  'social_email' => '',
830
  'social_phone' => '',
831
  'social_skype' => '',
 
832
  'social_whatsapp' => '',
833
  'login_button' => '1',
834
  'linkback' => '0',
@@ -864,7 +894,7 @@ class UCP {
864
  case 'social_tumblr':
865
  case 'social_email':
866
  case 'social_phone':
867
- case 'social_skype':
868
  case 'social_whatsapp':
869
  $options[$key] = trim($value);
870
  break;
@@ -1145,9 +1175,9 @@ class UCP {
1145
  echo '</td></tr>';
1146
 
1147
  echo '<tr valign="top">
1148
- <th scope="row"><label for="social_skype">Skype Username</label></th>
1149
- <td><input id="social_skype" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_skype]" value="' . esc_attr($options['social_skype']) . '" placeholder="Skype username / account name">';
1150
- echo '<p class="description">Skype username / account name.</p>';
1151
  echo '</td></tr>';
1152
 
1153
  echo '<tr valign="top">
@@ -1375,67 +1405,6 @@ class UCP {
1375
 
1376
  echo '</form>'; // ucp_tabs
1377
  echo '</div>'; // wrap
1378
-
1379
- echo '<div id="features-survey-dialog" style="display: none;" title="Please help us make UCP better"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
1380
- echo '<p><span class="ucp-logo">UnderConstructionPage</span> will soon have a feature to collect emails (leads) via a form on all themes. <b>Which autoresponder / email service should we natively support?</b></p>';
1381
-
1382
- $questions = array();
1383
- $questions[] = '<div class="question-wrapper" data-value="mailchimp">' .
1384
- '<img src="' . UCP_PLUGIN_URL . 'images/surveys/mailchimp.png" alt="MailChimp" title="MailChimp">' .
1385
- '<div class="question"><b>MailChimp</b></div>' .
1386
- '</div>';
1387
-
1388
- $questions[] = '<div class="question-wrapper" data-value="localdb">' .
1389
- '<span title="Local database" class="dashicons big dashicons-list-view"></span>'.
1390
- '<div class="question"><b>Local database</b></div>' .
1391
- '</div>';
1392
-
1393
- $questions[] = '<div class="question-wrapper" data-value="zapier">' .
1394
- '<img src="' . UCP_PLUGIN_URL . 'images/surveys/zapier.png" alt="Zapier" title="Zapier">' .
1395
- '<div class="question"><b>Zapier</b></div>' .
1396
- '</div>';
1397
-
1398
- $questions[] = '<div class="question-wrapper" data-value="getresponse">' .
1399
- '<img src="' . UCP_PLUGIN_URL . 'images/surveys/getresponse.png" alt="GetResponse" title="GetResponse">' .
1400
- '<div class="question"><b>GetResponse</b></div>' .
1401
- '</div>';
1402
-
1403
- $questions[] = '<div class="question-wrapper" data-value="activecampaign">' .
1404
- '<img src="' . UCP_PLUGIN_URL . 'images/surveys/activecampaign.png" alt="ActiveCampaign" title="ActiveCampaign">' .
1405
- '<div class="question"><b>ActiveCampaign</b></div>' .
1406
- '</div>';
1407
-
1408
- $questions[] = '<div class="question-wrapper" data-value="drip">' .
1409
- '<img src="' . UCP_PLUGIN_URL . 'images/surveys/drip.png" alt="Drip" title="Drip">' .
1410
- '<div class="question"><b>Drip</b></div>' .
1411
- '</div>';
1412
-
1413
- $questions[] = '<div class="question-wrapper" data-value="campaignmonitor">' .
1414
- '<img src="' . UCP_PLUGIN_URL . 'images/surveys/campaign_monitor.png" alt="Campaign Monitor" title="Campaign Monitor">' .
1415
- '<div class="question"><b>Campaign Monitor</b></div>' .
1416
- '</div>';
1417
-
1418
- $questions[] = '<div class="question-wrapper" data-value="madmimi">' .
1419
- '<img src="' . UCP_PLUGIN_URL . 'images/surveys/mad_mimi.png" alt="Mad Mimi" title="Mad Mimi">' .
1420
- '<div class="question"><b>Mad Mimi</b></div>' .
1421
- '</div>';
1422
-
1423
- $questions[] = '<div class="question-wrapper" data-value="aweber">' .
1424
- '<img src="' . UCP_PLUGIN_URL . 'images/surveys/aweber.png" alt="Aweber" title="Aweber">' .
1425
- '<div class="question"><b>Aweber</b></div>' .
1426
- '</div>';
1427
-
1428
- shuffle($questions);
1429
- echo implode(' ', $questions);
1430
-
1431
- $current_user = wp_get_current_user();
1432
- echo '<div class="footer">';
1433
- echo '<input id="emailme" type="checkbox" value="' . $current_user->user_email . '"> <label for="emailme">Email me on ' . $current_user->user_email . ' when this feature is added</label><br>';
1434
- echo '<a data-survey="autoresponders" class="submit-survey button-primary button button-large" href="#">Vote for selected service</a>';
1435
- echo '<a href="#" class="dismiss-survey" data-survey="autoresponders"><small><i>Close this survey and never show it again</i></small></a>';
1436
- echo '</div>';
1437
-
1438
- echo '</div>';
1439
  } // options_page
1440
 
1441
 
4
  Plugin URI: https://underconstructionpage.com/
5
  Description: Hide your site behind a great looking under construction page while you do maintenance work.
6
  Author: Web factory Ltd
7
+ Version: 2.40
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
76
  add_filter('plugin_action_links_' . plugin_basename(__FILE__),
77
  array(__CLASS__, 'plugin_action_links'));
78
  add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
79
+ add_filter('admin_footer_text', array(__CLASS__, 'admin_footer_text'));
80
 
81
  // manages admin header notifications
82
  add_action('admin_notices', array(__CLASS__, 'admin_notices'));
258
  $surveys = get_option(UCP_SURVEYS_KEY);
259
  $meta = self::get_meta();
260
 
261
+ // survey is shown min 5min after install
262
+ // all surveys are disabled
263
+ if (false && empty($surveys['autoresponders']) && current_time('timestamp') - $meta['first_install'] > 300) {
264
  $open_survey = true;
265
  } else {
266
  $open_survey = false;
456
  if (!empty($options['social_whatsapp'])) {
457
  $out .= '<a title="WhatsApp" href="whatsapp:' . $options['social_whatsapp'] . '"><i class="fa fa-whatsapp fa-3x"></i></a>';
458
  }
459
+ if (!empty($options['social_telegram'])) {
460
+ $out .= '<a title="Telegram" href="' . $options['social_telegram'] . '"><i class="fa fa-telegram fa-3x"></i></a>';
461
+ }
462
  if (!empty($options['social_email'])) {
463
  $out .= '<a title="Email" href="mailto:' . self::encode_email($options['social_email']) . '"><i class="fa fa-envelope fa-3x"></i></a>';
464
  }
740
 
741
  $wp_admin_bar->add_menu(array(
742
  'parent' => '',
743
+ 'id' => 'under-construction-page',
744
+ 'title' => $main_label,
745
+ 'href' => admin_url('options-general.php?page=ucp'),
746
+ 'meta' => array('class' => $class)
747
  ));
748
  $wp_admin_bar->add_node( array(
749
  'id' => 'ucp-info',
750
  'title' => $status,
751
+ 'href' => false,
752
  'parent'=> 'under-construction-page'
753
  ));
754
  $wp_admin_bar->add_node( array(
755
  'id' => 'ucp-status',
756
  'title' => $action,
757
+ 'href' => $action_url,
758
  'parent'=> 'under-construction-page'
759
  ));
760
  $wp_admin_bar->add_node( array(
761
+ 'id' => 'ucp-settings',
762
+ 'title' => __('Settings', 'under-construction-page'),
763
+ 'href' => admin_url('options-general.php?page=ucp'),
764
+ 'parent' => 'under-construction-page'
765
  ));
766
  } // admin_bar_notice
767
 
797
  } // plugin_meta_links
798
 
799
 
800
+ // additional powered by text in admin footer; only on UCP page
801
+ static function admin_footer_text($text) {
802
+ if (!self::is_plugin_page()) {
803
+ return $text;
804
+ }
805
+
806
+ $text = '<i><a href="https://underconstructionpage.com/" title="Visit UCP\'s site for more info" target="_blank">UnderConstructionPage</a> v' . self::$version . ' by <a href="https://www.webfactoryltd.com/" title="Visit our site to get more great plugins" target="_blank">WebFactory Ltd</a>.</i> '. $text;
807
+
808
+ return $text;
809
+ } // admin_footer_text
810
+
811
+
812
+ // test if we're on plugin's page
813
+ static function is_plugin_page() {
814
+ $current_screen = get_current_screen();
815
+
816
+ if ($current_screen->id == 'settings_page_ucp') {
817
+ return true;
818
+ } else {
819
+ return false;
820
+ }
821
+ } // is_plugin_page
822
+
823
+
824
  // create the admin menu item
825
  static function admin_menu() {
826
  add_options_page('UnderConstruction', 'UnderConstruction', 'manage_options', 'ucp', array(__CLASS__, 'main_page'));
858
  'social_email' => '',
859
  'social_phone' => '',
860
  'social_skype' => '',
861
+ 'social_telegram' => '',
862
  'social_whatsapp' => '',
863
  'login_button' => '1',
864
  'linkback' => '0',
894
  case 'social_tumblr':
895
  case 'social_email':
896
  case 'social_phone':
897
+ case 'social_telegram':
898
  case 'social_whatsapp':
899
  $options[$key] = trim($value);
900
  break;
1175
  echo '</td></tr>';
1176
 
1177
  echo '<tr valign="top">
1178
+ <th scope="row"><label for="social_telegram">Telegram Group, Channel or Account</label></th>
1179
+ <td><input id="social_telegram" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_telegram]" value="' . esc_attr($options['social_telegram']) . '" placeholder="Telegram group, channel or account URL">';
1180
+ echo '<p class="description">Complete URL, with https prefix to Telegram group, channel or account.</p>';
1181
  echo '</td></tr>';
1182
 
1183
  echo '<tr valign="top">
1405
 
1406
  echo '</form>'; // ucp_tabs
1407
  echo '</div>'; // wrap
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1408
  } // options_page
1409
 
1410