Minimal Coming Soon & Maintenance Mode - Version 2.05

Version Description

  • 2019-08-08
  • NotificationX integration
Download this release

Release Info

Developer talextech
Plugin Icon 128x128 Minimal Coming Soon & Maintenance Mode
Version 2.05
Comparing to
See all releases

Code changes from version 2.01 to 2.05

framework/admin/css/admin.css CHANGED
@@ -1407,5 +1407,167 @@ option.mailoptin-promo {
1407
  list-style-position: outside;
1408
  margin-left: 14px;
1409
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1410
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1411
  /* upsell dialog */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1407
  list-style-position: outside;
1408
  margin-left: 14px;
1409
  }
1410
+ /* upsell dialog */
1411
+
1412
+ #support-hero {
1413
+ text-align: center;
1414
+ margin: 40px;
1415
+ padding: 0 70px;
1416
+ }
1417
+
1418
+ #support-hero p {
1419
+ font-size: 25px;
1420
+ line-height: 1.5;
1421
+ font-weight: 400;
1422
+ }
1423
+
1424
+ #support-hero b {
1425
+ font-weight: 800;
1426
+ }
1427
 
1428
+ #support-hero .button {
1429
+ color: #fff;
1430
+ background: #EC414D;
1431
+ padding: 15px 10px;
1432
+ margin: 0px 0 10px 0;
1433
+ text-align: center;
1434
+ display: inline;
1435
+ text-decoration: none;
1436
+ font-weight: 900;
1437
+ font-size: 22px;
1438
+ line-height: 120%;
1439
+ border: none;
1440
+ }
1441
+
1442
+ /* notificationx upsell dialog */
1443
+ .notificationx-upsell-dialog .ui-dialog-titlebar {
1444
+ background: #5614d5;
1445
+ text-align: center;
1446
+ height: 55px;
1447
+ }
1448
+ .notificationx-upsell-dialog .ui-dialog-titlebar img {
1449
+ height: 32px;
1450
+ display: inline-block;
1451
+ margin: 11px 0 0 0;
1452
+ }
1453
+ .notificationx-upsell-dialog .ui-dialog-titlebar-close {
1454
+ color: #fff;
1455
+ height: 55px;
1456
+ }
1457
+ .notificationx-upsell-dialog .ui-dialog-titlebar-close:hover {
1458
+ color: #333;
1459
+ }
1460
+ .notificationx-upsell-dialog .ui-dialog-content {
1461
+ padding: 0;
1462
+ }
1463
+ .notificationx-upsell-dialog .ui-tabs-nav {
1464
+ text-align: center;
1465
+ }
1466
+ .notificationx-upsell-dialog .ui-tabs .upsell-tab {
1467
+ padding: 20px 15px;
1468
+ text-align: center;
1469
+ }
1470
+ .notificationx-upsell-dialog a {
1471
+ color: #333;
1472
+ }
1473
+ .notificationx-upsell-dialog a:hover {
1474
+ color: #000;
1475
+ }
1476
+ option.notificationx-promo {
1477
+ color: #2980b9;
1478
+ }
1479
+ .notificationx-pro-feature {
1480
+ display: inline-block;
1481
+ width: 32%;
1482
+ background: rgba(128, 128, 128, 0.03);
1483
+ margin: 0 5px 20px 5px;
1484
+ padding: 10px;
1485
+ box-sizing: border-box;
1486
+ vertical-align: top;
1487
+ position: relative;
1488
+ border-top: 1px solid #2980b9;
1489
+ }
1490
  /* upsell dialog */
1491
+
1492
+ #notificationx-popup {
1493
+ position: fixed;
1494
+ width: 240px;
1495
+ bottom: 90px;
1496
+ right: 40px;
1497
+ border: 1px solid #d4d4d4;
1498
+ padding: 16px;
1499
+ background: #FFF;
1500
+ display: none;
1501
+ -webkit-box-shadow: 0px 0px 16px 0px rgba(0,0,0,0.25);
1502
+ -moz-box-shadow: 0px 0px 16px 0px rgba(0,0,0,0.25);
1503
+ box-shadow: 0px 0px 16px 0px rgba(0,0,0,0.25);
1504
+ border-radius: 4px;
1505
+ z-index:99999;
1506
+ }
1507
+
1508
+ #notificationx-popup:hover{
1509
+ cursor: pointer;
1510
+ }
1511
+
1512
+ #notificationx-popup img{
1513
+ width:48px;
1514
+ }
1515
+
1516
+ .settings_page_maintenance_mode_options .notificationx-popup-icon {
1517
+ background: #efefff;
1518
+ padding: 6px 4px 0px 4px;
1519
+ width: 48px;
1520
+ float: left;
1521
+ margin-right: 10px;
1522
+ }
1523
+
1524
+ .settings_page_maintenance_mode_options .notificationx-popup-text {
1525
+ float: left;
1526
+ font-weight: bold;
1527
+ }
1528
+
1529
+ .settings_page_maintenance_mode_options .notificationx-popup-title {
1530
+ color: #6138bd;
1531
+ font-size: 18px;
1532
+ font-weight: bold;
1533
+ padding: 5px 0px;
1534
+ }
1535
+
1536
+ .settings_page_maintenance_mode_options .notificationx-popup-stars .dashicons-star-filled {
1537
+ color:#ecac57;
1538
+ font-size: 14px;
1539
+ }
1540
+
1541
+ .settings_page_maintenance_mode_options .notitificationx-popup-desc {
1542
+ width: 100%;
1543
+ display: block;
1544
+ clear: both;
1545
+ padding: 4px 0;
1546
+ }
1547
+
1548
+ .settings_page_maintenance_mode_options .notificationx-popup-close {
1549
+ position: absolute;
1550
+ top: 4px;
1551
+ right: 6px;
1552
+ }
1553
+
1554
+ .settings_page_maintenance_mode_options .notificationx-popup-close .dashicons {
1555
+ font-size: 24px;
1556
+ }
1557
+
1558
+ .settings_page_maintenance_mode_options .notificationx-popup-close:hover {
1559
+ color:#CCC;
1560
+ cursor: pointer;
1561
+ }
1562
+
1563
+ .settings_page_maintenance_mode_options .put-dismiss-notice {
1564
+ display: none;
1565
+ }
1566
+
1567
+
1568
+ .csmm-list {
1569
+ list-style-type: circle;
1570
+ list-style-position: outside;
1571
+ margin-left: 14px;
1572
+ line-height: 150%;
1573
+ }
framework/admin/img/nx-icon.png ADDED
Binary file
framework/admin/img/nx-logo.png ADDED
Binary file
framework/admin/include/classes/class-mailchimp.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
 
3
  /**
4
  * Super-simple, minimum abstraction MailChimp API v2 wrapper
1
  <?php
2
+ if (!defined('WPINC')) {
3
+ die;
4
+ }
5
 
6
  /**
7
  * Super-simple, minimum abstraction MailChimp API v2 wrapper
framework/admin/include/mailoptin.php CHANGED
@@ -1,5 +1,9 @@
1
  <?php
2
 
 
 
 
 
3
  function csmm_mailoptin_settings($signals_csmm_options){
4
  global $wpdb;
5
  if(csmm_is_mailoptin_active()){
@@ -116,15 +120,4 @@ function csmm_install_mailoptin() {
116
  echo '</div>';
117
  } // replace
118
 
119
- function csmm_is_plugin_installed( $slug ) {
120
- if ( ! function_exists( 'get_plugins' ) ) {
121
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
122
- }
123
- $all_plugins = get_plugins();
124
-
125
- if ( !empty( $all_plugins[$slug] ) ) {
126
- return true;
127
- } else {
128
- return false;
129
- }
130
- }
1
  <?php
2
 
3
+ if (!defined('WPINC')) {
4
+ die;
5
+ }
6
+
7
  function csmm_mailoptin_settings($signals_csmm_options){
8
  global $wpdb;
9
  if(csmm_is_mailoptin_active()){
120
  echo '</div>';
121
  } // replace
122
 
123
+
 
 
 
 
 
 
 
 
 
 
 
framework/admin/include/nx.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('WPINC')) {
4
+ die;
5
+ }
6
+
7
+ // check if NotificationX plugin is active
8
+ function csmm_is_notificationx_really_setup_and_active() {
9
+ if (!function_exists('is_plugin_active') || !function_exists('get_plugin_data')) {
10
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
11
+ }
12
+
13
+ if (is_plugin_active('notificationx/notificationx.php') && version_compare(NOTIFICATIONX_VERSION,'1.0.3','>=')) {
14
+ return true;
15
+ } else {
16
+ return false;
17
+ }
18
+ } // is_notificationx_really_setup_and_active
19
+
20
+
21
+ // auto download / install / activate MailOptin plugin
22
+ function csmm_install_notificationx() {
23
+ if (false === current_user_can('administrator')) {
24
+ wp_die('Sorry, you have to be an admin to run this action.');
25
+ }
26
+
27
+ $plugin_slug = 'notificationx/notificationx.php';
28
+ $plugin_zip = 'https://downloads.wordpress.org/plugin/notificationx.latest-stable.zip';
29
+
30
+ @include_once ABSPATH . 'wp-admin/includes/plugin.php';
31
+ @include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
32
+ @include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
33
+ @include_once ABSPATH . 'wp-admin/includes/file.php';
34
+ @include_once ABSPATH . 'wp-admin/includes/misc.php';
35
+ echo '<style>
36
+ body{
37
+ font-family: sans-serif;
38
+ font-size: 14px;
39
+ line-height: 1.5;
40
+ color: #444;
41
+ }
42
+ </style>';
43
+
44
+ echo '<div style="margin: 20px; color:#444;">';
45
+ echo 'If things are not done in a minute <a target="_parent" href="' . admin_url('plugin-install.php?s=notificationx&tab=search&type=term') .'">install the plugin manually via Plugins page</a><br><br>';
46
+ echo 'Starting ...<br><br>';
47
+
48
+ wp_cache_flush();
49
+ $upgrader = new Plugin_Upgrader();
50
+ echo 'Check if NotificationX is already installed ... <br />';
51
+ if (csmm_is_plugin_installed($plugin_slug)) {
52
+ echo 'NotificationX is already installed! <br /><br />Making sure it\'s the latest version.<br />';
53
+ $upgrader->upgrade($plugin_slug);
54
+ $installed = true;
55
+ } else {
56
+ echo 'Installing NotificationX.<br />';
57
+ $installed = $upgrader->install($plugin_zip);
58
+ }
59
+ wp_cache_flush();
60
+
61
+ if (!is_wp_error($installed) && $installed) {
62
+ echo 'Activating NotificationX.<br />';
63
+ $activate = activate_plugin($plugin_slug);
64
+
65
+ if (is_null($activate)) {
66
+ echo 'NotificationX Activated.<br />';
67
+
68
+ echo '<script>setTimeout(function() { top.location = "options-general.php?page=maintenance_mode_options"; }, 1000);</script>';
69
+ echo '<br>If you are not redirected in a few seconds - <a href="options-general.php?page=maintenance_mode_options" target="_parent">click here</a>.';
70
+ }
71
+ } else {
72
+ echo 'Could not install NotificationX. You\'ll have to <a target="_parent" href="' . admin_url('plugin-install.php?s=notificationx&tab=search&type=term') .'">download and install manually</a>.';
73
+ }
74
+
75
+ echo '</div>';
76
+ } // install_notificationx
framework/admin/init.php CHANGED
@@ -8,6 +8,10 @@
8
  * @package Signals_Maintenance_Mode
9
  */
10
 
 
 
 
 
11
  function csmm_add_menu() {
12
  if(current_user_can('manage_options')) {
13
  // Adding to the plugin panel link to the settings menu
@@ -20,13 +24,30 @@ function csmm_add_menu() {
20
  );
21
 
22
  // Loading the JS conditionally
 
23
  add_action( 'load-' . $signals_csmm_menu, 'csmm_load_scripts' );
24
  add_action( 'admin_action_csmm_install_mailoptin', 'csmm_install_mailoptin' );
 
25
  }
26
 
27
  }
28
  add_action( 'admin_menu', 'csmm_add_menu' );
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  function csmm_featured_plugins_tab($args) {
31
  add_filter('plugins_api_result', 'csmm_plugins_api_result', 10, 3);
32
 
@@ -103,7 +124,9 @@ function csmm_admin_scripts() {
103
  'mm_base_url' => CSMM_URL,
104
  'mm_mo_title' => '<img alt="' . __('MailOptin', 'signals') . '" title="' . __('MailOptin', 'signals') . '" src="' . CSMM_URL . '/framework/admin/img/mailoptin-logo-white.png' . '">',
105
  'mm_mo_install_url' => add_query_arg( array('action' => 'csmm_install_mailoptin'), admin_url('admin.php') ),
106
- 'mm_images' => array('ad_themes.png', 'joshua-coleman-1476380-unsplash.jpg', 'joshua-coleman-623077-unsplash.jpg', 'samuel-zeller-379406-unsplash.jpg', 'ad_more-images.png', 'william-daigneault-733670-unsplash.jpg', 'yuriy-bogdanov-428617-unsplash.jpg', 'john-cobb-13961-unsplash.jpg', 'aaron-burden-189321-unsplash.jpg', 'alberto-restifo-4510-unsplash.jpg', 'amy-humphries-227515-unsplash.jpg', 'anders-jilden-89745-unsplash.jpg', 'art-by-lonfeldt-1064207-unsplash.jpg', 'brenda-godinez-229718-unsplash.jpg', 'ad_more-images.png', 'brooke-lark-229136-unsplash.jpg', 'carmine-de-fazio-31543-unsplash.jpg', 'denys-nevozhai-100695-unsplash.jpg', 'dustin-lee-19667-unsplash.jpg', 'elena-prokofyeva-17909-unsplash.jpg', 'fezbot2000-278419-unsplash.jpg', 'glenn-carstens-peters-190592-unsplash.jpg', 'greg-rakozy-38802-unsplash.jpg', 'henry-be-99471-unsplash.jpg', 'hoach-le-dinh-91879-unsplash.jpg', 'ian-dooley-280928-unsplash.jpg', 'ian-schneider-108618-unsplash.jpg', 'jakub-sejkora-42069-unsplash.jpg', 'jesus-kiteque-224069-unsplash.jpg', 'joanna-kosinska-44214-unsplash.jpg', 'jonathan-bean-37632-unsplash.jpg', 'ad_themes.png', 'kimon-maritz-193428-unsplash.jpg', 'matthew-henry-49707-unsplash.jpg', 'ng-32703-unsplash.jpg', 'nitish-meena-37745-unsplash.jpg', 'osman-rana-1064081-unsplash.jpg', 'patrick-tomasso-208114-unsplash.jpg', 'patrick-tomasso-71909-unsplash.jpg', 'pawel-czerwinski-1060762-unsplash.jpg', 'rachael-gorjestani-282049-unsplash.jpg', 'rawpixel-191102-unsplash.jpg', 'sarah-dorweiler-211779-unsplash.jpg', 'stefan-stefancik-105374-unsplash.jpg', 'steven-wei-124690-unsplash.jpg', 'sunrise-1756274.jpg', 'teddy-kelley-106391-unsplash.jpg', 'thought-catalog-214785-unsplash.jpg', 'ad_custom-image.png', 'brooke-lark-356767-unsplash.jpg', 'ian-dooley-280928-unsplash.jpg', 'jeremy-bishop-334996-unsplash.jpg', 'martin-reisch-185835-unsplash.jpg', 'simon-matzinger-320332-unsplash.jpg', 'trevor-cole-393228-unsplash.jpg', 'verne-ho-237626-unsplash.jpg', 'ad_more-images.png','annie-spratt-1369965-unsplash.jpg', 'jonathan-borba-1339221-unsplash.jpg', 'lana-guillemet-1373193-unsplash.jpg', 'nazar-sharafutdinov-1373782-unsplash.jpg', 'pawel-czerwinski-1373010-unsplash.jpg', 'fancycrave-284224-unsplash.jpg', 'joshua-coleman-1394520-unsplash.jpg', 'robert-bye-103196-unsplash.jpg', 'tim-patch-1020411-unsplash.jpg', 'william-daigneault-691488-unsplash.jpg')
 
 
107
  );
108
  wp_localize_script( 'csmm-admin-base', 'mm_js_vars', $mm_js_vars );
109
 
8
  * @package Signals_Maintenance_Mode
9
  */
10
 
11
+ if (!defined('WPINC')) {
12
+ die;
13
+ }
14
+
15
  function csmm_add_menu() {
16
  if(current_user_can('manage_options')) {
17
  // Adding to the plugin panel link to the settings menu
24
  );
25
 
26
  // Loading the JS conditionally
27
+ delete_transient('_nx_meta_activation_notice');
28
  add_action( 'load-' . $signals_csmm_menu, 'csmm_load_scripts' );
29
  add_action( 'admin_action_csmm_install_mailoptin', 'csmm_install_mailoptin' );
30
+ add_action( 'admin_action_install_notificationx', 'csmm_install_notificationx');
31
  }
32
 
33
  }
34
  add_action( 'admin_menu', 'csmm_add_menu' );
35
 
36
+
37
+ function csmm_is_plugin_installed( $slug ) {
38
+ if ( ! function_exists( 'get_plugins' ) ) {
39
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
40
+ }
41
+ $all_plugins = get_plugins();
42
+
43
+ if ( !empty( $all_plugins[$slug] ) ) {
44
+ return true;
45
+ } else {
46
+ return false;
47
+ }
48
+ }
49
+
50
+
51
  function csmm_featured_plugins_tab($args) {
52
  add_filter('plugins_api_result', 'csmm_plugins_api_result', 10, 3);
53
 
124
  'mm_base_url' => CSMM_URL,
125
  'mm_mo_title' => '<img alt="' . __('MailOptin', 'signals') . '" title="' . __('MailOptin', 'signals') . '" src="' . CSMM_URL . '/framework/admin/img/mailoptin-logo-white.png' . '">',
126
  'mm_mo_install_url' => add_query_arg( array('action' => 'csmm_install_mailoptin'), admin_url('admin.php') ),
127
+ 'mm_images' => array('ad_themes.png', 'joshua-coleman-1476380-unsplash.jpg', 'joshua-coleman-623077-unsplash.jpg', 'samuel-zeller-379406-unsplash.jpg', 'ad_more-images.png', 'william-daigneault-733670-unsplash.jpg', 'yuriy-bogdanov-428617-unsplash.jpg', 'john-cobb-13961-unsplash.jpg', 'aaron-burden-189321-unsplash.jpg', 'alberto-restifo-4510-unsplash.jpg', 'amy-humphries-227515-unsplash.jpg', 'anders-jilden-89745-unsplash.jpg', 'art-by-lonfeldt-1064207-unsplash.jpg', 'brenda-godinez-229718-unsplash.jpg', 'ad_more-images.png', 'brooke-lark-229136-unsplash.jpg', 'carmine-de-fazio-31543-unsplash.jpg', 'denys-nevozhai-100695-unsplash.jpg', 'dustin-lee-19667-unsplash.jpg', 'elena-prokofyeva-17909-unsplash.jpg', 'fezbot2000-278419-unsplash.jpg', 'glenn-carstens-peters-190592-unsplash.jpg', 'greg-rakozy-38802-unsplash.jpg', 'henry-be-99471-unsplash.jpg', 'hoach-le-dinh-91879-unsplash.jpg', 'ian-dooley-280928-unsplash.jpg', 'ian-schneider-108618-unsplash.jpg', 'jakub-sejkora-42069-unsplash.jpg', 'jesus-kiteque-224069-unsplash.jpg', 'joanna-kosinska-44214-unsplash.jpg', 'jonathan-bean-37632-unsplash.jpg', 'ad_themes.png', 'kimon-maritz-193428-unsplash.jpg', 'matthew-henry-49707-unsplash.jpg', 'ng-32703-unsplash.jpg', 'nitish-meena-37745-unsplash.jpg', 'osman-rana-1064081-unsplash.jpg', 'patrick-tomasso-208114-unsplash.jpg', 'patrick-tomasso-71909-unsplash.jpg', 'pawel-czerwinski-1060762-unsplash.jpg', 'rachael-gorjestani-282049-unsplash.jpg', 'rawpixel-191102-unsplash.jpg', 'sarah-dorweiler-211779-unsplash.jpg', 'stefan-stefancik-105374-unsplash.jpg', 'steven-wei-124690-unsplash.jpg', 'sunrise-1756274.jpg', 'teddy-kelley-106391-unsplash.jpg', 'thought-catalog-214785-unsplash.jpg', 'ad_custom-image.png', 'brooke-lark-356767-unsplash.jpg', 'ian-dooley-280928-unsplash.jpg', 'jeremy-bishop-334996-unsplash.jpg', 'martin-reisch-185835-unsplash.jpg', 'simon-matzinger-320332-unsplash.jpg', 'trevor-cole-393228-unsplash.jpg', 'verne-ho-237626-unsplash.jpg', 'ad_more-images.png','annie-spratt-1369965-unsplash.jpg', 'jonathan-borba-1339221-unsplash.jpg', 'lana-guillemet-1373193-unsplash.jpg', 'nazar-sharafutdinov-1373782-unsplash.jpg', 'pawel-czerwinski-1373010-unsplash.jpg', 'fancycrave-284224-unsplash.jpg', 'joshua-coleman-1394520-unsplash.jpg', 'robert-bye-103196-unsplash.jpg', 'tim-patch-1020411-unsplash.jpg', 'william-daigneault-691488-unsplash.jpg'),
128
+ 'notificationx_dialog_upsell_title' => '<img alt="' . __('NotificationX', 'option-tree') . '" title="' . __('NotificationX', 'option-tree') . '" src="' . CSMM_URL . '/framework/admin/img/nx-logo.png' . '">',
129
+ 'notificationx_install_url' => add_query_arg(array('action' => 'install_notificationx'), admin_url('admin.php')),
130
  );
131
  wp_localize_script( 'csmm-admin-base', 'mm_js_vars', $mm_js_vars );
132
 
framework/admin/js/admin.js CHANGED
@@ -169,6 +169,67 @@ function getMMUploader($text, $target) {
169
  // on dom ready
170
  $( document ).ready( function() {
171
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  // hide nags from other plugins
173
  $('#wpbody-content .notice-warning, #wpbody-content .update-nag, #wpbody-content .notice-error, #wpbody-content .notice-info, #wpbody-content .error, #wpbody-content .updated').hide();
174
 
169
  // on dom ready
170
  $( document ).ready( function() {
171
 
172
+ csmm_nx = $.cookie('csmm_nx');
173
+ if(csmm_nx != 'closed'){
174
+ $('#notificationx-popup').delay(2000).slideDown(500);
175
+ }
176
+
177
+ $('.settings_page_maintenance_mode_options').on('click','.notificationx-popup-close',function(e){
178
+ e.stopPropagation();
179
+ $('#notificationx-popup').hide();
180
+ $.cookie('csmm_nx', 'closed', { expires: 700 });
181
+ });
182
+
183
+ $('.settings_page_maintenance_mode_options').on('click', '#notificationx-popup', function(e) {
184
+ e.preventDefault();
185
+
186
+ $(this).blur();
187
+
188
+ $('#notificationx-upsell-dialog').dialog('open');
189
+
190
+ return false;
191
+ });
192
+
193
+ // upsell dialog init
194
+ $('#notificationx-upsell-dialog').dialog({'dialogClass': 'wp-dialog notificationx-upsell-dialog',
195
+ 'modal': 1,
196
+ 'resizable': false,
197
+ 'title': 'Display notification bars',
198
+ 'zIndex': 9999,
199
+ 'width': 550,
200
+ 'height': 'auto',
201
+ 'show': 'fade',
202
+ 'hide': 'fade',
203
+ 'open': function(event, ui) {
204
+ csmm_fix_dialog_close(event, ui);
205
+ $(this).siblings().find('span.ui-dialog-title').html(mm_js_vars.notificationx_dialog_upsell_title);
206
+ },
207
+ 'close': function(event, ui) { },
208
+ 'autoOpen': false,
209
+ 'closeOnEscape': true
210
+ });
211
+ $(window).resize(function(e) {
212
+ $('#notificationx-upsell-dialog').dialog("option", "position", {my: "center", at: "center", of: window});
213
+ });
214
+
215
+ jQuery('#install-notificationx').on('click',function(e) {
216
+ $('#notificationx-upsell-dialog').dialog('close');
217
+ jQuery('body').append('<div style="width:550px;height:450px; position:fixed;top:10%;left:50%;margin-left:-275px; color:#444; background-color: #fbfbfb;border:1px solid #DDD; border-radius:4px;box-shadow: 0px 0px 0px 4000px rgba(0, 0, 0, 0.85);z-index: 9999999;"><iframe src="' + mm_js_vars.notificationx_install_url + '" style="width:100%;height:100%;border:none;" /></div>');
218
+ jQuery('#wpwrap').css('pointer-events', 'none');
219
+ e.preventDefault();
220
+ return false;
221
+ });
222
+
223
+ $('.settings_page_maintenance_mode_options').on('click', '.open-notificationx-upsell', function(e) {
224
+ e.preventDefault();
225
+
226
+ $(this).blur();
227
+
228
+ $('#notificationx-upsell-dialog').dialog('open');
229
+
230
+ return false;
231
+ });
232
+
233
  // hide nags from other plugins
234
  $('#wpbody-content .notice-warning, #wpbody-content .update-nag, #wpbody-content .notice-error, #wpbody-content .notice-info, #wpbody-content .error, #wpbody-content .updated').hide();
235
 
framework/admin/license.php CHANGED
@@ -5,6 +5,10 @@
5
  * (c) WebFactory Ltd, 2016 - 2019
6
  */
7
 
 
 
 
 
8
  class csmm_license {
9
  static $licensing_servers = array('https://license1.comingsoonwp.com/', 'https://license2.comingsoonwp.com/');
10
 
5
  * (c) WebFactory Ltd, 2016 - 2019
6
  */
7
 
8
+ if (!defined('WPINC')) {
9
+ die;
10
+ }
11
+
12
  class csmm_license {
13
  static $licensing_servers = array('https://license1.comingsoonwp.com/', 'https://license2.comingsoonwp.com/');
14
 
framework/admin/preview.php CHANGED
@@ -18,6 +18,8 @@ if (empty($tmp[0])) {
18
  // Include important files
19
  require_once '../public/include/functions.php';
20
 
 
 
21
 
22
  // Plugin options from the database
23
  $signals_csmm_options = csmm_get_options();
18
  // Include important files
19
  require_once '../public/include/functions.php';
20
 
21
+ wp_footer();
22
+
23
 
24
  // Plugin options from the database
25
  $signals_csmm_options = csmm_get_options();
framework/admin/settings.php CHANGED
@@ -7,6 +7,10 @@
7
  * @since 0.1
8
  */
9
 
 
 
 
 
10
  function csmm_admin_settings() {
11
 
12
  // Including the mailchimp class
@@ -31,7 +35,7 @@ function csmm_admin_settings() {
31
  $options['license_type'] = $tmp['license_type'];
32
  $options['license_expires'] = $tmp['license_expires'];
33
  $options['license_active'] = $tmp['license_active'];
34
- $options['license_key'] = $_POST['license_key'];
35
  if ($tmp['license_active']) {
36
  set_transient('csmm_error_msg', '<div class="signals-alert signals-alert-info"><strong>License key saved and activated!</strong><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>', 1);
37
  set_site_transient('update_plugins', null);
@@ -107,27 +111,27 @@ function csmm_admin_settings() {
107
  $tmp_options['disabled'] = '2';
108
  endif;
109
 
110
- // Checking whether the disable status bar menu option is checked or not
111
- if ( isset( $_POST['signals_csmm_disable_adminbar'] ) ) :
112
- $tmp_options['disable_adminbar'] = '1';
113
- else :
114
- $tmp_options['disable_adminbar'] = '0';
115
- endif;
116
 
117
- // Checking whether the show login button option is checked or not
118
- if ( isset( $_POST['signals_csmm_showloginbutton'] ) ) :
119
- $tmp_options['show_login_button'] = '1';
120
- else :
121
- $tmp_options['show_login_button'] = '0';
122
- endif;
123
 
124
 
125
  // Saving the record to the database
126
  $update_options = array(
127
- 'settings_customized' => true,
128
- 'status' => $tmp_options['status'],
129
- 'love' => $tmp_options['love'],
130
- 'title' => strip_tags( $_POST['signals_csmm_title'] ),
131
  'description' => strip_tags( $_POST['signals_csmm_description'] ),
132
  'header_text' => strip_tags( $_POST['signals_csmm_header'] ),
133
  'secondary_text' => strip_tags( $_POST['signals_csmm_secondary'], '<p><a><b><strong><i><br>' ),
@@ -137,11 +141,11 @@ function csmm_admin_settings() {
137
  'show_login_button' => $tmp_options['show_login_button'],
138
  'exclude_se' => $tmp_options['exclude_se'],
139
  'arrange' => strip_tags( $_POST['signals_csmm_arrange'] ),
140
- 'analytics' => $_POST['signals_csmm_analytics'],
141
-
142
- 'mail_system_to_use' => $_POST['mail_system_to_use'],
143
- 'mailoptin_campaign' => @$_POST['signals_csmm_mailoptin_campaign'],
144
 
 
 
 
145
  'mailchimp_api' => strip_tags( $_POST['signals_csmm_api'] ),
146
  'mailchimp_list' => $tmp_options['list'],
147
  'message_noemail' => strip_tags( $_POST['signals_csmm_message_noemail'] ),
@@ -192,7 +196,7 @@ function csmm_admin_settings() {
192
  'disable_settings' => $tmp_options['disabled'],
193
  'disable_adminbar' => $tmp_options['disable_adminbar'],
194
  'custom_html' => $_POST['signals_csmm_html'], // Not sanitizing the HTML and CSS provided by the admin
195
- 'custom_css' => $_POST['signals_csmm_css'] // Giving full freedom to them :)
196
  );
197
 
198
  $update_options = stripslashes_deep($update_options);
@@ -245,44 +249,6 @@ function csmm_ajax_support() {
245
  );
246
 
247
 
248
- // Filtering and sanitizing the support issue
249
- if ( ! empty( $_POST['signals_support_email'] ) && ! empty( $_POST['signals_support_issue'] ) ) {
250
- $theme = wp_get_theme();
251
- $admin_email = sanitize_text_field( $_POST['signals_support_email'] );
252
- $issue = $_POST['signals_support_issue'];
253
- $options = get_option('signals_csmm_options');
254
-
255
- $subject = '[Maintenance Mode Ticket] by '. $admin_email;
256
- $body = "Email: $admin_email \r\nIssue: $issue";
257
- $headers = 'From: ' . $admin_email . "\r\n" . 'Reply-To: ' . $admin_email;
258
-
259
- $body .= "\r\n\r\nSite details:\r\n";
260
- $body .= ' WordPress version: ' . get_bloginfo('version') . "\r\n";
261
- $body .= ' MM version: ' . csmm_get_plugin_version() . "\r\n";
262
- $body .= ' PHP version: ' . PHP_VERSION . "\r\n";
263
- $body .= ' Site URL: ' . get_bloginfo('url') . "\r\n";
264
- $body .= ' WordPress URL: ' . get_bloginfo('wpurl') . "\r\n";
265
- $body .= ' Theme: ' . $theme->get('Name') . ' v' . $theme->get('Version') . "\r\n";
266
- $body .= ' Options: ' . "\r\n" . serialize($options) . "\r\n";
267
-
268
-
269
- // Sending the mail to the support email
270
- if ( true === wp_mail( 'support@webfactoryltd.com', $subject, $body, $headers ) ) {
271
- // Sending the success response
272
- $response = array(
273
- 'code' => 'success',
274
- 'response' => __( 'We have received your support ticket and will get back to you shortly!', 'signals' )
275
- );
276
- } else {
277
- // Sending the failure response
278
- $response = array(
279
- 'code' => 'error',
280
- 'response' => __( 'There was an error creating the support ticket. You can try again later or send us an email directly to <strong>support@webfactoryltd.com</strong>', 'signals' )
281
- );
282
- }
283
- }
284
-
285
-
286
  // Sending proper headers and sending the response back in the JSON format
287
  header( "Content-Type: application/json" );
288
  echo json_encode( $response );
7
  * @since 0.1
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
  function csmm_admin_settings() {
15
 
16
  // Including the mailchimp class
35
  $options['license_type'] = $tmp['license_type'];
36
  $options['license_expires'] = $tmp['license_expires'];
37
  $options['license_active'] = $tmp['license_active'];
38
+ $options['license_key'] = sanitize_html_class($_POST['license_key']);
39
  if ($tmp['license_active']) {
40
  set_transient('csmm_error_msg', '<div class="signals-alert signals-alert-info"><strong>License key saved and activated!</strong><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>', 1);
41
  set_site_transient('update_plugins', null);
111
  $tmp_options['disabled'] = '2';
112
  endif;
113
 
114
+ // Checking whether the disable status bar menu option is checked or not
115
+ if ( isset( $_POST['signals_csmm_disable_adminbar'] ) ) :
116
+ $tmp_options['disable_adminbar'] = '1';
117
+ else :
118
+ $tmp_options['disable_adminbar'] = '0';
119
+ endif;
120
 
121
+ // Checking whether the show login button option is checked or not
122
+ if ( isset( $_POST['signals_csmm_showloginbutton'] ) ) :
123
+ $tmp_options['show_login_button'] = '1';
124
+ else :
125
+ $tmp_options['show_login_button'] = '0';
126
+ endif;
127
 
128
 
129
  // Saving the record to the database
130
  $update_options = array(
131
+ 'settings_customized' => true,
132
+ 'status' => $tmp_options['status'],
133
+ 'love' => $tmp_options['love'],
134
+ 'title' => strip_tags( $_POST['signals_csmm_title'] ),
135
  'description' => strip_tags( $_POST['signals_csmm_description'] ),
136
  'header_text' => strip_tags( $_POST['signals_csmm_header'] ),
137
  'secondary_text' => strip_tags( $_POST['signals_csmm_secondary'], '<p><a><b><strong><i><br>' ),
141
  'show_login_button' => $tmp_options['show_login_button'],
142
  'exclude_se' => $tmp_options['exclude_se'],
143
  'arrange' => strip_tags( $_POST['signals_csmm_arrange'] ),
144
+ 'analytics' => sanitize_html_class($_POST['signals_csmm_analytics']),
 
 
 
145
 
146
+ 'mail_system_to_use' => sanitize_html_class($_POST['mail_system_to_use']),
147
+ 'mailoptin_campaign' => strip_tags(@$_POST['signals_csmm_mailoptin_campaign']),
148
+ 'notificationx_notification' => strip_tags(@$_POST['signals_csmm_notificationx_notification']),
149
  'mailchimp_api' => strip_tags( $_POST['signals_csmm_api'] ),
150
  'mailchimp_list' => $tmp_options['list'],
151
  'message_noemail' => strip_tags( $_POST['signals_csmm_message_noemail'] ),
196
  'disable_settings' => $tmp_options['disabled'],
197
  'disable_adminbar' => $tmp_options['disable_adminbar'],
198
  'custom_html' => $_POST['signals_csmm_html'], // Not sanitizing the HTML and CSS provided by the admin
199
+ 'custom_css' => $_POST['signals_csmm_css'] // again, not sanitized Giving full freedom to them :)
200
  );
201
 
202
  $update_options = stripslashes_deep($update_options);
249
  );
250
 
251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  // Sending proper headers and sending the response back in the JSON format
253
  header( "Content-Type: application/json" );
254
  echo json_encode( $response );
framework/admin/views/footer.php CHANGED
@@ -7,6 +7,10 @@
7
  * @since 0.1
8
  */
9
 
 
 
 
 
10
  ?>
11
 
12
  </div><!-- .signals-fix-wp38 -->
7
  * @since 0.1
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
  ?>
15
 
16
  </div><!-- .signals-fix-wp38 -->
framework/admin/views/header.php CHANGED
@@ -7,6 +7,36 @@
7
  * @since 0.1
8
  */
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ?>
11
 
12
  <div class="signals-cnt-fix">
7
  * @since 0.1
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
+ if (!csmm_is_notificationx_really_setup_and_active()) {
15
+ echo '<div id="notificationx-popup" style="display: none;">
16
+ <div class="notificationx-popup-icon"><img alt="Notification X" src="' . CSMM_URL . '/framework/admin/img/nx-icon.png' . '"></div>
17
+ <div class="notificationx-popup-text">435 people rated <br />
18
+ <div class="notificationx-popup-title">Notification X</div>
19
+ <div class="notificationx-popup-stars"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></div>
20
+ </div>
21
+ <div class="notitificationx-popup-desc">Put a notification like this on your page to instantly influence your visitors</div>
22
+ <div class="notificationx-popup-close"><span title="Close" class="dashicons dashicons-no"></span></div>
23
+ </div>';
24
+ }
25
+
26
+ // notificationx install dialog
27
+ echo '<div id="notificationx-upsell-dialog" style="display: none;" title="NotificationX"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
28
+ echo '<div style="padding: 20px; font-size: 14px;">';
29
+ echo '<ul class="csmm-list">';
30
+ echo '<li>influence your visitors’ actions using social proof notifications';
31
+ echo '<li>increase your leads, sales & engagements';
32
+ echo '<li>boost conversion rates using 4 different types of notification';
33
+ echo '<li>works out-of-the-box';
34
+ echo '<li>free plugin available from the official WordPress repository';
35
+ echo '</ul>';
36
+ echo '<p class="upsell-footer"><a class="button button-primary" id="install-notificationx">Install &amp; activate NotificationX to display notification bars</a></p>';
37
+ echo '</div>';
38
+ echo '</div>';
39
+
40
  ?>
41
 
42
  <div class="signals-cnt-fix">
framework/admin/views/settings-advanced.php CHANGED
@@ -7,6 +7,10 @@
7
  * @since 1.0
8
  */
9
 
 
 
 
 
10
  ?>
11
 
12
  <div class="signals-tile" id="advanced">
7
  * @since 1.0
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
  ?>
15
 
16
  <div class="signals-tile" id="advanced">
framework/admin/views/settings-basic.php CHANGED
@@ -7,6 +7,10 @@
7
  * @since 1.0
8
  */
9
 
 
 
 
 
10
  ?>
11
 
12
  <div class="signals-tile" id="basic">
@@ -86,6 +90,55 @@
86
 
87
  <p class="signals-form-help-block"><?php _e( 'Show a discrete link to the login form, or WP admin if you\'re logged in, in the lower right corner of the page.', 'signals' ); ?></p>
88
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  </div>
90
 
91
  <div class="signals-form-group signals-clearfix">
7
  * @since 1.0
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
  ?>
15
 
16
  <div class="signals-tile" id="basic">
90
 
91
  <p class="signals-form-help-block"><?php _e( 'Show a discrete link to the login form, or WP admin if you\'re logged in, in the lower right corner of the page.', 'signals' ); ?></p>
92
  </div>
93
+
94
+ <div class="signals-form-group">
95
+ <?php
96
+ if (csmm_is_notificationx_really_setup_and_active()) {
97
+ $nx_args = array (
98
+ 'post_type' => array( 'notificationx' ),
99
+ 'post_status' => array( 'publish' ),
100
+ 'nopaging' => true,
101
+ 'order' => 'ASC',
102
+ );
103
+ $nx_notifications = get_posts( $nx_args );
104
+ $nx_notifications_dd = array();
105
+
106
+ if(count($nx_notifications)>0){
107
+ foreach($nx_notifications as $nx_notification){
108
+ $nx_notifications_dd[] = array('val' => $nx_notification->ID, 'label' => strlen($nx_notification->post_title)?$nx_notification->post_title:'NotificationX '.$nx_notification->ID.' (no title)');
109
+ }
110
+ } else {
111
+ $nx_notifications_dd = false;
112
+ }
113
+ ?>
114
+ <label for="signals_csmm_notificationx_notification" class="signals-strong"><?php _e( 'Notifications', 'signals' ); ?></label>
115
+ <select name="signals_csmm_notificationx_notification" id="signals_csmm_notificationx_notification">
116
+ <option value="0">none</option>
117
+ <?php
118
+
119
+ if(is_array($nx_notifications_dd) && count($nx_notifications_dd)>0){
120
+ foreach($nx_notifications_dd as $nx_notification){
121
+ echo '<option value="' . $nx_notification['val'] . '"' . ( $signals_csmm_options['notificationx_notification'] == $nx_notification['val']?'selected':'' ) . '>' . $nx_notification['label'] . '</option>';
122
+ }
123
+ }
124
+ ?>
125
+ <option value="all" <?php echo ($signals_csmm_options['notificationx_notification'] == 'all'?'selected':''); ?> >Show all</option>
126
+ </select>
127
+
128
+ <p class="signals-form-help-block">Create, edit and manage notifications on the <a href="<?php echo admin_url('admin.php?page=nx-admin'); ?>">NotificationX page</a>.</p>
129
+
130
+ <?php } else { ?>
131
+ <label for="signals_csmm_notificationx_show" class="signals-strong open-notificationx-upsell"><?php _e( 'Notification Bar', 'signals' ); ?></label>
132
+ <div class="open-notificationx-upsell"><input id="signals_csmm_notificationx_show" type="checkbox" class="signals-form-ios" disabled name="signals_csmm_notificationx_show" value="0" /></div>
133
+
134
+ <p class="signals-form-help-block">Add notifications to instantly engage and influence your visitors' actions using social proof.</p>
135
+ <p class="signals-form-help-block">To add notifications <a href="#" class="open-notificationx-upsell">install the free NotificationX plugin</a>. It seamlessly integrates with Coming Soon and offers numerous options.</p>
136
+ <?php
137
+ } // notificationx not active
138
+ ?>
139
+ </div>
140
+
141
+
142
  </div>
143
 
144
  <div class="signals-form-group signals-clearfix">
framework/admin/views/settings-design.php CHANGED
@@ -7,6 +7,10 @@
7
  * @since 1.0
8
  */
9
 
 
 
 
 
10
  ?>
11
 
12
  <div class="signals-tile" id="design">
7
  * @since 1.0
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
  ?>
15
 
16
  <div class="signals-tile" id="design">
framework/admin/views/settings-email.php CHANGED
@@ -7,6 +7,11 @@
7
  * @since 1.0
8
  */
9
 
 
 
 
 
 
10
  if (!isset($signals_csmm_options['mail_system_to_use'])) {
11
  $signals_csmm_options['mail_system_to_use'] = 'mc';
12
  }
7
  * @since 1.0
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
+
15
  if (!isset($signals_csmm_options['mail_system_to_use'])) {
16
  $signals_csmm_options['mail_system_to_use'] = 'mc';
17
  }
framework/admin/views/settings-form.php CHANGED
@@ -7,6 +7,10 @@
7
  * @since 1.0
8
  */
9
 
 
 
 
 
10
  ?>
11
 
12
  <div class="signals-tile" id="form">
7
  * @since 1.0
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
  ?>
15
 
16
  <div class="signals-tile" id="form">
framework/admin/views/settings-pro.php CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  <div class="signals-tile" id="pro">
2
  <div class="signals-tile-body">
3
  <div class="signals-tile-title">Coming Soon &amp; Maintenance Mode PRO - Save time &amp; money when building pages</div>
1
+ <?php
2
+
3
+ if (!defined('WPINC')) {
4
+ die;
5
+ }
6
+
7
+ ?>
8
+
9
  <div class="signals-tile" id="pro">
10
  <div class="signals-tile-body">
11
  <div class="signals-tile-title">Coming Soon &amp; Maintenance Mode PRO - Save time &amp; money when building pages</div>
framework/admin/views/settings-seo.php CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  <div class="signals-tile" id="seo">
2
  <div class="signals-tile-body">
3
  <div class="signals-tile-title">SEO</div>
1
+ <?php
2
+
3
+ if (!defined('WPINC')) {
4
+ die;
5
+ }
6
+
7
+ ?>
8
+
9
  <div class="signals-tile" id="seo">
10
  <div class="signals-tile-body">
11
  <div class="signals-tile-title">SEO</div>
framework/admin/views/settings-support.php CHANGED
@@ -7,6 +7,10 @@
7
  * @since 1.0
8
  */
9
 
 
 
 
 
10
  ?>
11
 
12
  <div class="signals-tile" id="support">
7
  * @since 1.0
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
  ?>
15
 
16
  <div class="signals-tile" id="support">
framework/admin/views/settings-themes.php CHANGED
@@ -1,7 +1,10 @@
1
  <?php
2
- $themes =
3
 
 
 
 
4
 
 
5
  array (
6
  0 =>
7
  array (
1
  <?php
 
2
 
3
+ if (!defined('WPINC')) {
4
+ die;
5
+ }
6
 
7
+ $themes =
8
  array (
9
  0 =>
10
  array (
framework/admin/views/settings.php CHANGED
@@ -8,6 +8,10 @@
8
  * @package Signals_Maintenance_Mode
9
  */
10
 
 
 
 
 
11
  require_once 'header.php';
12
 
13
  ?>
8
  * @package Signals_Maintenance_Mode
9
  */
10
 
11
+ if (!defined('WPINC')) {
12
+ die;
13
+ }
14
+
15
  require_once 'header.php';
16
 
17
  ?>
framework/init.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
 
3
  class CSMM {
4
  static function init() {
1
  <?php
2
+ if (!defined('WPINC')) {
3
+ die;
4
+ }
5
 
6
  class CSMM {
7
  static function init() {
framework/public/include/functions.php CHANGED
@@ -7,10 +7,36 @@
7
  * @since 1.0
8
  */
9
 
 
 
 
 
10
  function csmm_render_template( $options ) {
11
- if (ob_get_length() > 0 ) {
12
- ob_end_clean();
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  /**
16
  * Using the nocache_headers() to ensure that different nocache headers are sent to different browsers.
@@ -112,6 +138,10 @@ function csmm_check_referrer() {
112
 
113
  }
114
 
 
 
 
 
115
 
116
  // Function to match the user agent with the crawlers array
117
  function csmm_string_to_array( $str, $array ) {
7
  * @since 1.0
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
  function csmm_render_template( $options ) {
15
+
16
+ if(csmm_is_notificationx_really_setup_and_active()){
17
+ libxml_use_internal_errors(true);
18
+ $doc = new DOMDocument();
19
+ $doc->loadHTML('<?xml encoding="UTF-8">' . ob_get_clean());
20
+ $selector = new DOMXPath($doc);
21
+ $notificationx_notification = $options['notificationx_notification'];
22
+ if($notificationx_notification == 'all'){
23
+ $nx_query = 'nx-bar-';
24
+ } else if($notificationx_notification>0){
25
+ $nx_query = 'nx-bar-'.$notificationx_notification;
26
+ } else {
27
+ $nx_query = false;
28
+ }
29
+
30
+ if($nx_query !== false){
31
+ $nodes = $selector->query('//*[starts-with(@id, "'.$nx_query.'")]');
32
+ $nx_bar_html = array();
33
+ foreach($nodes as $node){
34
+ $nx_bar_html[] = $node->ownerDocument->saveHTML($node);
35
+ }
36
+ }
37
+ } else if (ob_get_length() > 0 ) {
38
+ ob_end_clean();
39
+ }
40
 
41
  /**
42
  * Using the nocache_headers() to ensure that different nocache headers are sent to different browsers.
138
 
139
  }
140
 
141
+ function csmm_render_template_x(){
142
+ $signals_csmm_options = csmm_get_options();
143
+ csmm_render_template( $signals_csmm_options );
144
+ }
145
 
146
  // Function to match the user agent with the crawlers array
147
  function csmm_string_to_array( $str, $array ) {
framework/public/include/styles.php CHANGED
@@ -7,6 +7,10 @@
7
  * @since 1.0
8
  */
9
 
 
 
 
 
10
  echo '<style>' . "\r\n";
11
 
12
  // Background cover
7
  * @since 1.0
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
+
14
  echo '<style>' . "\r\n";
15
 
16
  // Background cover
framework/public/init.php CHANGED
@@ -75,12 +75,23 @@ function csmm_plugin_init() {
75
  if ( '1' == $signals_csmm_options['show_logged_in'] ) {
76
  // Checking if the user is logged in or not
77
  if ( ! is_user_logged_in() ) {
78
- // Render the maintenance mode template since the user is not logged in
79
- csmm_render_template( $signals_csmm_options );
 
 
 
 
 
 
80
  }
81
  } else {
82
  // Render the maintenance mode template
83
- csmm_render_template( $signals_csmm_options );
 
 
 
 
 
84
  }
85
  }
86
  } else {
@@ -88,11 +99,21 @@ function csmm_plugin_init() {
88
  // Checking if the user is logged in or not
89
  if ( ! is_user_logged_in() ) {
90
  // Render the maintenance mode template since the user is not logged in
91
- csmm_render_template( $signals_csmm_options );
 
 
 
 
 
92
  }
93
  } else {
94
  // Render the maintenance mode template.
95
- csmm_render_template( $signals_csmm_options );
 
 
 
 
 
96
  }
97
  }
98
  }
@@ -101,6 +122,9 @@ function csmm_plugin_init() {
101
  }
102
  add_action( 'init', 'csmm_plugin_init' );
103
 
 
 
 
104
  function csmm_subscribe_hide() {
105
  set_transient('csmm_subscribe_hide', true, DAY_IN_SECONDS * 90);
106
 
75
  if ( '1' == $signals_csmm_options['show_logged_in'] ) {
76
  // Checking if the user is logged in or not
77
  if ( ! is_user_logged_in() ) {
78
+ // Render the maintenance mode template since the user is not logged in
79
+ if(csmm_is_notificationx_really_setup_and_active()){
80
+ ob_start();
81
+ add_action('shutdown','csmm_render_template_x', 0, 1);
82
+ } else {
83
+ csmm_render_template( $signals_csmm_options );
84
+ }
85
+
86
  }
87
  } else {
88
  // Render the maintenance mode template
89
+ if(csmm_is_notificationx_really_setup_and_active()){
90
+ ob_start();
91
+ add_action('shutdown','csmm_render_template_x', 0, 1);
92
+ } else {
93
+ csmm_render_template( $signals_csmm_options );
94
+ }
95
  }
96
  }
97
  } else {
99
  // Checking if the user is logged in or not
100
  if ( ! is_user_logged_in() ) {
101
  // Render the maintenance mode template since the user is not logged in
102
+ if(csmm_is_notificationx_really_setup_and_active()){
103
+ ob_start();
104
+ add_action('shutdown','csmm_render_template_x', 0, 1);
105
+ } else {
106
+ csmm_render_template( $signals_csmm_options );
107
+ }
108
  }
109
  } else {
110
  // Render the maintenance mode template.
111
+ if(csmm_is_notificationx_really_setup_and_active()){
112
+ ob_start();
113
+ add_action('shutdown','csmm_render_template_x', 0, 1);
114
+ } else {
115
+ csmm_render_template( $signals_csmm_options );
116
+ }
117
  }
118
  }
119
  }
122
  }
123
  add_action( 'init', 'csmm_plugin_init' );
124
 
125
+
126
+
127
+
128
  function csmm_subscribe_hide() {
129
  set_transient('csmm_subscribe_hide', true, DAY_IN_SECONDS * 90);
130
 
framework/public/views/blank.php CHANGED
@@ -7,6 +7,9 @@
7
  * @since 1.0
8
  */
9
 
 
 
 
10
  ?><!DOCTYPE html>
11
  <html <?php language_attributes(); ?>>
12
  <head>
@@ -115,6 +118,5 @@
115
  echo $custom_html;
116
 
117
  ?>
118
- <!-- Maintenance Mode Plugin by Web Factory Ltd (http://www.webfactoryltd.com) -->
119
  </body>
120
  </html>
7
  * @since 1.0
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
  ?><!DOCTYPE html>
14
  <html <?php language_attributes(); ?>>
15
  <head>
118
  echo $custom_html;
119
 
120
  ?>
 
121
  </body>
122
  </html>
framework/public/views/html.php CHANGED
@@ -7,6 +7,9 @@
7
  * @since 1.0
8
  */
9
 
 
 
 
10
  ?><!DOCTYPE html>
11
  <html <?php language_attributes(); ?>>
12
  <head>
@@ -33,6 +36,7 @@
33
 
34
  <?php
35
 
 
36
  if(csmm_is_mailoptin_active() && $options['mailoptin_campaign']>0 && isset($options['mail_system_to_use']) && $options['mail_system_to_use'] == 'mo'){
37
  echo '<script src="'.includes_url('/js/jquery/jquery.js').'"></script>';
38
  echo '<script type="text/javascript">
@@ -53,6 +57,13 @@ if(csmm_is_mailoptin_active() && $options['mailoptin_campaign']>0 && isset($opti
53
  echo '<script src="'.MAILOPTIN_ASSETS_URL.'/js/mailoptin.min.js"></script>';
54
  }
55
 
 
 
 
 
 
 
 
56
  // analytics
57
  if (csmm_convert_ga($options['analytics'])) {
58
  echo "<script>
@@ -191,6 +202,11 @@ if(csmm_is_mailoptin_active() && $options['mailoptin_campaign']>0 && isset($opti
191
  </div><!-- .s-container -->
192
  </div><!-- .maintenance-mode -->
193
  <?php
 
 
 
 
 
194
  if (@$options['show_login_button'] == '1') {
195
  if (is_user_logged_in()) {
196
  echo '<div id="login-button" class="loggedin">';
@@ -203,4 +219,4 @@ if (@$options['show_login_button'] == '1') {
203
  }
204
  ?>
205
  </body>
206
- </html>
7
  * @since 1.0
8
  */
9
 
10
+ if (!defined('WPINC')) {
11
+ die;
12
+ }
13
  ?><!DOCTYPE html>
14
  <html <?php language_attributes(); ?>>
15
  <head>
36
 
37
  <?php
38
 
39
+
40
  if(csmm_is_mailoptin_active() && $options['mailoptin_campaign']>0 && isset($options['mail_system_to_use']) && $options['mail_system_to_use'] == 'mo'){
41
  echo '<script src="'.includes_url('/js/jquery/jquery.js').'"></script>';
42
  echo '<script type="text/javascript">
57
  echo '<script src="'.MAILOPTIN_ASSETS_URL.'/js/mailoptin.min.js"></script>';
58
  }
59
 
60
+ if(csmm_is_notificationx_really_setup_and_active()){
61
+ echo '<script src="'.includes_url('/js/jquery/jquery.js').'"></script>';
62
+ echo '<link rel="stylesheet" href="' . NOTIFICATIONX_PUBLIC_URL . 'assets/css/notificationx-public.min.css" type="text/css">';
63
+ echo '<script type="text/javascript" src="' . NOTIFICATIONX_PUBLIC_URL . 'assets/js/Cookies.js"></script>';
64
+ echo '<script type="text/javascript" src="' . NOTIFICATIONX_PUBLIC_URL . 'assets/js/notificationx-public.min.js"></script>';
65
+ }
66
+
67
  // analytics
68
  if (csmm_convert_ga($options['analytics'])) {
69
  echo "<script>
202
  </div><!-- .s-container -->
203
  </div><!-- .maintenance-mode -->
204
  <?php
205
+
206
+ if(isset($nx_bar_html) && is_array($nx_bar_html) && count($nx_bar_html)>0){
207
+ echo implode('',$nx_bar_html);
208
+ }
209
+
210
  if (@$options['show_login_button'] == '1') {
211
  if (is_user_logged_in()) {
212
  echo '<div id="login-button" class="loggedin">';
219
  }
220
  ?>
221
  </body>
222
+ </html>
minimal-coming-soon-maintenance-mode.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Minimal Coming Soon & Maintenance Mode
4
  * Plugin URI: https://comingsoonwp.com/
5
  * Description: Simply awesome coming soon & maintenance mode plugin. Super-simple to use. MailChimp support built-in.
6
- * Version: 2.01
7
  * Author: WebFactory Ltd
8
  * Author URI: https://www.webfactoryltd.com/
9
  * License: GPLv3
@@ -62,6 +62,7 @@ function csmm_default_options() {
62
  'settings_customized' => '0',
63
 
64
  'mailoptin_campaign' => 0,
 
65
  'mail_system_to_use' => 'mc',
66
  'mailchimp_api' => '',
67
  'mailchimp_list' => '',
@@ -217,6 +218,9 @@ require CSMM_PATH . 'framework/public/init.php';
217
  // MailOptin
218
  require_once CSMM_PATH . 'framework/admin/include/mailoptin.php';
219
 
 
 
 
220
 
221
  function csmm_get_plugin_version() {
222
  $plugin_data = get_file_data(__FILE__, array('version' => 'Version'), 'plugin');
3
  * Plugin Name: Minimal Coming Soon & Maintenance Mode
4
  * Plugin URI: https://comingsoonwp.com/
5
  * Description: Simply awesome coming soon & maintenance mode plugin. Super-simple to use. MailChimp support built-in.
6
+ * Version: 2.05
7
  * Author: WebFactory Ltd
8
  * Author URI: https://www.webfactoryltd.com/
9
  * License: GPLv3
62
  'settings_customized' => '0',
63
 
64
  'mailoptin_campaign' => 0,
65
+ 'notificationx_notification' => 0,
66
  'mail_system_to_use' => 'mc',
67
  'mailchimp_api' => '',
68
  'mailchimp_list' => '',
218
  // MailOptin
219
  require_once CSMM_PATH . 'framework/admin/include/mailoptin.php';
220
 
221
+ // NotificationX
222
+ require_once CSMM_PATH . 'framework/admin/include/nx.php';
223
+
224
 
225
  function csmm_get_plugin_version() {
226
  $plugin_data = get_file_data(__FILE__, array('version' => 'Version'), 'plugin');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: coming soon, coming soon page, maintenance mode, maintenance mode page, co
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 5.2
7
- Stable tag: 2.01
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -19,6 +19,8 @@ Minimal Coming Soon plugin is simple & flexible and works with any WordPress the
19
 
20
  You can collect leads and subscribers on your Coming Soon Page via optin boxes or via optin popups thanks to our integration with <a href="https://wordpress.org/plugins/mailoptin/">MailOptin</a>. A great, free plugin that connects to Aweber, Constant Contact and numerous other autoresponder services allowing you to easily collect emails from the moment your coming soon page is up.
21
 
 
 
22
  = Coming Soon Plugin Features =
23
 
24
  * Check out <a href="https://comingsoonwp.com/themes/?utm_source=wordpressorg&utm_medium=content&utm_campaign=readme&utm_content=themes">100+ themes</a> that come with the PRO version, <a href="https://comingsoonwp.com/image-filters/?utm_source=wordpressorg&utm_medium=content&utm_campaign=readme&utm_content=instagram-filters">26+ Instagram filters</a> and <a href="https://comingsoonwp.com/content-animations/?utm_source=wordpressorg&utm_medium=content&utm_campaign=readme&utm_content=content-animations">47+ spectacular content animations</a> for Coming Soon Pages
@@ -82,6 +84,10 @@ Yes and no. When activated it enables itself across the entire WP-MU network.
82
 
83
  == Changelog ==
84
 
 
 
 
 
85
  = 2.01 =
86
  * 2019-07-31
87
  * minor fixes
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 5.2
7
+ Stable tag: 2.05
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
19
 
20
  You can collect leads and subscribers on your Coming Soon Page via optin boxes or via optin popups thanks to our integration with <a href="https://wordpress.org/plugins/mailoptin/">MailOptin</a>. A great, free plugin that connects to Aweber, Constant Contact and numerous other autoresponder services allowing you to easily collect emails from the moment your coming soon page is up.
21
 
22
+ Increase 20-40% Sales & Interaction in Your Site with <a href="https://wordpress.org/plugins/notificationx/">NotificationX</a>!
23
+
24
  = Coming Soon Plugin Features =
25
 
26
  * Check out <a href="https://comingsoonwp.com/themes/?utm_source=wordpressorg&utm_medium=content&utm_campaign=readme&utm_content=themes">100+ themes</a> that come with the PRO version, <a href="https://comingsoonwp.com/image-filters/?utm_source=wordpressorg&utm_medium=content&utm_campaign=readme&utm_content=instagram-filters">26+ Instagram filters</a> and <a href="https://comingsoonwp.com/content-animations/?utm_source=wordpressorg&utm_medium=content&utm_campaign=readme&utm_content=content-animations">47+ spectacular content animations</a> for Coming Soon Pages
84
 
85
  == Changelog ==
86
 
87
+ = 2.05 =
88
+ * 2019-08-08
89
+ * NotificationX integration
90
+
91
  = 2.01 =
92
  * 2019-07-31
93
  * minor fixes