Version Description
Current Version of Popup Builder is 2.4.2
Download this release
Release Info
Developer | Sygnoos |
Plugin | Popup Builder – Responsive WordPress Pop up |
Version | 2.4.3 |
Comparing to | |
See all releases |
Code changes from version 2.4.2 to 2.4.3
- classes/SGFblikePopup.php +19 -7
- classes/SGHtmlPopup.php +22 -11
- classes/SGShortcodePopup.php +21 -8
- classes/index.php +0 -0
- config.php +4 -1
- files/index.php +0 -0
- helpers/index.php +0 -0
- img/index.php +0 -0
- index.php +0 -0
- javascript/index.php +0 -0
- javascript/sg_popup_frontend.js +1 -16
- javascript/sg_popup_init.js +1 -17
- popup-builder.php +1 -1
- readme.txt +6 -0
- style/index.php +0 -0
classes/SGFblikePopup.php
CHANGED
@@ -72,6 +72,22 @@ class SGFblikePopup extends SGPopup
|
|
72 |
$this->setFblikeOptions($arr['options']);
|
73 |
}
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
protected function getExtraRenderOptions()
|
76 |
{
|
77 |
$options = json_decode($this->getFblikeOptions(), true);
|
@@ -104,19 +120,15 @@ class SGFblikePopup extends SGPopup
|
|
104 |
if($hasShortcode) {
|
105 |
|
106 |
$content = $this->improveContent($content);
|
107 |
-
$content = base64_encode($content);
|
108 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
109 |
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">".$content."</div></div>";
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
jQuery('body').append(jQuery('".$currentPopupContent."'));
|
114 |
-
});
|
115 |
-
</script>";
|
116 |
$content = ' ';
|
117 |
}
|
118 |
else {
|
119 |
-
$content =
|
120 |
}
|
121 |
|
122 |
return array('html'=>$content);
|
72 |
$this->setFblikeOptions($arr['options']);
|
73 |
}
|
74 |
|
75 |
+
/**
|
76 |
+
* Add popup data to footer
|
77 |
+
*
|
78 |
+
* @since 2.4.3
|
79 |
+
*
|
80 |
+
* @param string $currentPopupContent popup html content
|
81 |
+
*
|
82 |
+
* @return void
|
83 |
+
*
|
84 |
+
*/
|
85 |
+
|
86 |
+
public function addPopupContentToFooter($currentPopupContent) {
|
87 |
+
|
88 |
+
echo $currentPopupContent;
|
89 |
+
}
|
90 |
+
|
91 |
protected function getExtraRenderOptions()
|
92 |
{
|
93 |
$options = json_decode($this->getFblikeOptions(), true);
|
120 |
if($hasShortcode) {
|
121 |
|
122 |
$content = $this->improveContent($content);
|
|
|
123 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
124 |
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">".$content."</div></div>";
|
125 |
|
126 |
+
add_action('wp_footer', array($this, 'addPopupContentToFooter'), 100, 1);
|
127 |
+
do_action("wp_footer", $currentPopupContent);
|
|
|
|
|
|
|
128 |
$content = ' ';
|
129 |
}
|
130 |
else {
|
131 |
+
$content = trim($content);
|
132 |
}
|
133 |
|
134 |
return array('html'=>$content);
|
classes/SGHtmlPopup.php
CHANGED
@@ -47,26 +47,37 @@ class SGHtmlPopup extends SGPopup {
|
|
47 |
$this->setContent($arr['content']);
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
protected function getExtraRenderOptions() {
|
51 |
-
$content = $this->getContent();
|
52 |
$hasShortcode = $this->hasPopupContentShortcode($content);
|
53 |
-
|
54 |
if($hasShortcode) {
|
55 |
|
56 |
$content = $this->improveContent($content);
|
57 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
58 |
-
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">"
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
});
|
64 |
-
</script>";
|
65 |
$content = ' ';
|
66 |
}
|
67 |
-
else {
|
68 |
-
$content = base64_encode($content);
|
69 |
-
}
|
70 |
|
71 |
return array('html' => $content);
|
72 |
}
|
47 |
$this->setContent($arr['content']);
|
48 |
}
|
49 |
|
50 |
+
/**
|
51 |
+
* Add popup data to footer
|
52 |
+
*
|
53 |
+
* @since 2.4.3
|
54 |
+
*
|
55 |
+
* @param string $currentPopupContent popup html content
|
56 |
+
*
|
57 |
+
* @return void
|
58 |
+
*
|
59 |
+
*/
|
60 |
+
|
61 |
+
public function addPopupContentToFooter($currentPopupContent) {
|
62 |
+
|
63 |
+
echo $currentPopupContent;
|
64 |
+
}
|
65 |
+
|
66 |
protected function getExtraRenderOptions() {
|
67 |
+
$content = trim($this->getContent());
|
68 |
$hasShortcode = $this->hasPopupContentShortcode($content);
|
69 |
+
|
70 |
if($hasShortcode) {
|
71 |
|
72 |
$content = $this->improveContent($content);
|
73 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
74 |
+
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">".$content."</div></div>";
|
75 |
|
76 |
+
add_action('wp_footer', array($this, 'addPopupContentToFooter'), 100, 1);
|
77 |
+
do_action("wp_footer", $currentPopupContent);
|
78 |
+
|
|
|
|
|
79 |
$content = ' ';
|
80 |
}
|
|
|
|
|
|
|
81 |
|
82 |
return array('html' => $content);
|
83 |
}
|
classes/SGShortcodePopup.php
CHANGED
@@ -43,19 +43,32 @@ class SGShortcodePopup extends SGPopup {
|
|
43 |
|
44 |
$this->setShortcode($arr['url']);
|
45 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
protected function getExtraRenderOptions() {
|
47 |
$content = do_shortcode($this->getShortcode());
|
48 |
-
|
49 |
-
$content = base64_encode($content);
|
50 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
51 |
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">".$content."</div></div>";
|
52 |
-
|
53 |
/*Append to body for shortcode break to new line*/
|
54 |
-
|
55 |
-
|
56 |
-
jQuery('body').append(jQuery('".$currentPopupContent."'));
|
57 |
-
});
|
58 |
-
</script>";
|
59 |
|
60 |
return array('shortcode'=> ' ');
|
61 |
}
|
43 |
|
44 |
$this->setShortcode($arr['url']);
|
45 |
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Add popup data to footer
|
49 |
+
*
|
50 |
+
* @since 2.4.3
|
51 |
+
*
|
52 |
+
* @param string $currentPopupContent popup html content
|
53 |
+
*
|
54 |
+
* @return void
|
55 |
+
*
|
56 |
+
*/
|
57 |
+
|
58 |
+
public function addPopupContentToFooter($currentPopupContent) {
|
59 |
+
|
60 |
+
echo $currentPopupContent;
|
61 |
+
}
|
62 |
+
|
63 |
protected function getExtraRenderOptions() {
|
64 |
$content = do_shortcode($this->getShortcode());
|
65 |
+
|
|
|
66 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
67 |
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">".$content."</div></div>";
|
68 |
+
|
69 |
/*Append to body for shortcode break to new line*/
|
70 |
+
add_action('wp_footer', array($this, 'addPopupContentToFooter'), 100, 1);
|
71 |
+
do_action("wp_footer", $currentPopupContent);
|
|
|
|
|
|
|
72 |
|
73 |
return array('shortcode'=> ' ');
|
74 |
}
|
classes/index.php
ADDED
File without changes
|
config.php
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
2 |
|
3 |
define("SG_APP_POPUP_PATH", dirname(__FILE__));
|
4 |
define('SG_APP_POPUP_URL', plugins_url('', __FILE__));
|
@@ -9,7 +12,7 @@ define('SG_APP_POPUP_CLASSES', SG_APP_POPUP_PATH . '/classes');
|
|
9 |
define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
|
10 |
define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
|
11 |
define('SG_APP_POPUP_TABLE_LIMIT', 15);
|
12 |
-
define('SG_POPUP_VERSION', 2.
|
13 |
define('SG_POPUP_PRO_URL', 'http://popup-builder.com/');
|
14 |
define('SG_POPUP_EXTENTIONS_URL', 'http://popup-builder.com/extensions');
|
15 |
define('SG_MAILCHIMP_EXTENTION_URL', 'http://popup-builder.com/mailchimp/');
|
1 |
<?php
|
2 |
+
if (!defined( 'ABSPATH' )) {
|
3 |
+
exit();
|
4 |
+
}
|
5 |
|
6 |
define("SG_APP_POPUP_PATH", dirname(__FILE__));
|
7 |
define('SG_APP_POPUP_URL', plugins_url('', __FILE__));
|
12 |
define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
|
13 |
define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
|
14 |
define('SG_APP_POPUP_TABLE_LIMIT', 15);
|
15 |
+
define('SG_POPUP_VERSION', 2.43);
|
16 |
define('SG_POPUP_PRO_URL', 'http://popup-builder.com/');
|
17 |
define('SG_POPUP_EXTENTIONS_URL', 'http://popup-builder.com/extensions');
|
18 |
define('SG_MAILCHIMP_EXTENTION_URL', 'http://popup-builder.com/mailchimp/');
|
files/index.php
ADDED
File without changes
|
helpers/index.php
ADDED
File without changes
|
img/index.php
ADDED
File without changes
|
index.php
ADDED
File without changes
|
javascript/index.php
ADDED
File without changes
|
javascript/sg_popup_frontend.js
CHANGED
@@ -271,21 +271,6 @@ SGPopup.prototype.getPositionPercent = function(needPercent, screenDimension, di
|
|
271 |
return sgPosition;
|
272 |
}
|
273 |
|
274 |
-
SGPopup.prototype.decodeBase64 = function(s) {
|
275 |
-
if(typeof window.atob == 'function') {
|
276 |
-
return decodeURIComponent(escape(window.atob(s)));
|
277 |
-
}
|
278 |
-
|
279 |
-
var e={},i,b=0,c,x,l=0,a,r='',w=String.fromCharCode,L=s.length;
|
280 |
-
var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
281 |
-
for(i=0;i<64;i++){e[A.charAt(i)]=i;}
|
282 |
-
for(x=0;x<L;x++){
|
283 |
-
c=e[s.charAt(x)];b=(b<<6)+c;l+=6;
|
284 |
-
while(l>=8){((a=(b>>>(l-=8))&0xff)||(x<(L-2)))&&(r+=w(a));}
|
285 |
-
}
|
286 |
-
return r;
|
287 |
-
}
|
288 |
-
|
289 |
SGPopup.prototype.showPopup = function(id, isOnLoad) {
|
290 |
var that = this;
|
291 |
|
@@ -389,7 +374,7 @@ SGPopup.prototype.sgShowColorboxWithOptions = function() {
|
|
389 |
}
|
390 |
|
391 |
if(popupHtml != ' ') {
|
392 |
-
popupHtml =
|
393 |
}
|
394 |
|
395 |
if(popupHtml && popupWidth == '' && popupHeight == '' && popupMaxWidth =='' && popupMaxHeight == '') {
|
271 |
return sgPosition;
|
272 |
}
|
273 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
SGPopup.prototype.showPopup = function(id, isOnLoad) {
|
275 |
var that = this;
|
276 |
|
374 |
}
|
375 |
|
376 |
if(popupHtml != ' ') {
|
377 |
+
popupHtml = popupHtml;
|
378 |
}
|
379 |
|
380 |
if(popupHtml && popupWidth == '' && popupHeight == '' && popupMaxWidth =='' && popupMaxHeight == '') {
|
javascript/sg_popup_init.js
CHANGED
@@ -12,7 +12,7 @@ SgPopupInit.prototype.cloneToHtmlPopup = function() {
|
|
12 |
return;
|
13 |
}
|
14 |
|
15 |
-
jQuery(
|
16 |
|
17 |
this.popupResizing(currentPopupId);
|
18 |
jQuery('#sgcolorbox').bind('sgPopupCleanup', function() {
|
@@ -36,22 +36,6 @@ SgPopupInit.prototype.reopenPopupAfterSubmission = function() {
|
|
36 |
}
|
37 |
}
|
38 |
|
39 |
-
|
40 |
-
SgPopupInit.prototype.decodeBase64 = function(s) {
|
41 |
-
if(typeof window.atob == 'function') {
|
42 |
-
return decodeURIComponent(escape(window.atob(s)));
|
43 |
-
}
|
44 |
-
|
45 |
-
var e={},i,b=0,c,x,l=0,a,r='',w=String.fromCharCode,L=s.length;
|
46 |
-
var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
47 |
-
for(i=0;i<64;i++){e[A.charAt(i)]=i;}
|
48 |
-
for(x=0;x<L;x++){
|
49 |
-
c=e[s.charAt(x)];b=(b<<6)+c;l+=6;
|
50 |
-
while(l>=8){((a=(b>>>(l-=8))&0xff)||(x<(L-2)))&&(r+=w(a));}
|
51 |
-
}
|
52 |
-
return r;
|
53 |
-
}
|
54 |
-
|
55 |
SgPopupInit.prototype.popupResizing = function(currentPopupId) {
|
56 |
|
57 |
var width = this.popupData['width'];
|
12 |
return;
|
13 |
}
|
14 |
|
15 |
+
jQuery("#sgpb-all-content-"+currentPopupId).appendTo(jQuery('.sg-current-popup-'+currentPopupId));
|
16 |
|
17 |
this.popupResizing(currentPopupId);
|
18 |
jQuery('#sgcolorbox').bind('sgPopupCleanup', function() {
|
36 |
}
|
37 |
}
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
SgPopupInit.prototype.popupResizing = function(currentPopupId) {
|
40 |
|
41 |
var width = this.popupData['width'];
|
popup-builder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Popup Builder
|
4 |
* Plugin URI: http://sygnoos.com
|
5 |
* Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
|
6 |
-
* Version: 2.4.
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: http://www.sygnoos.com
|
9 |
* License: GPLv2
|
3 |
* Plugin Name: Popup Builder
|
4 |
* Plugin URI: http://sygnoos.com
|
5 |
* Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
|
6 |
+
* Version: 2.4.3
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: http://www.sygnoos.com
|
9 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -155,6 +155,12 @@ Go to the Popup Builder settings and set your desired options.
|
|
155 |
|
156 |
== Changelog ==
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
= Version 2.4.2 =
|
159 |
* Added option to open from URL. Example http://popup-builder.com/index.php?sg_popup_id=1
|
160 |
* Added option to reopen popup after any form submission.
|
155 |
|
156 |
== Changelog ==
|
157 |
|
158 |
+
= Version 2.4.3 =
|
159 |
+
* Added empty index.php file inside every directory to prevent directory listing.
|
160 |
+
* Shortcode functionality improvements.
|
161 |
+
* Prevented direct access to plugin’s php file.
|
162 |
+
* Bug fixes.
|
163 |
+
|
164 |
= Version 2.4.2 =
|
165 |
* Added option to open from URL. Example http://popup-builder.com/index.php?sg_popup_id=1
|
166 |
* Added option to reopen popup after any form submission.
|
style/index.php
ADDED
File without changes
|