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

Version Description

Download this release

Release Info

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

Code changes from version 1.4.5 to 1.4.6

includes/admin/class-pum-admin-upgrades.php CHANGED
@@ -34,6 +34,8 @@ class PUM_Admin_Upgrades {
34
 
35
  public $doing_upgrades = false;
36
 
 
 
37
  public $current_routine = null;
38
 
39
  public $next_routine = null;
@@ -57,6 +59,8 @@ class PUM_Admin_Upgrades {
57
 
58
  $this->update_plugin_version();
59
 
 
 
60
  // bail if this plugin data doesn't need updating
61
  if ( pum_get_db_ver() >= PUM::DB_VER ) {
62
  return;
@@ -100,6 +104,7 @@ class PUM_Admin_Upgrades {
100
 
101
  $parent = null;
102
 
 
103
  if ( function_exists( 'is_network_admin' ) && is_network_admin() ) {
104
  add_menu_page(
105
  __( 'Popup Maker', 'popup-maker' ),
@@ -111,12 +116,13 @@ class PUM_Admin_Upgrades {
111
  );
112
  $parent = 'popup-maker';
113
  }
 
114
 
115
  $this->page = add_submenu_page(
116
  $parent,
117
  __( 'Popup Maker Upgrades', 'popup-maker' ),
118
  __( 'Popup Maker Upgrades', 'popup-maker' ),
119
- 'manage_options',
120
  'pum-upgrades',
121
  array( $this, 'upgrades_screen' )
122
  );
@@ -270,7 +276,7 @@ class PUM_Admin_Upgrades {
270
  */
271
  public function trigger_upgrades() {
272
 
273
- if ( ! current_user_can( 'manage_options' ) ) {
274
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
275
  }
276
 
34
 
35
  public $doing_upgrades = false;
36
 
37
+ public $required_cap = 'manage_options';
38
+
39
  public $current_routine = null;
40
 
41
  public $next_routine = null;
59
 
60
  $this->update_plugin_version();
61
 
62
+ $this->required_cap = apply_filters( 'pum_upgrade_required_cap', 'manage_options' );
63
+
64
  // bail if this plugin data doesn't need updating
65
  if ( pum_get_db_ver() >= PUM::DB_VER ) {
66
  return;
104
 
105
  $parent = null;
106
 
107
+ /*
108
  if ( function_exists( 'is_network_admin' ) && is_network_admin() ) {
109
  add_menu_page(
110
  __( 'Popup Maker', 'popup-maker' ),
116
  );
117
  $parent = 'popup-maker';
118
  }
119
+ */
120
 
121
  $this->page = add_submenu_page(
122
  $parent,
123
  __( 'Popup Maker Upgrades', 'popup-maker' ),
124
  __( 'Popup Maker Upgrades', 'popup-maker' ),
125
+ $this->required_cap,
126
  'pum-upgrades',
127
  array( $this, 'upgrades_screen' )
128
  );
276
  */
277
  public function trigger_upgrades() {
278
 
279
+ if ( ! current_user_can( $this->required_cap ) ) {
280
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
281
  }
282
 
includes/admin/shortcode-ui/templates/fields.php CHANGED
@@ -86,8 +86,4 @@
86
  <script type="text/template" id="tmpl-pum-field-rangeslider">
87
  <input type="text" id="<%= id %>" name="<%= name %>" value="<%= value %>" class="popmake-range-manual pum-range-manual" <%= meta %>/>
88
  <span class="range-value-unit regular-text"><%= unit %></span>
89
- </script>
90
-
91
- <script type="text/template" id="tmpl-pum-field-">
92
-
93
- </script>
86
  <script type="text/template" id="tmpl-pum-field-rangeslider">
87
  <input type="text" id="<%= id %>" name="<%= name %>" value="<%= value %>" class="popmake-range-manual pum-range-manual" <%= meta %>/>
88
  <span class="range-value-unit regular-text"><%= unit %></span>
89
+ </script>
 
 
 
 
includes/admin/upgrades/class-pum-admin-upgrade-routine-2.php CHANGED
@@ -28,7 +28,7 @@ final class PUM_Admin_Upgrade_Routine_2 extends PUM_Admin_Upgrade_Routine {
28
  }
29
 
30
  public static function run() {
31
- if ( ! current_user_can( 'manage_options' ) ) {
32
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
33
  }
34
 
28
  }
29
 
30
  public static function run() {
31
+ if ( ! current_user_can( PUM_Admin_Upgrades::instance()->required_cap ) ) {
32
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
33
  }
34
 
includes/admin/upgrades/class-pum-admin-upgrade-routine-3.php CHANGED
@@ -39,7 +39,7 @@ final class PUM_Admin_Upgrade_Routine_3 extends PUM_Admin_Upgrade_Routine {
39
  * - Convert Click Open
40
  */
41
  public static function run() {
42
- if ( ! current_user_can( 'manage_options' ) ) {
43
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
44
  }
45
 
39
  * - Convert Click Open
40
  */
41
  public static function run() {
42
+ if ( ! current_user_can( PUM_Admin_Upgrades::instance()->required_cap ) ) {
43
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
44
  }
45
 
includes/admin/upgrades/class-pum-admin-upgrade-routine-4.php CHANGED
@@ -39,7 +39,7 @@ final class PUM_Admin_Upgrade_Routine_4 extends PUM_Admin_Upgrade_Routine {
39
  * - Default popups with no conditions to draft
40
  */
41
  public static function run() {
42
- if ( ! current_user_can( 'manage_options' ) ) {
43
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
44
  }
45
 
39
  * - Default popups with no conditions to draft
40
  */
41
  public static function run() {
42
+ if ( ! current_user_can( PUM_Admin_Upgrades::instance()->required_cap ) ) {
43
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
44
  }
45
 
includes/admin/upgrades/class-pum-admin-upgrade-routine-5.php CHANGED
@@ -34,7 +34,7 @@ final class PUM_Admin_Upgrade_Routine_5 extends PUM_Admin_Upgrade_Routine {
34
  *
35
  */
36
  public static function run() {
37
- if ( ! current_user_can( 'manage_options' ) ) {
38
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
39
  }
40
 
34
  *
35
  */
36
  public static function run() {
37
+ if ( ! current_user_can( PUM_Admin_Upgrades::instance()->required_cap ) ) {
38
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
39
  }
40
 
includes/admin/upgrades/class-pum-admin-upgrade-routine-6.php CHANGED
@@ -46,7 +46,7 @@ final class PUM_Admin_Upgrade_Routine_6 extends PUM_Admin_Upgrade_Routine {
46
  * Run the update.
47
  */
48
  public static function run() {
49
- if ( ! current_user_can( 'manage_options' ) ) {
50
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
51
  }
52
 
46
  * Run the update.
47
  */
48
  public static function run() {
49
+ if ( ! current_user_can( PUM_Admin_Upgrades::instance()->required_cap ) ) {
50
  wp_die( __( 'You do not have permission to do upgrades', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
51
  }
52
 
includes/class-pum-fields.php CHANGED
@@ -73,7 +73,6 @@ class PUM_Fields extends Popmake_Fields {
73
  }
74
 
75
 
76
-
77
  /**
78
  * Text Callback
79
  *
@@ -81,7 +80,7 @@ class PUM_Fields extends Popmake_Fields {
81
  *
82
  * @param array $args Arguments passed by the setting
83
  *
84
- * @return void
85
  */
86
  public function text_callback( $args, $value = '' ) {
87
 
@@ -139,7 +138,7 @@ class PUM_Fields extends Popmake_Fields {
139
  *
140
  * @param array $args Arguments passed by the setting
141
  *
142
- * @return void
143
  */
144
  public function password_callback( $args, $value = '' ) {
145
  $args['type'] = 'password';
@@ -154,7 +153,7 @@ class PUM_Fields extends Popmake_Fields {
154
  *
155
  * @param array $args Arguments passed by the setting
156
  *
157
- * @return void
158
  */
159
  public function email_callback( $args, $value = '' ) {
160
  $args['type'] = 'email';
@@ -169,7 +168,7 @@ class PUM_Fields extends Popmake_Fields {
169
  *
170
  * @param array $args Arguments passed by the setting
171
  *
172
- * @return void
173
  */
174
  public function search_callback( $args, $value = '' ) {
175
  $args['type'] = 'search';
@@ -184,7 +183,7 @@ class PUM_Fields extends Popmake_Fields {
184
  *
185
  * @param array $args Arguments passed by the setting
186
  *
187
- * @return void
188
  */
189
  public function url_callback( $args, $value = '' ) {
190
  $args['type'] = 'url';
@@ -199,7 +198,7 @@ class PUM_Fields extends Popmake_Fields {
199
  *
200
  * @param array $args Arguments passed by the setting
201
  *
202
- * @return void
203
  */
204
  public function tel_callback( $args, $value = '' ) {
205
  $args['type'] = 'tel';
@@ -214,7 +213,7 @@ class PUM_Fields extends Popmake_Fields {
214
  *
215
  * @param array $args Arguments passed by the setting
216
  *
217
- * @return void
218
  */
219
  public function number_callback( $args, $value = '' ) {
220
  $args['type'] = 'number';
@@ -229,7 +228,7 @@ class PUM_Fields extends Popmake_Fields {
229
  *
230
  * @param array $args Arguments passed by the setting
231
  *
232
- * @return void
233
  */
234
  public function range_callback( $args, $value = '' ) {
235
  $args['type'] = 'range';
@@ -282,7 +281,7 @@ class PUM_Fields extends Popmake_Fields {
282
  <label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
283
  } ?>
284
 
285
- <textarea placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" class="<?php esc_attr_e( $args['size'] ); ?>-text" id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" cols="<?php esc_attr_e( $args['cols'] ); ?>" rows="<?php esc_attr_e( $args['rows'] ); ?>" <?php if ( $args['required'] ) { echo 'required'; } ?>><?php echo esc_textarea( stripslashes( $value ) ); ?></textarea><?php
286
 
287
  if ( $args['desc'] != '' ) { ?>
288
  <label for="<?php esc_attr_e( $args['id'] ); ?>" class="pum-desc desc"><?php esc_html_e( $args['desc'] ); ?></label><?php
@@ -331,7 +330,7 @@ class PUM_Fields extends Popmake_Fields {
331
  *
332
  * @param array $args Arguments passed by the setting
333
  *
334
- * @return void
335
  */
336
  public function select_callback( $args, $value ) {
337
 
@@ -388,7 +387,7 @@ class PUM_Fields extends Popmake_Fields {
388
  <label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
389
  } ?>
390
 
391
- <select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> <?php if ( $args['required'] ) { echo 'required'; } ?>>
392
 
393
  <?php if ( ! empty( $args['options'] ) ) {
394
  foreach ( $args['options'] as $label => $option ) {
@@ -398,7 +397,7 @@ class PUM_Fields extends Popmake_Fields {
398
  } elseif( ! $multiple && $option == $value ) {
399
  $selected = 1;
400
  } ?>
401
- <option value="<?php esc_attr_e( $option ); ?>" <?php selected( 1, $selected ); ?>><?php esc_html_e( $label ); ?></option><?php
402
  }
403
  } ?>
404
 
@@ -419,7 +418,7 @@ class PUM_Fields extends Popmake_Fields {
419
  *
420
  * @param array $args Arguments passed by the setting
421
  *
422
- * @return void
423
  */
424
  public function objectselect_callback( $args, $value = null ) {
425
 
@@ -475,7 +474,7 @@ class PUM_Fields extends Popmake_Fields {
475
  <label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
476
  } ?>
477
 
478
- <select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> data-objecttype="<?php esc_attr_e( $args['object_type'] ); ?>" data-objectkey="<?php esc_attr_e( $args['object_key'] ); ?>" data-current="<?php echo maybe_json_attr( $value, true ); ?>" <?php if ( $args['required'] ) { echo 'required'; } ?>>
479
 
480
  <?php if ( ! empty( $args['options'] ) ) {
481
  foreach ( $args['options'] as $label => $option ) {
@@ -485,7 +484,7 @@ class PUM_Fields extends Popmake_Fields {
485
  } elseif( ! $multiple && $option == $value ) {
486
  $selected = 1;
487
  } ?>
488
- <option value="<?php esc_attr_e( $option ); ?>" <?php selected( 1, $selected ); ?>><?php esc_html_e( $label ); ?></option><?php
489
  }
490
  } ?>
491
 
@@ -505,7 +504,7 @@ class PUM_Fields extends Popmake_Fields {
505
  *
506
  * @param array $args Arguments passed by the setting
507
  *
508
- * @return void
509
  */
510
  public function postselect_callback( $args, $value ) {
511
 
@@ -543,7 +542,7 @@ class PUM_Fields extends Popmake_Fields {
543
  *
544
  * @param array $args Arguments passed by the setting
545
  *
546
- * @return void
547
  */
548
  public function taxonomyselect_callback( $args, $value ) {
549
 
@@ -581,7 +580,7 @@ class PUM_Fields extends Popmake_Fields {
581
  *
582
  * @param array $args Arguments passed by the setting
583
  *
584
- * @return void
585
  */
586
  public function checkbox_callback( $args, $value ) {
587
 
@@ -624,7 +623,7 @@ class PUM_Fields extends Popmake_Fields {
624
  *
625
  * @param array $args Arguments passed by the setting
626
  *
627
- * @return void
628
  */
629
  public function multicheck_callback( $args, $values = array() ) {
630
 
@@ -678,7 +677,7 @@ class PUM_Fields extends Popmake_Fields {
678
  *
679
  * @param array $args Arguments passed by the setting
680
  *
681
- * @return void
682
  */
683
  public function rangeslider_callback( $args, $value ) {
684
 
@@ -876,10 +875,8 @@ class PUM_Fields extends Popmake_Fields {
876
  * Renders hidden fields.
877
  *
878
  * @param array $args Arguments passed by the setting
879
- *
880
- * @param $value
881
- */
882
- public function hidden_templ_callback( $args, $value ) {
883
  $templ_name = $this->get_templ_name( $args, false );
884
 
885
  $class = 'pum-field-hidden pum-field-' . $args['id'];
@@ -918,13 +915,15 @@ class PUM_Fields extends Popmake_Fields {
918
  <label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
919
  } ?>
920
 
921
- <select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?>>
922
 
923
  <?php if ( ! empty( $args['options'] ) ) {
924
- foreach ( $args['options'] as $label => $option ) { ?>
925
- <option value="<?php esc_attr_e( $option ); ?>" <%= pumSelected(<?php esc_attr_e( $templ_name ); ?>, '<?php echo $option; ?>', true) %>>
926
- <?php esc_html_e( $label ); ?>
927
- </option><?php
 
 
928
  }
929
  } ?>
930
 
@@ -967,10 +966,12 @@ class PUM_Fields extends Popmake_Fields {
967
  <select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> data-objecttype="<?php esc_attr_e( $args['object_type'] ); ?>" data-objectkey="<?php esc_attr_e( $args['object_key'] ); ?>">
968
 
969
  <?php if ( ! empty( $args['options'] ) ) {
970
- foreach ( $args['options'] as $label => $option ) { ?>
971
- <option value="<?php esc_attr_e( $option ); ?>" <%= pumSelected(<?php esc_attr_e( $templ_name ); ?>, '<?php echo $option; ?>', true) %>>
972
- <?php esc_html_e( $label ); ?>
973
- </option><?php
 
 
974
  }
975
  } ?>
976
 
@@ -989,16 +990,14 @@ class PUM_Fields extends Popmake_Fields {
989
  * Renders select fields.
990
  *
991
  * @param array $args Arguments passed by the setting
992
- *
993
- * @return void
994
  */
995
- public function postselect_templ_callback( $args, $value ) {
996
 
997
  $args['object_type'] = 'post_type';
998
  $args['object_key'] = $args['post_type'];
999
  $args['class'] = ! empty( $args['class'] ) ? $args['class'] : '' . ' pum-postselect';
1000
 
1001
- $this->objectselect_templ_callback( $args, $value );
1002
 
1003
  }
1004
 
@@ -1011,13 +1010,13 @@ class PUM_Fields extends Popmake_Fields {
1011
  *
1012
  * @return void
1013
  */
1014
- public function taxonomyselect_templ_callback( $args, $value ) {
1015
 
1016
  $args['object_type'] = 'taxonomy';
1017
  $args['object_key'] = $args['taxonomy'];
1018
  $args['class'] = ! empty( $args['class'] ) ? $args['class'] : '' . ' pum-taxonomyselect';
1019
 
1020
- $this->objectselect_templ_callback( $args, $value );
1021
 
1022
  }
1023
 
73
  }
74
 
75
 
 
76
  /**
77
  * Text Callback
78
  *
80
  *
81
  * @param array $args Arguments passed by the setting
82
  *
83
+ * @param string $value
84
  */
85
  public function text_callback( $args, $value = '' ) {
86
 
138
  *
139
  * @param array $args Arguments passed by the setting
140
  *
141
+ * @param string $value
142
  */
143
  public function password_callback( $args, $value = '' ) {
144
  $args['type'] = 'password';
153
  *
154
  * @param array $args Arguments passed by the setting
155
  *
156
+ * @param string $value
157
  */
158
  public function email_callback( $args, $value = '' ) {
159
  $args['type'] = 'email';
168
  *
169
  * @param array $args Arguments passed by the setting
170
  *
171
+ * @param string $value
172
  */
173
  public function search_callback( $args, $value = '' ) {
174
  $args['type'] = 'search';
183
  *
184
  * @param array $args Arguments passed by the setting
185
  *
186
+ * @param string $value
187
  */
188
  public function url_callback( $args, $value = '' ) {
189
  $args['type'] = 'url';
198
  *
199
  * @param array $args Arguments passed by the setting
200
  *
201
+ * @param string $value
202
  */
203
  public function tel_callback( $args, $value = '' ) {
204
  $args['type'] = 'tel';
213
  *
214
  * @param array $args Arguments passed by the setting
215
  *
216
+ * @param string $value
217
  */
218
  public function number_callback( $args, $value = '' ) {
219
  $args['type'] = 'number';
228
  *
229
  * @param array $args Arguments passed by the setting
230
  *
231
+ * @param string $value
232
  */
233
  public function range_callback( $args, $value = '' ) {
234
  $args['type'] = 'range';
281
  <label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
282
  } ?>
283
 
284
+ <textarea placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" class="<?php esc_attr_e( $args['size'] ); ?>-text" id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" cols="<?php esc_attr_e( $args['cols'] ); ?>" rows="<?php esc_attr_e( $args['rows'] ); ?>" <?php if ( $args['required'] ) { echo 'required'; } ?> ><?php echo esc_textarea( stripslashes( $value ) ); ?></textarea><?php
285
 
286
  if ( $args['desc'] != '' ) { ?>
287
  <label for="<?php esc_attr_e( $args['id'] ); ?>" class="pum-desc desc"><?php esc_html_e( $args['desc'] ); ?></label><?php
330
  *
331
  * @param array $args Arguments passed by the setting
332
  *
333
+ * @param $value
334
  */
335
  public function select_callback( $args, $value ) {
336
 
387
  <label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
388
  } ?>
389
 
390
+ <select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> <?php if ( $args['required'] ) { echo 'required'; } ?> >
391
 
392
  <?php if ( ! empty( $args['options'] ) ) {
393
  foreach ( $args['options'] as $label => $option ) {
397
  } elseif( ! $multiple && $option == $value ) {
398
  $selected = 1;
399
  } ?>
400
+ <option value="<?php esc_attr_e( $option ); ?>" <?php selected( 1, $selected ); ?> ><?php esc_html_e( $label ); ?></option><?php
401
  }
402
  } ?>
403
 
418
  *
419
  * @param array $args Arguments passed by the setting
420
  *
421
+ * @param null $value
422
  */
423
  public function objectselect_callback( $args, $value = null ) {
424
 
474
  <label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
475
  } ?>
476
 
477
+ <select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> data-objecttype="<?php esc_attr_e( $args['object_type'] ); ?>" data-objectkey="<?php esc_attr_e( $args['object_key'] ); ?>" data-current="<?php echo maybe_json_attr( $value, true ); ?>" <?php if ( $args['required'] ) { echo 'required'; } ?> >
478
 
479
  <?php if ( ! empty( $args['options'] ) ) {
480
  foreach ( $args['options'] as $label => $option ) {
484
  } elseif( ! $multiple && $option == $value ) {
485
  $selected = 1;
486
  } ?>
487
+ <option value="<?php esc_attr_e( $option ); ?>" <?php selected( 1, $selected ); ?> ><?php esc_html_e( $label ); ?></option><?php
488
  }
489
  } ?>
490
 
504
  *
505
  * @param array $args Arguments passed by the setting
506
  *
507
+ * @param $value
508
  */
509
  public function postselect_callback( $args, $value ) {
510
 
542
  *
543
  * @param array $args Arguments passed by the setting
544
  *
545
+ * @param $value
546
  */
547
  public function taxonomyselect_callback( $args, $value ) {
548
 
580
  *
581
  * @param array $args Arguments passed by the setting
582
  *
583
+ * @param $value
584
  */
585
  public function checkbox_callback( $args, $value ) {
586
 
623
  *
624
  * @param array $args Arguments passed by the setting
625
  *
626
+ * @param array $values
627
  */
628
  public function multicheck_callback( $args, $values = array() ) {
629
 
677
  *
678
  * @param array $args Arguments passed by the setting
679
  *
680
+ * @param $value
681
  */
682
  public function rangeslider_callback( $args, $value ) {
683
 
875
  * Renders hidden fields.
876
  *
877
  * @param array $args Arguments passed by the setting
878
+ */
879
+ public function hidden_templ_callback( $args ) {
 
 
880
  $templ_name = $this->get_templ_name( $args, false );
881
 
882
  $class = 'pum-field-hidden pum-field-' . $args['id'];
915
  <label for="<?php esc_attr_e( $args['id'] ); ?>"><?php esc_html_e( $args['label'] ); ?></label><?php
916
  } ?>
917
 
918
+ <select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> >
919
 
920
  <?php if ( ! empty( $args['options'] ) ) {
921
+ foreach ( $args['options'] as $label => $option ) {
922
+ $option = esc_attr( $option );
923
+ $templ_name = esc_attr( $templ_name );
924
+ echo "<option value='$option' <%= pumSelected($templ_name, '$option', true) %> >";
925
+ echo esc_html( $label );
926
+ echo "</option>";
927
  }
928
  } ?>
929
 
966
  <select id="<?php esc_attr_e( $args['id'] ); ?>" name="<?php esc_attr_e( $args['name'] ); ?>" data-placeholder="<?php esc_attr_e( $args['placeholder'] ); ?>" data-allow-clear="true" <?php echo $multiple; ?> data-objecttype="<?php esc_attr_e( $args['object_type'] ); ?>" data-objectkey="<?php esc_attr_e( $args['object_key'] ); ?>">
967
 
968
  <?php if ( ! empty( $args['options'] ) ) {
969
+ foreach ( $args['options'] as $label => $option ) {
970
+ $option = esc_attr( $option );
971
+ $templ_name = esc_attr( $templ_name );
972
+ echo "<option value='$option' <%= pumSelected($templ_name, '$option', true) %> >";
973
+ echo esc_html( $label );
974
+ echo "</option>";
975
  }
976
  } ?>
977
 
990
  * Renders select fields.
991
  *
992
  * @param array $args Arguments passed by the setting
 
 
993
  */
994
+ public function postselect_templ_callback( $args ) {
995
 
996
  $args['object_type'] = 'post_type';
997
  $args['object_key'] = $args['post_type'];
998
  $args['class'] = ! empty( $args['class'] ) ? $args['class'] : '' . ' pum-postselect';
999
 
1000
+ $this->objectselect_templ_callback( $args );
1001
 
1002
  }
1003
 
1010
  *
1011
  * @return void
1012
  */
1013
+ public function taxonomyselect_templ_callback( $args ) {
1014
 
1015
  $args['object_type'] = 'taxonomy';
1016
  $args['object_key'] = $args['taxonomy'];
1017
  $args['class'] = ! empty( $args['class'] ) ? $args['class'] : '' . ' pum-taxonomyselect';
1018
 
1019
+ $this->objectselect_templ_callback( $args );
1020
 
1021
  }
1022
 
includes/class-pum-popup.php CHANGED
@@ -387,7 +387,7 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
387
  $text = apply_filters( 'popmake_popup_default_close_text', $text, $this->ID );
388
 
389
  // todo replace this with PUM_Theme class in the future.
390
- $theme_text = get_post_meta( $this->get_theme_id(), 'popup_theme_close_text', true );
391
  if ( $theme_text && $theme_text != '' ) {
392
  $text = $theme_text;
393
  }
387
  $text = apply_filters( 'popmake_popup_default_close_text', $text, $this->ID );
388
 
389
  // todo replace this with PUM_Theme class in the future.
390
+ $theme_text = popmake_get_popup_theme_close( $this->get_theme_id(), 'text', false );
391
  if ( $theme_text && $theme_text != '' ) {
392
  $text = $theme_text;
393
  }
includes/class-pum.php CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
7
 
8
  class PUM {
9
 
10
- const VER = '1.4.5';
11
 
12
  const DB_VER = 6;
13
 
7
 
8
  class PUM {
9
 
10
+ const VER = '1.4.6';
11
 
12
  const DB_VER = 6;
13
 
includes/scripts.php CHANGED
@@ -176,7 +176,7 @@ function popmake_load_admin_scripts( $hook ) {
176
 
177
  }
178
 
179
- if ( popmake_is_admin_page() || in_array( $hook, array( 'post.php', 'edit.php' ) ) || ( defined( "PUM_FORCE_ADMIN_SCRIPTS_LOAD" ) && PUM_FORCE_ADMIN_SCRIPTS_LOAD ) ) {
180
 
181
  // Deregister older versions, loaded by Types, Advanced Custom Fields etc.
182
  if ( wp_script_is( 'select2', 'registered' ) ) {
176
 
177
  }
178
 
179
+ if ( popmake_is_admin_page() || in_array( $hook, array( 'post.php', 'edit.php', 'post-new.php' ) ) || ( defined( "PUM_FORCE_ADMIN_SCRIPTS_LOAD" ) && PUM_FORCE_ADMIN_SCRIPTS_LOAD ) ) {
180
 
181
  // Deregister older versions, loaded by Types, Advanced Custom Fields etc.
182
  if ( wp_script_is( 'select2', 'registered' ) ) {
languages/popup-maker.pot CHANGED
@@ -88,51 +88,51 @@ msgstr ""
88
  msgid "Close"
89
  msgstr ""
90
 
91
- #: includes/admin/class-pum-admin-upgrades.php:105, includes/admin/class-pum-admin-upgrades.php:106, includes/admin/class-pum-admin-upgrades.php:250
92
  msgid "Popup Maker"
93
  msgstr ""
94
 
95
- #: includes/admin/class-pum-admin-upgrades.php:117, includes/admin/class-pum-admin-upgrades.php:118
96
  msgid "Popup Maker Upgrades"
97
  msgstr ""
98
 
99
- #: includes/admin/class-pum-admin-upgrades.php:242
100
  msgid "Popup Maker needs to complete a database upgrade that was previously started, click <a href=\"%s\">here</a> to resume the upgrade."
101
  msgstr ""
102
 
103
- #: includes/admin/class-pum-admin-upgrades.php:251
104
  msgid "Important"
105
  msgstr ""
106
 
107
- #: includes/admin/class-pum-admin-upgrades.php:252
108
  msgid "Database upgrades required."
109
  msgstr ""
110
 
111
- #: includes/admin/class-pum-admin-upgrades.php:254
112
  msgid "Please click %shere%s to complete these changes now."
113
  msgstr ""
114
 
115
- #: includes/admin/class-pum-admin-upgrades.php:274, includes/admin/upgrades/class-pum-admin-upgrade-routine-2.php:32, includes/admin/upgrades/class-pum-admin-upgrade-routine-3.php:43, includes/admin/upgrades/class-pum-admin-upgrade-routine-4.php:43, includes/admin/upgrades/class-pum-admin-upgrade-routine-5.php:38, includes/admin/upgrades/class-pum-admin-upgrade-routine-6.php:50
116
  msgid "You do not have permission to do upgrades"
117
  msgstr ""
118
 
119
- #: includes/admin/class-pum-admin-upgrades.php:274, includes/admin/upgrades/class-pum-admin-upgrade-routine-2.php:32, includes/admin/upgrades/class-pum-admin-upgrade-routine-3.php:43, includes/admin/upgrades/class-pum-admin-upgrade-routine-4.php:43, includes/admin/upgrades/class-pum-admin-upgrade-routine-5.php:38, includes/admin/upgrades/class-pum-admin-upgrade-routine-6.php:50, includes/plugin-updater.php:337
120
  msgid "Error"
121
  msgstr ""
122
 
123
- #: includes/admin/class-pum-admin-upgrades.php:295
124
  msgid "Upgrades have been completed successfully."
125
  msgstr ""
126
 
127
- #: includes/admin/class-pum-admin-upgrades.php:556
128
  msgid "Popup Maker - Upgrades"
129
  msgstr ""
130
 
131
- #: includes/admin/class-pum-admin-upgrades.php:571
132
  msgid "The upgrade process has started, please be patient. This could take several minutes. You will be automatically redirected when the upgrade is finished."
133
  msgstr ""
134
 
135
- #: includes/admin/class-pum-admin-upgrades.php:646
136
  msgid "Upgrade failed, please try again."
137
  msgstr ""
138
 
88
  msgid "Close"
89
  msgstr ""
90
 
91
+ #: includes/admin/class-pum-admin-upgrades.php:110, includes/admin/class-pum-admin-upgrades.php:111, includes/admin/class-pum-admin-upgrades.php:256
92
  msgid "Popup Maker"
93
  msgstr ""
94
 
95
+ #: includes/admin/class-pum-admin-upgrades.php:123, includes/admin/class-pum-admin-upgrades.php:124
96
  msgid "Popup Maker Upgrades"
97
  msgstr ""
98
 
99
+ #: includes/admin/class-pum-admin-upgrades.php:248
100
  msgid "Popup Maker needs to complete a database upgrade that was previously started, click <a href=\"%s\">here</a> to resume the upgrade."
101
  msgstr ""
102
 
103
+ #: includes/admin/class-pum-admin-upgrades.php:257
104
  msgid "Important"
105
  msgstr ""
106
 
107
+ #: includes/admin/class-pum-admin-upgrades.php:258
108
  msgid "Database upgrades required."
109
  msgstr ""
110
 
111
+ #: includes/admin/class-pum-admin-upgrades.php:260
112
  msgid "Please click %shere%s to complete these changes now."
113
  msgstr ""
114
 
115
+ #: includes/admin/class-pum-admin-upgrades.php:280, includes/admin/upgrades/class-pum-admin-upgrade-routine-2.php:32, includes/admin/upgrades/class-pum-admin-upgrade-routine-3.php:43, includes/admin/upgrades/class-pum-admin-upgrade-routine-4.php:43, includes/admin/upgrades/class-pum-admin-upgrade-routine-5.php:38, includes/admin/upgrades/class-pum-admin-upgrade-routine-6.php:50
116
  msgid "You do not have permission to do upgrades"
117
  msgstr ""
118
 
119
+ #: includes/admin/class-pum-admin-upgrades.php:280, includes/admin/upgrades/class-pum-admin-upgrade-routine-2.php:32, includes/admin/upgrades/class-pum-admin-upgrade-routine-3.php:43, includes/admin/upgrades/class-pum-admin-upgrade-routine-4.php:43, includes/admin/upgrades/class-pum-admin-upgrade-routine-5.php:38, includes/admin/upgrades/class-pum-admin-upgrade-routine-6.php:50, includes/plugin-updater.php:337
120
  msgid "Error"
121
  msgstr ""
122
 
123
+ #: includes/admin/class-pum-admin-upgrades.php:301
124
  msgid "Upgrades have been completed successfully."
125
  msgstr ""
126
 
127
+ #: includes/admin/class-pum-admin-upgrades.php:562
128
  msgid "Popup Maker - Upgrades"
129
  msgstr ""
130
 
131
+ #: includes/admin/class-pum-admin-upgrades.php:577
132
  msgid "The upgrade process has started, please be patient. This could take several minutes. You will be automatically redirected when the upgrade is finished."
133
  msgstr ""
134
 
135
+ #: includes/admin/class-pum-admin-upgrades.php:652
136
  msgid "Upgrade failed, please try again."
137
  msgstr ""
138
 
popup-maker.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://wppopupmaker.com/
5
  * Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
6
  * Author: WP Popup Maker
7
- * Version: 1.4.5
8
  * Author URI: https://wppopupmaker.com/
9
  * Text Domain: popup-maker
10
  *
@@ -144,7 +144,7 @@ if ( ! class_exists( 'Popup_Maker' ) ) :
144
  }
145
 
146
  if ( ! defined( 'POPMAKE_VERSION' ) ) {
147
- define( 'POPMAKE_VERSION', '1.4.5' );
148
  }
149
 
150
  if ( ! defined( 'POPMAKE_DB_VERSION' ) ) {
4
  * Plugin URI: https://wppopupmaker.com/
5
  * Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
6
  * Author: WP Popup Maker
7
+ * Version: 1.4.6
8
  * Author URI: https://wppopupmaker.com/
9
  * Text Domain: popup-maker
10
  *
144
  }
145
 
146
  if ( ! defined( 'POPMAKE_VERSION' ) ) {
147
+ define( 'POPMAKE_VERSION', '1.4.6' );
148
  }
149
 
150
  if ( ! defined( 'POPMAKE_DB_VERSION' ) ) {
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link:
6
  Tags: responsive popup, promotion, popover, pop-up, pop over, marketing, lightbox, advertising, conversion, modal, popup, popups
7
  Requires at least: 3.4
8
  Tested up to: 4.5
9
- Stable tag: 1.4.5
10
  License: GNU Version 3 or Any Later Version
11
 
12
  Easily create attractive popups with no coding skills. Customize nearly every aspect of your popups, from theme & position, to targeting & cookies.
@@ -22,31 +22,30 @@ It is both a complete popup solution and a powerful, extendable framework.
22
  Follow this plugin on [GitHub](https://github.com/PopupMaker/Popup-Maker).
23
 
24
  Features of Popup Maker include:
25
-
26
  * Unlimited Popups & Popup Themes
27
  * Add shortcodes, HTML optin forms or any other content you can think of.
28
  * Targeting conditions allow you to show a popup on one page or all pages of your site for precise targeting, others available as extensions.
29
  * Customize the look of your popups with no coding required.
30
- - Use Google Fonts, color pickers & sliders to customize every aspect of the popup, overlay & close buttons.
31
- - Over 60 settings available.
32
  * Triggers allow you to open your popups in various ways.
33
- - Click triggers & Auto Open / Time Delay are included.
34
- - [Exit Intent](https://wppopupmaker.com/extensions/exit-intent-popups/?utm_source=WordPress+Page&utm_medium=Features+Link&utm_campaign=Exit+Intent "Exit Intent Popups"), Scroll & others available as [extensions](https://wppopupmaker.com/extensions/?utm_source=WordPress+Page&utm_medium=Features+Link&utm_campaign=Other+Triggers+Available).
35
  * Click triggers allow you to open popups from your anything on the page that the user can click.
36
- - Trigger popups from menus, sidebars, text content, buttons, images or any other element using CSS selectors.
37
  * Cookies can be set up to trigger on many types of events.
38
- - Set your cookies when the popup opens, when the user closes it or even using JS.
39
  * Customize how & where your popup is displayed.
40
- - Size, position & animation are easily customized to suite your needs.
41
- - Easily make slide outs in the bottom corner or top banner bars.
42
  * Responsive popup sizes will make your popups resize automatically with users screen size.
43
- - Great for use with content & themes that are responsive.
44
  * Easy Shortcode builder with visual previews in the editor.
45
  * Additional functionality available via growing library of extensions.
46
  * Developer friendly with dozens of actions and filters.
47
- - Hooks, filters and a full JavaScript events API you can take basic popups to a new level.
48
  * Too many features to list here. Limitless potential.
49
- - If you can't figure out how to get the functionality your after, ask us we will be glad to help.
50
 
51
  If you like the plugin and/or support [please rate & review](https://wppopupmaker.com/rate-us?utm_source=WordPress+Page&utm_medium=Review+Link&utm_campaign=Review+It) it!
52
 
@@ -116,6 +115,10 @@ There are several common causes for this which include:
116
 
117
  == Changelog ==
118
 
 
 
 
 
119
  = v1.4.5 - 4/21/2016 =
120
  * Fix: Replaced all usage of static:: for PHP 5.2 compatiblity.
121
  * Fix: Forced the latest version of Select2 to load on Popup Maker admin pages in the case that an older version was enqueued.
6
  Tags: responsive popup, promotion, popover, pop-up, pop over, marketing, lightbox, advertising, conversion, modal, popup, popups
7
  Requires at least: 3.4
8
  Tested up to: 4.5
9
+ Stable tag: 1.4.6
10
  License: GNU Version 3 or Any Later Version
11
 
12
  Easily create attractive popups with no coding skills. Customize nearly every aspect of your popups, from theme & position, to targeting & cookies.
22
  Follow this plugin on [GitHub](https://github.com/PopupMaker/Popup-Maker).
23
 
24
  Features of Popup Maker include:
 
25
  * Unlimited Popups & Popup Themes
26
  * Add shortcodes, HTML optin forms or any other content you can think of.
27
  * Targeting conditions allow you to show a popup on one page or all pages of your site for precise targeting, others available as extensions.
28
  * Customize the look of your popups with no coding required.
29
+ * Use Google Fonts, color pickers & sliders to customize every aspect of the popup, overlay & close buttons.
30
+ * Over 60 settings available.
31
  * Triggers allow you to open your popups in various ways.
32
+ * Click triggers & Auto Open / Time Delay are included.
33
+ * [Exit Intent](https://wppopupmaker.com/extensions/exit-intent-popups/?utm_source=WordPress+Page&utm_medium=Features+Link&utm_campaign=Exit+Intent "Exit Intent Popups"), Scroll & others available as [extensions](https://wppopupmaker.com/extensions/?utm_source=WordPress+Page&utm_medium=Features+Link&utm_campaign=Other+Triggers+Available).
34
  * Click triggers allow you to open popups from your anything on the page that the user can click.
35
+ * Trigger popups from menus, sidebars, text content, buttons, images or any other element using CSS selectors.
36
  * Cookies can be set up to trigger on many types of events.
37
+ * Set your cookies when the popup opens, when the user closes it or even using JS.
38
  * Customize how & where your popup is displayed.
39
+ * Size, position & animation are easily customized to suite your needs.
40
+ * Easily make slide outs in the bottom corner or top banner bars.
41
  * Responsive popup sizes will make your popups resize automatically with users screen size.
42
+ * Great for use with content & themes that are responsive.
43
  * Easy Shortcode builder with visual previews in the editor.
44
  * Additional functionality available via growing library of extensions.
45
  * Developer friendly with dozens of actions and filters.
46
+ * Hooks, filters and a full JavaScript events API you can take basic popups to a new level.
47
  * Too many features to list here. Limitless potential.
48
+ * If you can't figure out how to get the functionality your after, ask us we will be glad to help.
49
 
50
  If you like the plugin and/or support [please rate & review](https://wppopupmaker.com/rate-us?utm_source=WordPress+Page&utm_medium=Review+Link&utm_campaign=Review+It) it!
51
 
115
 
116
  == Changelog ==
117
 
118
+ = v1.4.6 - 4/22/2016 =
119
+ * Fix: Bug in new post editor JS.
120
+ * Fix: Added filter to override permissions for upgrade routines.
121
+
122
  = v1.4.5 - 4/21/2016 =
123
  * Fix: Replaced all usage of static:: for PHP 5.2 compatiblity.
124
  * Fix: Forced the latest version of Select2 to load on Popup Maker admin pages in the case that an older version was enqueued.