Popup Maker – Popup Forms, Optins & More - Version 1.8.12

Version Description

Download this release

Release Info

Developer danieliser
Plugin Icon 128x128 Popup Maker – Popup Forms, Optins & More
Version 1.8.12
Comparing to
See all releases

Code changes from version 1.8.11 to 1.8.12

CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  ### v1.8.10 - 07/06/2019
2
  * Fix: PHP backward compatibility issue due to short array syntax usage.
3
 
1
+ ### v1.8.12 - 10/01/2019
2
+ * Improvement: Changed hook that we initialize Ninja Forms on so that it can be disabled from theme functions.php.
3
+ * Improvement: Don't load CF7 scripts if they are forced off.
4
+ * Improvement: Fixed some old options checks that were always being detected as true resulting in minor performance improvements.
5
+ * Tweak: Added nonce to the system info file download available under Popup Maker -> Tools and simplified the pum_actions system.
6
+
7
+
8
+ ### v1.8.11 - 08/18/2019
9
+ * Improvement: Trigger window resize event when popups open to fix issues with some sliders & JS sized content.
10
+ * Fix: Updated form value processing to prevent some edge cases where string values were converted to Infinity.
11
+ * Fix: Custom "already subscribed" messages in MailChimp integration were not working correctly.
12
+
13
  ### v1.8.10 - 07/06/2019
14
  * Fix: PHP backward compatibility issue due to short array syntax usage.
15
 
classes/Admin/Templates.php CHANGED
@@ -112,7 +112,7 @@ class PUM_Admin_Templates {
112
  <# _.each(data.options, function(option, key) { #>
113
  <li>
114
  <input type="checkbox" id="{{data.id}}_{{key}}" name="{{data.name}}[{{option.value}}]" value="{{option.value}}" {{{option.meta}}}/>
115
- <label for="{{data.id}}_{{key}}">{{option.label}}</label>
116
  </li>
117
  <# }); #>
118
  </ul>
112
  <# _.each(data.options, function(option, key) { #>
113
  <li>
114
  <input type="checkbox" id="{{data.id}}_{{key}}" name="{{data.name}}[{{option.value}}]" value="{{option.value}}" {{{option.meta}}}/>
115
+ <label for="{{data.id}}_{{key}}">{{{option.label}}}</label>
116
  </li>
117
  <# }); #>
118
  </ul>
classes/Admin/Tools.php CHANGED
@@ -23,10 +23,10 @@ class PUM_Admin_Tools {
23
  public static function init() {
24
  add_action( 'admin_notices', array( __CLASS__, 'notices' ) );
25
  add_action( 'admin_init', array( __CLASS__, 'emodal_process_import' ) );
26
- add_action( 'popmake_save_enabled_betas', array( __CLASS__, 'save_enabled_betas' ) );
27
  add_action( 'pum_tools_page_tab_import', array( __CLASS__, 'emodal_v2_import_button' ) );
28
  add_action( 'pum_tools_page_tab_system_info', array( __CLASS__, 'sysinfo_display' ) );
29
- add_action( 'popmake_popup_sysinfo', array( __CLASS__, 'sysinfo_download' ) );
30
  add_action( 'pum_tools_page_tab_betas', array( __CLASS__, 'betas_display' ) );
31
  }
32
 
@@ -38,9 +38,9 @@ class PUM_Admin_Tools {
38
  public static function notices() {
39
 
40
  if ( isset( $_GET['imported'] ) ) { ?>
41
- <div class="updated">
42
- <p><?php _e( 'Successfully Imported your themes &amp; modals from Easy Modal.' ); ?></p>
43
- </div>
44
  <?php
45
  }
46
 
@@ -56,12 +56,12 @@ class PUM_Admin_Tools {
56
 
57
  if ( ! empty( self::$notices ) ) {
58
  foreach ( self::$notices as $notice ) { ?>
59
- <div class="notice notice-<?php esc_attr_e( $notice['type'] ); ?> is-dismissible">
60
- <p><strong><?php esc_html_e( $notice['message'] ); ?></strong></p>
61
- <button type="button" class="notice-dismiss">
62
- <span class="screen-reader-text"><?php _e( 'Dismiss this notice.', 'popup-maker' ); ?></span>
63
- </button>
64
- </div>
65
  <?php }
66
  }
67
  }
@@ -75,17 +75,17 @@ class PUM_Admin_Tools {
75
 
76
  ?>
77
 
78
- <div class="wrap">
79
 
80
- <form id="pum-tools" method="post" action="">
81
 
82
  <?php wp_nonce_field( basename( __FILE__ ), 'pum_tools_nonce' ); ?>
83
 
84
- <button class="right top button-primary"><?php _e( 'Save', 'popup-maker' ); ?></button>
85
 
86
- <h1><?php _e( 'Popup Maker Tools', 'popup-maker' ); ?></h1>
87
 
88
- <h2 id="popmake-tabs" class="nav-tab-wrapper"><?php
89
  foreach ( self::tabs() as $tab_id => $tab_name ) {
90
  $tab_url = add_query_arg( array(
91
  'tools-updated' => false,
@@ -94,16 +94,16 @@ class PUM_Admin_Tools {
94
 
95
  printf( '<a href="%s" title="%s" class="nav-tab %s">%s</a>', esc_url( $tab_url ), esc_attr( $tab_name ), $active_tab == $tab_id ? ' nav-tab-active' : '', esc_html( $tab_name ) );
96
  } ?>
97
- </h2>
98
 
99
- <div id="tab_container">
100
  <?php do_action( 'pum_tools_page_tab_' . $active_tab ); ?>
101
 
102
  <?php do_action( 'popmake_tools_page_tab_' . $active_tab ); ?>
103
- </div>
104
 
105
- </form>
106
- </div>
107
  <?php
108
  }
109
 
@@ -111,8 +111,8 @@ class PUM_Admin_Tools {
111
  /**
112
  * Tabs & labels
113
  *
114
- * @since 1.0
115
  * @return array $tabs
 
116
  */
117
  public static function tabs() {
118
  static $tabs;
@@ -128,9 +128,9 @@ class PUM_Admin_Tools {
128
  $tabs = apply_filters( 'popmake_tools_tabs', $tabs );
129
  }
130
 
131
- if ( count( self::get_beta_enabled_extensions() ) == 0 ) {
132
- //unset( $tabs['betas'] );
133
- }
134
 
135
  return $tabs;
136
  }
@@ -140,8 +140,8 @@ class PUM_Admin_Tools {
140
  *
141
  * Extensions should be added as 'extension-slug' => 'Extension Name'
142
  *
143
- * @since 1.5
144
  * @return array $extensions The array of extensions
 
145
  */
146
  public static function get_beta_enabled_extensions() {
147
  return apply_filters( 'pum_beta_enabled_extensions', array() );
@@ -162,24 +162,23 @@ class PUM_Admin_Tools {
162
  * @since 1.3.0
163
  */
164
  public static function sysinfo_display() { ?>
165
- <form action="" method="post">
166
- <textarea style="min-height: 350px; width: 100%; display: block;" readonly="readonly"
167
- onclick="this.focus(); this.select()" id="system-info-textarea" name="popmake-sysinfo"
168
- title="<?php _e( 'To copy the system info, click below then press Ctrl + C (PC) or Cmd + C (Mac).', 'popup-maker' ); ?>"><?php echo self::sysinfo_text(); ?></textarea>
169
- <p class="submit">
170
- <input type="hidden" name="popmake_action" value="popup_sysinfo"/>
171
  <?php submit_button( 'Download System Info File', 'primary', 'popmake-download-sysinfo', false ); ?>
172
- </p>
173
- </form>
174
  <?php
175
  }
176
 
177
  /**
178
  * Get system info
179
  *
 
180
  * @since 1.5
181
  *
182
- * @return string $return A string containing the info to output
183
  */
184
  public static function sysinfo_text() {
185
  global $wpdb;
@@ -392,32 +391,32 @@ class PUM_Admin_Tools {
392
  *
393
  * Returns the webhost this site is using if possible
394
  *
 
395
  * @since 1.3.0
396
  *
397
- * @return mixed string $host if detected, false otherwise
398
  */
399
  public static function get_host() {
400
- if( defined( 'WPE_APIKEY' ) ) {
401
  return 'WP Engine';
402
- } elseif( defined( 'PAGELYBIN' ) ) {
403
  return 'Pagely';
404
- } elseif( DB_HOST == 'localhost:/tmp/mysql5.sock' ) {
405
  return 'ICDSoft';
406
- } elseif( DB_HOST == 'mysqlv5' ) {
407
  return 'NetworkSolutions';
408
- } elseif( strpos( DB_HOST, 'ipagemysql.com' ) !== false ) {
409
  return 'iPage';
410
- } elseif( strpos( DB_HOST, 'ipowermysql.com' ) !== false ) {
411
  return 'IPower';
412
- } elseif( strpos( DB_HOST, '.gridserver.com' ) !== false ) {
413
  return 'MediaTemple Grid';
414
- } elseif( strpos( DB_HOST, '.pair.com' ) !== false ) {
415
  return 'pair Networks';
416
- } elseif( strpos( DB_HOST, '.stabletransit.com' ) !== false ) {
417
  return 'Rackspace Cloud';
418
- } elseif( strpos( DB_HOST, '.sysfix.eu' ) !== false ) {
419
  return 'SysFix.eu Power Hosting';
420
- } elseif( strpos( $_SERVER['SERVER_NAME'], 'Flywheel' ) !== false ) {
421
  return 'Flywheel';
422
  } else {
423
  // Adding a general fallback for data gathering
@@ -430,13 +429,17 @@ class PUM_Admin_Tools {
430
  *
431
  * @since 1.5
432
  */
433
- public static function sysinfo_download() {
 
 
 
 
434
  nocache_headers();
435
 
436
  header( 'Content-Type: text/plain' );
437
  header( 'Content-Disposition: attachment; filename="popmake-system-info.txt"' );
438
 
439
- echo wp_strip_all_tags( $_POST['popmake-sysinfo'] );
440
  exit;
441
  }
442
 
@@ -444,9 +447,9 @@ class PUM_Admin_Tools {
444
  * Add a button to import easy modal data.
445
  */
446
  public static function emodal_v2_import_button() { ?>
447
- <button id="popmake_emodal_v2_import" name="popmake_emodal_v2_import" class="button button-large">
448
  <?php _e( 'Import From Easy Modal v2', 'popup-maker' ); ?>
449
- </button>
450
  <?php
451
  }
452
 
@@ -489,11 +492,11 @@ class PUM_Admin_Tools {
489
  /**
490
  * Sanitize the supported beta values by making them booleans
491
  *
492
- * @since 1.5
493
- *
494
  * @param mixed $value The value being sent in, determining if beta support is enabled.
495
  *
496
  * @return bool
 
 
497
  */
498
  public static function enabled_betas_sanitize_value( $value ) {
499
  return filter_var( $value, FILTER_VALIDATE_BOOLEAN );
@@ -514,32 +517,30 @@ class PUM_Admin_Tools {
514
  do_action( 'pum_tools_betas_before' );
515
  ?>
516
 
517
- <div class="postbox pum-beta-support">
518
- <h3><span><?php _e( 'Enable Beta Versions', 'popup-maker' ); ?></span></h3>
519
- <div class="inside">
520
- <p><?php _e( 'Checking any of the below checkboxes will opt you in to receive pre-release update notifications. You can opt-out at any time. Pre-release updates do not install automatically, you will still have the opportunity to ignore update notifications.', 'popup-maker' ); ?></p>
521
- <table class="form-table pum-beta-support">
522
- <tbody>
523
  <?php foreach ( $has_beta as $slug => $product ) : ?>
524
- <tr>
525
  <?php $checked = self::extension_has_beta_support( $slug ); ?>
526
- <th scope="row"><?php echo esc_html( $product ); ?></th>
527
- <td>
528
- <input type="checkbox" name="enabled_betas[<?php echo esc_attr( $slug ); ?>]"
529
- id="enabled_betas[<?php echo esc_attr( $slug ); ?>]"<?php echo checked( $checked, true, false ); ?>
530
- value="1"/>
531
- <label
532
- for="enabled_betas[<?php echo esc_attr( $slug ); ?>]"><?php printf( __( 'Get updates for pre-release versions of %s', 'popup-maker' ), $product ); ?></label>
533
- </td>
534
- </tr>
535
  <?php endforeach; ?>
536
- </tbody>
537
- </table>
538
- <input type="hidden" name="popmake_action" value="save_enabled_betas"/>
539
  <?php wp_nonce_field( 'pum_save_betas_nonce', 'pum_save_betas_nonce' ); ?>
540
  <?php submit_button( __( 'Save', 'popup-maker' ), 'secondary', 'submit', false ); ?>
541
- </div>
542
- </div>
543
 
544
  <?php
545
  do_action( 'pum_tools_betas_after' );
@@ -548,11 +549,11 @@ class PUM_Admin_Tools {
548
  /**
549
  * Check if a given extensions has beta support enabled
550
  *
551
- * @since 1.5
552
- *
553
- * @param string $slug The slug of the extension to check
554
  *
555
  * @return bool True if enabled, false otherwise
 
 
556
  */
557
  public static function extension_has_beta_support( $slug ) {
558
  $enabled_betas = PUM_Utils_Options::get( 'enabled_betas', array() );
23
  public static function init() {
24
  add_action( 'admin_notices', array( __CLASS__, 'notices' ) );
25
  add_action( 'admin_init', array( __CLASS__, 'emodal_process_import' ) );
26
+ add_action( 'pum_save_enabled_betas', array( __CLASS__, 'save_enabled_betas' ) );
27
  add_action( 'pum_tools_page_tab_import', array( __CLASS__, 'emodal_v2_import_button' ) );
28
  add_action( 'pum_tools_page_tab_system_info', array( __CLASS__, 'sysinfo_display' ) );
29
+ add_action( 'pum_popup_sysinfo', array( __CLASS__, 'popup_sysinfo' ) );
30
  add_action( 'pum_tools_page_tab_betas', array( __CLASS__, 'betas_display' ) );
31
  }
32
 
38
  public static function notices() {
39
 
40
  if ( isset( $_GET['imported'] ) ) { ?>
41
+ <div class="updated">
42
+ <p><?php _e( 'Successfully Imported your themes &amp; modals from Easy Modal.' ); ?></p>
43
+ </div>
44
  <?php
45
  }
46
 
56
 
57
  if ( ! empty( self::$notices ) ) {
58
  foreach ( self::$notices as $notice ) { ?>
59
+ <div class="notice notice-<?php esc_attr_e( $notice['type'] ); ?> is-dismissible">
60
+ <p><strong><?php esc_html_e( $notice['message'] ); ?></strong></p>
61
+ <button type="button" class="notice-dismiss">
62
+ <span class="screen-reader-text"><?php _e( 'Dismiss this notice.', 'popup-maker' ); ?></span>
63
+ </button>
64
+ </div>
65
  <?php }
66
  }
67
  }
75
 
76
  ?>
77
 
78
+ <div class="wrap">
79
 
80
+ <form id="pum-tools" method="post" action="">
81
 
82
  <?php wp_nonce_field( basename( __FILE__ ), 'pum_tools_nonce' ); ?>
83
 
84
+ <button class="right top button-primary"><?php _e( 'Save', 'popup-maker' ); ?></button>
85
 
86
+ <h1><?php _e( 'Popup Maker Tools', 'popup-maker' ); ?></h1>
87
 
88
+ <h2 id="popmake-tabs" class="nav-tab-wrapper"><?php
89
  foreach ( self::tabs() as $tab_id => $tab_name ) {
90
  $tab_url = add_query_arg( array(
91
  'tools-updated' => false,
94
 
95
  printf( '<a href="%s" title="%s" class="nav-tab %s">%s</a>', esc_url( $tab_url ), esc_attr( $tab_name ), $active_tab == $tab_id ? ' nav-tab-active' : '', esc_html( $tab_name ) );
96
  } ?>
97
+ </h2>
98
 
99
+ <div id="tab_container">
100
  <?php do_action( 'pum_tools_page_tab_' . $active_tab ); ?>
101
 
102
  <?php do_action( 'popmake_tools_page_tab_' . $active_tab ); ?>
103
+ </div>
104
 
105
+ </form>
106
+ </div>
107
  <?php
108
  }
109
 
111
  /**
112
  * Tabs & labels
113
  *
 
114
  * @return array $tabs
115
+ * @since 1.0
116
  */
117
  public static function tabs() {
118
  static $tabs;
128
  $tabs = apply_filters( 'popmake_tools_tabs', $tabs );
129
  }
130
 
131
+ /*if ( count( self::get_beta_enabled_extensions() ) == 0 ) {
132
+ unset( $tabs['betas'] );
133
+ }*/
134
 
135
  return $tabs;
136
  }
140
  *
141
  * Extensions should be added as 'extension-slug' => 'Extension Name'
142
  *
 
143
  * @return array $extensions The array of extensions
144
+ * @since 1.5
145
  */
146
  public static function get_beta_enabled_extensions() {
147
  return apply_filters( 'pum_beta_enabled_extensions', array() );
162
  * @since 1.3.0
163
  */
164
  public static function sysinfo_display() { ?>
165
+ <form action="" method="post">
166
+ <textarea style="min-height: 350px; width: 100%; display: block;" readonly="readonly" onclick="this.focus(); this.select()" id="system-info-textarea" title="<?php _e( 'To copy the system info, click below then press Ctrl + C (PC) or Cmd + C (Mac).', 'popup-maker' ); ?>"><?php echo self::sysinfo_text(); ?></textarea>
167
+ <p class="submit">
168
+ <input type="hidden" name="pum_action" value="popup_sysinfo" />
169
+ <?php wp_nonce_field( 'pum_popup_sysinfo_nonce', 'pum_popup_sysinfo_nonce' ); ?>
 
170
  <?php submit_button( 'Download System Info File', 'primary', 'popmake-download-sysinfo', false ); ?>
171
+ </p>
172
+ </form>
173
  <?php
174
  }
175
 
176
  /**
177
  * Get system info
178
  *
179
+ * @return string $return A string containing the info to output
180
  * @since 1.5
181
  *
 
182
  */
183
  public static function sysinfo_text() {
184
  global $wpdb;
391
  *
392
  * Returns the webhost this site is using if possible
393
  *
394
+ * @return mixed string $host if detected, false otherwise
395
  * @since 1.3.0
396
  *
 
397
  */
398
  public static function get_host() {
399
+ if ( defined( 'WPE_APIKEY' ) ) {
400
  return 'WP Engine';
401
+ } elseif ( defined( 'PAGELYBIN' ) ) {
402
  return 'Pagely';
403
+ } elseif ( DB_HOST == 'localhost:/tmp/mysql5.sock' ) {
404
  return 'ICDSoft';
405
+ } elseif ( DB_HOST == 'mysqlv5' ) {
406
  return 'NetworkSolutions';
407
+ } elseif ( strpos( DB_HOST, 'ipagemysql.com' ) !== false ) {
408
  return 'iPage';
409
+ } elseif ( strpos( DB_HOST, 'ipowermysql.com' ) !== false ) {
410
  return 'IPower';
411
+ } elseif ( strpos( DB_HOST, '.gridserver.com' ) !== false ) {
412
  return 'MediaTemple Grid';
413
+ } elseif ( strpos( DB_HOST, '.pair.com' ) !== false ) {
414
  return 'pair Networks';
415
+ } elseif ( strpos( DB_HOST, '.stabletransit.com' ) !== false ) {
416
  return 'Rackspace Cloud';
417
+ } elseif ( strpos( DB_HOST, '.sysfix.eu' ) !== false ) {
418
  return 'SysFix.eu Power Hosting';
419
+ } elseif ( strpos( $_SERVER['SERVER_NAME'], 'Flywheel' ) !== false ) {
420
  return 'Flywheel';
421
  } else {
422
  // Adding a general fallback for data gathering
429
  *
430
  * @since 1.5
431
  */
432
+ public static function popup_sysinfo() {
433
+ if ( ! wp_verify_nonce( $_POST['pum_popup_sysinfo_nonce'], 'pum_popup_sysinfo_nonce' ) ) {
434
+ return;
435
+ }
436
+
437
  nocache_headers();
438
 
439
  header( 'Content-Type: text/plain' );
440
  header( 'Content-Disposition: attachment; filename="popmake-system-info.txt"' );
441
 
442
+ echo self::sysinfo_text();
443
  exit;
444
  }
445
 
447
  * Add a button to import easy modal data.
448
  */
449
  public static function emodal_v2_import_button() { ?>
450
+ <button id="popmake_emodal_v2_import" name="popmake_emodal_v2_import" class="button button-large">
451
  <?php _e( 'Import From Easy Modal v2', 'popup-maker' ); ?>
452
+ </button>
453
  <?php
454
  }
455
 
492
  /**
493
  * Sanitize the supported beta values by making them booleans
494
  *
 
 
495
  * @param mixed $value The value being sent in, determining if beta support is enabled.
496
  *
497
  * @return bool
498
+ * @since 1.5
499
+ *
500
  */
501
  public static function enabled_betas_sanitize_value( $value ) {
502
  return filter_var( $value, FILTER_VALIDATE_BOOLEAN );
517
  do_action( 'pum_tools_betas_before' );
518
  ?>
519
 
520
+ <div class="postbox pum-beta-support">
521
+ <h3><span><?php _e( 'Enable Beta Versions', 'popup-maker' ); ?></span></h3>
522
+ <div class="inside">
523
+ <p><?php _e( 'Checking any of the below checkboxes will opt you in to receive pre-release update notifications. You can opt-out at any time. Pre-release updates do not install automatically, you will still have the opportunity to ignore update notifications.', 'popup-maker' ); ?></p>
524
+ <table class="form-table pum-beta-support">
525
+ <tbody>
526
  <?php foreach ( $has_beta as $slug => $product ) : ?>
527
+ <tr>
528
  <?php $checked = self::extension_has_beta_support( $slug ); ?>
529
+ <th scope="row"><?php echo esc_html( $product ); ?></th>
530
+ <td>
531
+ <input type="checkbox" name="enabled_betas[<?php echo esc_attr( $slug ); ?>]" id="enabled_betas[<?php echo esc_attr( $slug ); ?>]"<?php echo checked( $checked, true, false ); ?>
532
+ value="1" />
533
+ <label for="enabled_betas[<?php echo esc_attr( $slug ); ?>]"><?php printf( __( 'Get updates for pre-release versions of %s', 'popup-maker' ), $product ); ?></label>
534
+ </td>
535
+ </tr>
 
 
536
  <?php endforeach; ?>
537
+ </tbody>
538
+ </table>
539
+ <input type="hidden" name="pum_action" value="save_enabled_betas" />
540
  <?php wp_nonce_field( 'pum_save_betas_nonce', 'pum_save_betas_nonce' ); ?>
541
  <?php submit_button( __( 'Save', 'popup-maker' ), 'secondary', 'submit', false ); ?>
542
+ </div>
543
+ </div>
544
 
545
  <?php
546
  do_action( 'pum_tools_betas_after' );
549
  /**
550
  * Check if a given extensions has beta support enabled
551
  *
552
+ * @param string $slug The slug of the extension to check
 
 
553
  *
554
  * @return bool True if enabled, false otherwise
555
+ * @since 1.5
556
+ *
557
  */
558
  public static function extension_has_beta_support( $slug ) {
559
  $enabled_betas = PUM_Utils_Options::get( 'enabled_betas', array() );
classes/AssetCache.php CHANGED
@@ -176,7 +176,7 @@ class PUM_AssetCache {
176
 
177
  $js = "/**\n";
178
  $js .= " * Do not touch this file! This file created by the Popup Maker plugin using PHP\n";
179
- $js .= " * Last modifiyed time: " . date( 'M d Y, h:s:i' ) . "\n";
180
  $js .= " */\n\n\n";
181
  $js .= self::generate_js();
182
 
@@ -195,7 +195,7 @@ class PUM_AssetCache {
195
 
196
  $css = "/**\n";
197
  $css .= " * Do not touch this file! This file created by the Popup Maker plugin using PHP\n";
198
- $css .= " * Last modifiyed time: " . date( 'M d Y, h:s:i' ) . "\n";
199
  $css .= " */\n\n\n";
200
  $css .= self::generate_css();
201
 
176
 
177
  $js = "/**\n";
178
  $js .= " * Do not touch this file! This file created by the Popup Maker plugin using PHP\n";
179
+ $js .= " * Last modified time: " . date( 'M d Y, h:s:i' ) . "\n";
180
  $js .= " */\n\n\n";
181
  $js .= self::generate_js();
182
 
195
 
196
  $css = "/**\n";
197
  $css .= " * Do not touch this file! This file created by the Popup Maker plugin using PHP\n";
198
+ $css .= " * Last modified time: " . date( 'M d Y, h:s:i' ) . "\n";
199
  $css .= " */\n\n\n";
200
  $css .= self::generate_css();
201
 
classes/Site.php CHANGED
@@ -1,5 +1,8 @@
1
  <?php
2
 
 
 
 
3
  class PUM_Site {
4
 
5
  public static function init() {
@@ -34,14 +37,22 @@ class PUM_Site {
34
  * functions are called on init.
35
  */
36
  public static function actions() {
37
- if ( isset( $_GET['popmake_action'] ) ) {
38
- do_action( 'popmake_' . $_GET['popmake_action'], $_GET );
39
- } else if ( isset( $_POST['popmake_action'] ) ) {
40
- do_action( 'popmake_' . $_POST['popmake_action'], $_POST );
41
- } else if ( isset( $_GET['pum_action'] ) ) {
42
- do_action( 'pum_' . $_GET['pum_action'], $_GET );
43
- } else if ( isset( $_POST['pum_action'] ) ) {
44
- do_action( 'pum_' . $_POST['pum_action'], $_POST );
45
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
47
  }
1
  <?php
2
 
3
+ /**
4
+ * Class PUM_Site
5
+ */
6
  class PUM_Site {
7
 
8
  public static function init() {
37
  * functions are called on init.
38
  */
39
  public static function actions() {
40
+ if ( empty( $_REQUEST['pum_action'] ) ) {
41
+ return;
 
 
 
 
 
 
42
  }
43
+
44
+ $valid_actions = apply_filters( 'pum_valid_request_actions', array(
45
+ 'popup_sysinfo',
46
+ 'save_enabled_betas',
47
+ 'download_batch_export',
48
+ ) );
49
+
50
+ $action = sanitize_text_field( $_REQUEST['pum_action'] );
51
+
52
+ if ( ! in_array( $action, $valid_actions ) || ! has_action( 'pum_' . $action ) ) {
53
+ return;
54
+ }
55
+
56
+ do_action( 'pum_' . $action, $_REQUEST );
57
  }
58
  }
includes/importer/easy-modal-v2.php CHANGED
@@ -207,12 +207,11 @@ function popmake_emodal_v2_import() {
207
 
208
 
209
  function popmake_emodal_init() {
210
- global $popmake_options;
211
- if ( isset( $popmake_options['enable_easy_modal_compatibility_mode'] ) ) {
212
  if ( ! shortcode_exists( 'modal' ) ) {
213
  add_shortcode( 'modal', 'popmake_emodal_shortcode_modal' );
214
  }
215
- add_filter( 'popmake_get_the_popup_data_attr', 'popmake_emodal_get_the_popup_data_attr', 10, 2 );
216
  add_filter( 'popmake_shortcode_popup_default_atts', 'popmake_emodal_shortcode_popup_default_atts', 10, 2 );
217
  add_filter( 'popmake_shortcode_data_attr', 'popmake_emodal_shortcode_data_attr', 10, 2 );
218
 
207
 
208
 
209
  function popmake_emodal_init() {
210
+ if ( pum_get_option( 'enable_easy_modal_compatibility_mode' ) ) {
 
211
  if ( ! shortcode_exists( 'modal' ) ) {
212
  add_shortcode( 'modal', 'popmake_emodal_shortcode_modal' );
213
  }
214
+ add_filter( 'pum_popup_data_attr', 'popmake_emodal_get_the_popup_data_attr', 10, 2 );
215
  add_filter( 'popmake_shortcode_popup_default_atts', 'popmake_emodal_shortcode_popup_default_atts', 10, 2 );
216
  add_filter( 'popmake_shortcode_data_attr', 'popmake_emodal_shortcode_data_attr', 10, 2 );
217
 
includes/integrations/class-pum-cf7.php CHANGED
@@ -32,6 +32,10 @@ class PUM_CF7_Integration {
32
  $popup = pum_get_popup( $popup_id );
33
 
34
  if ( has_shortcode( $popup->post_content, 'contact-form-7' ) ) {
 
 
 
 
35
  if ( function_exists( 'wpcf7_enqueue_scripts' ) ) {
36
  wpcf7_enqueue_scripts();
37
  }
32
  $popup = pum_get_popup( $popup_id );
33
 
34
  if ( has_shortcode( $popup->post_content, 'contact-form-7' ) ) {
35
+ if ( defined( 'WPCF7_LOAD_JS' ) && ! WPCF7_LOAD_JS ) {
36
+ return;
37
+ }
38
+
39
  if ( function_exists( 'wpcf7_enqueue_scripts' ) ) {
40
  wpcf7_enqueue_scripts();
41
  }
includes/integrations/class-pum-ninja-forms.php CHANGED
@@ -184,4 +184,4 @@ function pum_nf_should_init() {
184
  NF_PUM();
185
  }
186
 
187
- add_action( 'plugins_loaded', 'pum_nf_should_init', 0 );
184
  NF_PUM();
185
  }
186
 
187
+ add_action( 'init', 'pum_nf_should_init', 0 );
languages/popup-maker.pot CHANGED
@@ -523,7 +523,7 @@ msgstr ""
523
  msgid "Time Delay Settings"
524
  msgstr ""
525
 
526
- #: classes/Triggers.php:164, classes/Triggers.php:169, classes/Shortcode/Subscribe.php:394, includes/integrations/class-pum-cf7.php:143, includes/integrations/class-pum-gravity-forms.php:138, includes/integrations/ninja-forms/Actions/ClosePopup.php:43
527
  msgid "Delay"
528
  msgstr ""
529
 
@@ -543,7 +543,7 @@ msgstr ""
543
  msgid "Cookie"
544
  msgstr ""
545
 
546
- #: classes/Types.php:21, classes/Types.php:167, classes/Upsell.php:92, classes/Admin/Popups.php:64, classes/Shortcode/Popup.php:28, classes/Shortcode/Popup.php:378, classes/Shortcode/Subscribe.php:93, includes/integrations/class-pum-cf7.php:163, includes/integrations/class-pum-gravity-forms.php:158, includes/modules/menus.php:55, classes/Admin/Subscribers/Table.php:94
547
  msgid "Popup"
548
  msgstr ""
549
 
@@ -855,7 +855,7 @@ msgstr ""
855
  msgid "Add"
856
  msgstr ""
857
 
858
- #: classes/Admin/Assets.php:68, classes/Admin/Settings.php:581, classes/Admin/Settings.php:610, classes/Admin/Tools.php:84, classes/Admin/Tools.php:540, includes/integrations/class-pum-gravity-forms.php:173
859
  msgid "Save"
860
  msgstr ""
861
 
@@ -1039,7 +1039,7 @@ msgstr ""
1039
  msgid "Register a popup name. The CSS class ‘popmake-{popup-name}’ can be used to set a trigger to display a popup."
1040
  msgstr ""
1041
 
1042
- #: classes/Admin/Popups.php:130, includes/integrations/class-pum-cf7.php:115, includes/integrations/class-pum-cf7.php:129, includes/integrations/class-pum-gravity-forms.php:119
1043
  msgid "Popup Settings"
1044
  msgstr ""
1045
 
@@ -2086,23 +2086,23 @@ msgstr ""
2086
  msgid "Import / Export"
2087
  msgstr ""
2088
 
2089
- #: classes/Admin/Tools.php:168
2090
  msgid "To copy the system info, click below then press Ctrl + C (PC) or Cmd + C (Mac)."
2091
  msgstr ""
2092
 
2093
- #: classes/Admin/Tools.php:448
2094
  msgid "Import From Easy Modal v2"
2095
  msgstr ""
2096
 
2097
- #: classes/Admin/Tools.php:518
2098
  msgid "Enable Beta Versions"
2099
  msgstr ""
2100
 
2101
- #: classes/Admin/Tools.php:520
2102
  msgid "Checking any of the below checkboxes will opt you in to receive pre-release update notifications. You can opt-out at any time. Pre-release updates do not install automatically, you will still have the opportunity to ignore update notifications."
2103
  msgstr ""
2104
 
2105
- #: classes/Admin/Tools.php:532
2106
  msgid "Get updates for pre-release versions of %s"
2107
  msgstr ""
2108
 
@@ -2394,15 +2394,15 @@ msgstr ""
2394
  msgid "Radio forces the user to make a choice, often resulting in more optins."
2395
  msgstr ""
2396
 
2397
- #: classes/Shortcode/Subscribe.php:390, includes/integrations/class-pum-cf7.php:135, includes/integrations/class-pum-gravity-forms.php:130, includes/modules/admin-bar.php:493, includes/integrations/ninja-forms/Actions/ClosePopup.php:36
2398
  msgid "Close Popup"
2399
  msgstr ""
2400
 
2401
- #: classes/Shortcode/Subscribe.php:406, includes/integrations/class-pum-cf7.php:155, includes/integrations/class-pum-gravity-forms.php:150, includes/modules/admin-bar.php:483, includes/integrations/ninja-forms/Actions/OpenPopup.php:35
2402
  msgid "Open Popup"
2403
  msgstr ""
2404
 
2405
- #: classes/Shortcode/Subscribe.php:413, includes/integrations/class-pum-cf7.php:218, includes/integrations/class-pum-gravity-forms.php:228, includes/integrations/ninja-forms/Actions/OpenPopup.php:78
2406
  msgid "Select a popup"
2407
  msgstr ""
2408
 
@@ -2691,15 +2691,15 @@ msgstr ""
2691
  msgid "BP: Is Action Variable"
2692
  msgstr ""
2693
 
2694
- #: includes/integrations/class-pum-cf7.php:97
2695
  msgid "Contact Form 7 Success"
2696
  msgstr ""
2697
 
2698
- #: includes/integrations/class-pum-cf7.php:130
2699
  msgid "These settings control popups after successful form submissions."
2700
  msgstr ""
2701
 
2702
- #: includes/integrations/class-pum-cf7.php:150, includes/integrations/class-pum-gravity-forms.php:145, includes/integrations/ninja-forms/Actions/ClosePopup.php:43
2703
  msgid "seconds"
2704
  msgstr ""
2705
 
523
  msgid "Time Delay Settings"
524
  msgstr ""
525
 
526
+ #: classes/Triggers.php:164, classes/Triggers.php:169, classes/Shortcode/Subscribe.php:394, includes/integrations/class-pum-cf7.php:147, includes/integrations/class-pum-gravity-forms.php:138, includes/integrations/ninja-forms/Actions/ClosePopup.php:43
527
  msgid "Delay"
528
  msgstr ""
529
 
543
  msgid "Cookie"
544
  msgstr ""
545
 
546
+ #: classes/Types.php:21, classes/Types.php:167, classes/Upsell.php:92, classes/Admin/Popups.php:64, classes/Shortcode/Popup.php:28, classes/Shortcode/Popup.php:378, classes/Shortcode/Subscribe.php:93, includes/integrations/class-pum-cf7.php:167, includes/integrations/class-pum-gravity-forms.php:158, includes/modules/menus.php:55, classes/Admin/Subscribers/Table.php:94
547
  msgid "Popup"
548
  msgstr ""
549
 
855
  msgid "Add"
856
  msgstr ""
857
 
858
+ #: classes/Admin/Assets.php:68, classes/Admin/Settings.php:581, classes/Admin/Settings.php:610, classes/Admin/Tools.php:84, classes/Admin/Tools.php:541, includes/integrations/class-pum-gravity-forms.php:173
859
  msgid "Save"
860
  msgstr ""
861
 
1039
  msgid "Register a popup name. The CSS class ‘popmake-{popup-name}’ can be used to set a trigger to display a popup."
1040
  msgstr ""
1041
 
1042
+ #: classes/Admin/Popups.php:130, includes/integrations/class-pum-cf7.php:119, includes/integrations/class-pum-cf7.php:133, includes/integrations/class-pum-gravity-forms.php:119
1043
  msgid "Popup Settings"
1044
  msgstr ""
1045
 
2086
  msgid "Import / Export"
2087
  msgstr ""
2088
 
2089
+ #: classes/Admin/Tools.php:166
2090
  msgid "To copy the system info, click below then press Ctrl + C (PC) or Cmd + C (Mac)."
2091
  msgstr ""
2092
 
2093
+ #: classes/Admin/Tools.php:451
2094
  msgid "Import From Easy Modal v2"
2095
  msgstr ""
2096
 
2097
+ #: classes/Admin/Tools.php:521
2098
  msgid "Enable Beta Versions"
2099
  msgstr ""
2100
 
2101
+ #: classes/Admin/Tools.php:523
2102
  msgid "Checking any of the below checkboxes will opt you in to receive pre-release update notifications. You can opt-out at any time. Pre-release updates do not install automatically, you will still have the opportunity to ignore update notifications."
2103
  msgstr ""
2104
 
2105
+ #: classes/Admin/Tools.php:533
2106
  msgid "Get updates for pre-release versions of %s"
2107
  msgstr ""
2108
 
2394
  msgid "Radio forces the user to make a choice, often resulting in more optins."
2395
  msgstr ""
2396
 
2397
+ #: classes/Shortcode/Subscribe.php:390, includes/integrations/class-pum-cf7.php:139, includes/integrations/class-pum-gravity-forms.php:130, includes/modules/admin-bar.php:493, includes/integrations/ninja-forms/Actions/ClosePopup.php:36
2398
  msgid "Close Popup"
2399
  msgstr ""
2400
 
2401
+ #: classes/Shortcode/Subscribe.php:406, includes/integrations/class-pum-cf7.php:159, includes/integrations/class-pum-gravity-forms.php:150, includes/modules/admin-bar.php:483, includes/integrations/ninja-forms/Actions/OpenPopup.php:35
2402
  msgid "Open Popup"
2403
  msgstr ""
2404
 
2405
+ #: classes/Shortcode/Subscribe.php:413, includes/integrations/class-pum-cf7.php:222, includes/integrations/class-pum-gravity-forms.php:228, includes/integrations/ninja-forms/Actions/OpenPopup.php:78
2406
  msgid "Select a popup"
2407
  msgstr ""
2408
 
2691
  msgid "BP: Is Action Variable"
2692
  msgstr ""
2693
 
2694
+ #: includes/integrations/class-pum-cf7.php:101
2695
  msgid "Contact Form 7 Success"
2696
  msgstr ""
2697
 
2698
+ #: includes/integrations/class-pum-cf7.php:134
2699
  msgid "These settings control popups after successful form submissions."
2700
  msgstr ""
2701
 
2702
+ #: includes/integrations/class-pum-cf7.php:154, includes/integrations/class-pum-gravity-forms.php:145, includes/integrations/ninja-forms/Actions/ClosePopup.php:43
2703
  msgid "seconds"
2704
  msgstr ""
2705
 
popup-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Popup Maker
4
  * Plugin URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=plugin-uri
5
  * Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
6
- * Version: 1.8.11
7
  * Author: WP Popup Maker
8
  * Author URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
9
  * License: GPL2 or later
@@ -95,7 +95,7 @@ class Popup_Maker {
95
  /**
96
  * @var string Plugin Version
97
  */
98
- public static $VER = '1.8.11';
99
 
100
  /**
101
  * @var int DB Version
3
  * Plugin Name: Popup Maker
4
  * Plugin URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=plugin-uri
5
  * Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
6
+ * Version: 1.8.12
7
  * Author: WP Popup Maker
8
  * Author URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
9
  * License: GPL2 or later
95
  /**
96
  * @var string Plugin Version
97
  */
98
+ public static $VER = '1.8.12';
99
 
100
  /**
101
  * @var int DB Version
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: marketing, popup, popups, optin, advertising, conversion, responsive popu
7
  Requires at least: 4.1
8
  Tested up to: 5.3
9
  Requires PHP: 5.2.17
10
- Stable tag: 1.8.11
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -98,6 +98,12 @@ There are several common causes for this, check [this guide for help](https://do
98
 
99
  View our [complete changelog](https://github.com/PopupMaker/Popup-Maker/blob/master/CHANGELOG.md) for up-to-date information on what has been going on with the development of Popup Maker.
100
 
 
 
 
 
 
 
101
  = v1.8.11 - 08/18/2019 =
102
  * Improvement: Trigger window resize event when popups open to fix issues with some sliders & JS sized content.
103
  * Fix: Updated form value processing to prevent some edge cases where string values were converted to Infinity.
7
  Requires at least: 4.1
8
  Tested up to: 5.3
9
  Requires PHP: 5.2.17
10
+ Stable tag: 1.8.12
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
98
 
99
  View our [complete changelog](https://github.com/PopupMaker/Popup-Maker/blob/master/CHANGELOG.md) for up-to-date information on what has been going on with the development of Popup Maker.
100
 
101
+ = v1.8.12 - 10/01/2019 =
102
+ * Improvement: Changed hook that we initialize Ninja Forms on so that it can be disabled from theme functions.php.
103
+ * Improvement: Don't load CF7 scripts if they are forced off.
104
+ * Improvement: Fixed some old options checks that were always being detected as true resulting in minor performance improvements.
105
+ * Tweak: Added nonce to the system info file download available under Popup Maker -> Tools and simplified the pum_actions system.
106
+
107
  = v1.8.11 - 08/18/2019 =
108
  * Improvement: Trigger window resize event when popups open to fix issues with some sliders & JS sized content.
109
  * Fix: Updated form value processing to prevent some edge cases where string values were converted to Infinity.