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

Version Description

Download this release

Release Info

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

Code changes from version 1.7.7 to 1.7.8

classes/Site/Popups.php CHANGED
@@ -105,6 +105,9 @@ class PUM_Site_Popups {
105
  }
106
  }
107
 
 
 
 
108
  public static function preload_popup( $popup ) {
109
  // Add to the $loaded_ids list.
110
  self::$loaded_ids[] = $popup->ID;
@@ -114,7 +117,13 @@ class PUM_Site_Popups {
114
  self::$loaded->post_count ++;
115
 
116
  // Preprocess the content for shortcodes that need to enqueue their own assets.
 
 
117
  do_shortcode( $popup->post_content );
 
 
 
 
118
 
119
  // Fire off preload action.
120
  do_action( 'pum_preload_popup', $popup->ID );
105
  }
106
  }
107
 
108
+ /**
109
+ * @param $popup PUM_Model_Popup
110
+ */
111
  public static function preload_popup( $popup ) {
112
  // Add to the $loaded_ids list.
113
  self::$loaded_ids[] = $popup->ID;
117
  self::$loaded->post_count ++;
118
 
119
  // Preprocess the content for shortcodes that need to enqueue their own assets.
120
+
121
+ ob_start();
122
  do_shortcode( $popup->post_content );
123
+ ob_clean();
124
+
125
+ # TODO cache this content for later in case of double rendering causing breakage.
126
+ # TODO Use this content during rendering as well.
127
 
128
  // Fire off preload action.
129
  do_action( 'pum_preload_popup', $popup->ID );
includes/class-pum.php CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
7
 
8
  class PUM {
9
 
10
- const VER = '1.7.7';
11
 
12
  const DB_VER = 8;
13
 
7
 
8
  class PUM {
9
 
10
+ const VER = '1.7.8';
11
 
12
  const DB_VER = 8;
13
 
includes/pum-template-functions.php CHANGED
@@ -1,32 +1,90 @@
1
  <?php
2
 
 
 
 
3
  function pum_popup_ID( $popup_id = null ) {
4
- echo pum_popup( $popup_id )->ID;
 
 
 
 
 
 
5
  }
6
 
 
 
 
7
  function pum_popup_title( $popup_id = null ) {
8
  echo pum_get_popup_title( $popup_id );
9
  }
10
 
 
 
 
11
  function pum_popup_content( $popup_id = null ) {
12
- echo pum_popup( $popup_id )->get_content();
 
 
 
 
 
 
13
  }
14
 
 
 
 
15
  function pum_popup_theme_id( $popup_id = null ) {
16
- echo intval( pum_popup( $popup_id )->get_theme_id() );
 
 
 
 
 
 
17
  }
18
 
 
 
 
 
19
  function pum_popup_classes( $popup_id = null, $element = 'overlay' ) {
20
- esc_attr_e( implode( ' ', pum_popup( $popup_id )->get_classes( $element ) ) );
 
 
 
 
 
 
21
  }
22
 
 
 
 
23
  function pum_popup_data_attr( $popup_id = null ) {
24
- echo 'data-popmake="' . esc_attr( json_encode( pum_popup( $popup_id )->get_data_attr() ) ) . '"';
 
 
 
 
 
 
25
  }
26
 
27
 
 
 
 
28
  function pum_popup_close_text( $popup_id = null ) {
29
- esc_html_e( pum_popup( $popup_id )->close_text() );
 
 
 
 
 
 
30
  }
31
 
32
 
@@ -37,10 +95,16 @@ function pum_popup_close_text( $popup_id = null ) {
37
  /**
38
  * Returns true if the close button should be shown.
39
  *
40
- * @param null $popup_id
41
  *
42
  * @return bool
43
  */
44
  function pum_show_close_button( $popup_id = null ) {
45
- return boolval( pum_popup( $popup_id )->show_close_button() );
 
 
 
 
 
 
46
  }
1
  <?php
2
 
3
+ /**
4
+ * @param null|int $popup_id
5
+ */
6
  function pum_popup_ID( $popup_id = null ) {
7
+ $popup = pum_get_popup( $popup_id );
8
+
9
+ if ( ! pum_is_popup( $popup ) ) {
10
+ return;
11
+ }
12
+
13
+ echo $popup->ID;
14
  }
15
 
16
+ /**
17
+ * @param null|int $popup_id
18
+ */
19
  function pum_popup_title( $popup_id = null ) {
20
  echo pum_get_popup_title( $popup_id );
21
  }
22
 
23
+ /**
24
+ * @param null|int $popup_id
25
+ */
26
  function pum_popup_content( $popup_id = null ) {
27
+ $popup = pum_get_popup( $popup_id );
28
+
29
+ if ( ! pum_is_popup( $popup ) ) {
30
+ return;
31
+ }
32
+
33
+ echo $popup->get_content();
34
  }
35
 
36
+ /**
37
+ * @param null|int $popup_id
38
+ */
39
  function pum_popup_theme_id( $popup_id = null ) {
40
+ $popup = pum_get_popup( $popup_id );
41
+
42
+ if ( ! pum_is_popup( $popup ) ) {
43
+ return;
44
+ }
45
+
46
+ echo $popup->get_theme_id();
47
  }
48
 
49
+ /**
50
+ * @param null $popup_id
51
+ * @param string $element
52
+ */
53
  function pum_popup_classes( $popup_id = null, $element = 'overlay' ) {
54
+ $popup = pum_get_popup( $popup_id );
55
+
56
+ if ( ! pum_is_popup( $popup ) ) {
57
+ return;
58
+ }
59
+
60
+ echo esc_attr( implode( ' ', $popup->get_classes( $element ) ) );
61
  }
62
 
63
+ /**
64
+ * @param null|int $popup_id
65
+ */
66
  function pum_popup_data_attr( $popup_id = null ) {
67
+ $popup = pum_get_popup( $popup_id );
68
+
69
+ if ( ! pum_is_popup( $popup ) ) {
70
+ return;
71
+ }
72
+
73
+ echo 'data-popmake="' . esc_attr( json_encode( $popup->get_data_attr() ) ) . '"';
74
  }
75
 
76
 
77
+ /**
78
+ * @param null|int $popup_id
79
+ */
80
  function pum_popup_close_text( $popup_id = null ) {
81
+ $popup = pum_get_popup( $popup_id );
82
+
83
+ if ( ! pum_is_popup( $popup ) ) {
84
+ return;
85
+ }
86
+
87
+ echo esc_html( $popup->close_text() );
88
  }
89
 
90
 
95
  /**
96
  * Returns true if the close button should be shown.
97
  *
98
+ * @param null|int $popup_id
99
  *
100
  * @return bool
101
  */
102
  function pum_show_close_button( $popup_id = null ) {
103
+ $popup = pum_get_popup( $popup_id );
104
+
105
+ if ( ! pum_is_popup( $popup ) ) {
106
+ return true;
107
+ }
108
+
109
+ return $popup->show_close_button();
110
  }
popup-maker.php CHANGED
@@ -4,7 +4,7 @@
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
  * Author: WP Popup Maker
7
- * Version: 1.7.7
8
  * Author URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
9
  * Text Domain: popup-maker
10
  *
@@ -93,7 +93,7 @@ class Popup_Maker {
93
  /**
94
  * @var string Plugin Version
95
  */
96
- public static $VER = '1.7.7';
97
 
98
  /**
99
  * @var int DB Version
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
  * Author: WP Popup Maker
7
+ * Version: 1.7.8
8
  * Author URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
9
  * Text Domain: popup-maker
10
  *
93
  /**
94
  * @var string Plugin Version
95
  */
96
+ public static $VER = '1.7.8';
97
 
98
  /**
99
  * @var int DB Version
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link:
6
  Tags: marketing, popup, popups, optin, advertising, conversion, responsive popups, promotion, popover, pop-up, pop over, lightbox, conversion, modal
7
  Requires at least: 3.6
8
  Tested up to: 4.9.4
9
- Stable tag: 1.7.7
10
  License: GNU Version 3 or Any Later Version
11
 
12
  Everything you need to create unique user experiences. Insert forms & other content from your favorite plugins to create custom responsive popups.
@@ -101,6 +101,10 @@ There are several common causes for this which include:
101
 
102
  == Changelog ==
103
 
 
 
 
 
104
  = v1.7.7 - 03/13/2018 =
105
  * Fix: Removed jQuery.serializeJSON functionality which was unused and causing conflicts with WooCommerce.
106
  * Fix: SSL Issues due to not specifying protocol.
6
  Tags: marketing, popup, popups, optin, advertising, conversion, responsive popups, promotion, popover, pop-up, pop over, lightbox, conversion, modal
7
  Requires at least: 3.6
8
  Tested up to: 4.9.4
9
+ Stable tag: 1.7.8
10
  License: GNU Version 3 or Any Later Version
11
 
12
  Everything you need to create unique user experiences. Insert forms & other content from your favorite plugins to create custom responsive popups.
101
 
102
  == Changelog ==
103
 
104
+ = v1.7.8 - 03/13/2018 =
105
+ * Improvement: Added output buffering to early calls to do_shortcode to prevent premature output in the head.
106
+ * Improvement: Added sanity checks to make sure only valid popup objects are used in some older template functions.
107
+
108
  = v1.7.7 - 03/13/2018 =
109
  * Fix: Removed jQuery.serializeJSON functionality which was unused and causing conflicts with WooCommerce.
110
  * Fix: SSL Issues due to not specifying protocol.