Version Description
Current Version of Popup Builder is 2.6.7
Download this release
Release Info
Developer | Sygnoos |
Plugin | Popup Builder – Responsive WordPress Pop up |
Version | 2.6.7.2 |
Comparing to | |
See all releases |
Code changes from version 2.6.7 to 2.6.7.2
- config.php +2 -2
- files/options_section/pro.php +3 -0
- files/sg_popup_media_button.php +14 -8
- javascript/sg_popup_frontend.js +64 -30
- popup-builder.php +7 -2
- readme.txt +9 -0
config.php
CHANGED
@@ -24,8 +24,8 @@ if(!class_exists('SgPopupBuilderConfig')) {
|
|
24 |
define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
|
25 |
define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
|
26 |
define('SG_APP_POPUP_TABLE_LIMIT', 15);
|
27 |
-
define('SG_POPUP_VERSION', 2.
|
28 |
-
define('SG_POPUP_PRO_VERSION', 3.
|
29 |
define('SG_POPUP_PRO_URL', 'https://popup-builder.com/');
|
30 |
define('SG_POPUP_EXTENSION_URL', 'https://popup-builder.com/extensions');
|
31 |
define('SG_MAILCHIMP_EXTENSION_URL', 'https://popup-builder.com/downloads/mailchimp/');
|
24 |
define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
|
25 |
define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
|
26 |
define('SG_APP_POPUP_TABLE_LIMIT', 15);
|
27 |
+
define('SG_POPUP_VERSION', 2.671);
|
28 |
+
define('SG_POPUP_PRO_VERSION', 3.379);
|
29 |
define('SG_POPUP_PRO_URL', 'https://popup-builder.com/');
|
30 |
define('SG_POPUP_EXTENSION_URL', 'https://popup-builder.com/extensions');
|
31 |
define('SG_MAILCHIMP_EXTENSION_URL', 'https://popup-builder.com/downloads/mailchimp/');
|
files/options_section/pro.php
CHANGED
@@ -95,6 +95,9 @@
|
|
95 |
<div class="acordion-main-div-content">
|
96 |
<span class="liquid-width">start date</span><input class="popup-start-timer" type="text" name="popup-start-timer" value="<?php echo esc_attr(@$sgPopupStartTimer)?>"><br>
|
97 |
<span class="liquid-width">end date</span><input class="popup-finish-timer" type="text" name="popup-finish-timer" value="<?php echo esc_attr(@$sgPopupFinishTimer)?>"><br>
|
|
|
|
|
|
|
98 |
</div>
|
99 |
<span class="liquid-width">Schedule:</span><input class="input-width-static js-checkbox-acordion" type="checkbox" name="popup-schedule-status" <?php echo $sgPopupScheduleStatus;?>>
|
100 |
<span class="dashicons dashicons-info repeatPopup same-image-style"></span><span class="infoSelectRepeat samefontStyle">Show popup for selected date range. If current date is in selected date range then popup will appear.</span><br>
|
95 |
<div class="acordion-main-div-content">
|
96 |
<span class="liquid-width">start date</span><input class="popup-start-timer" type="text" name="popup-start-timer" value="<?php echo esc_attr(@$sgPopupStartTimer)?>"><br>
|
97 |
<span class="liquid-width">end date</span><input class="popup-finish-timer" type="text" name="popup-finish-timer" value="<?php echo esc_attr(@$sgPopupFinishTimer)?>"><br>
|
98 |
+
<div class="sgpb-time-zone-info-wrapper">
|
99 |
+
<span>Ensure that your popup time zone is setup correctly <a href="<?php echo SG_APP_POPUP_ADMIN_URL; ?>?page=popup-settings">here</a>.</span>
|
100 |
+
</div>
|
101 |
</div>
|
102 |
<span class="liquid-width">Schedule:</span><input class="input-width-static js-checkbox-acordion" type="checkbox" name="popup-schedule-status" <?php echo $sgPopupScheduleStatus;?>>
|
103 |
<span class="dashicons dashicons-info repeatPopup same-image-style"></span><span class="infoSelectRepeat samefontStyle">Show popup for selected date range. If current date is in selected date range then popup will appear.</span><br>
|
files/sg_popup_media_button.php
CHANGED
@@ -16,7 +16,7 @@ function sgPopupMediaButton()
|
|
16 |
'widgets.php'
|
17 |
);
|
18 |
|
19 |
-
|
20 |
/* For show in plugins page when package is pro */
|
21 |
if(POPUP_BUILDER_PKG !== POPUP_BUILDER_PKG_FREE) {
|
22 |
array_push($pages, "admin.php");
|
@@ -28,7 +28,7 @@ function sgPopupMediaButton()
|
|
28 |
);
|
29 |
|
30 |
if ($checkPage && $typenow != 'download') {
|
31 |
-
|
32 |
wp_enqueue_script('jquery-ui-dialog');
|
33 |
wp_register_style('sg_jQuery_ui', SG_APP_POPUP_URL . "/style/jQueryDialog/jquery-ui.css");
|
34 |
wp_enqueue_style('sg_jQuery_ui');
|
@@ -50,7 +50,9 @@ function sgpbPopupVariable()
|
|
50 |
$buttonTitle = 'Insert custom JS variable';
|
51 |
$output = '';
|
52 |
|
53 |
-
|
|
|
|
|
54 |
|
55 |
if ($currentPageParams['id'] != 'popup-builder_page_edit-popup') {
|
56 |
return '';
|
@@ -70,7 +72,9 @@ add_action('media_buttons', 'sgpbPopupVariable', 11);
|
|
70 |
|
71 |
function sgJsVariableThickbox() {
|
72 |
|
73 |
-
|
|
|
|
|
74 |
|
75 |
if($currentPageParams['id'] != 'popup-builder_page_edit-popup') {
|
76 |
return '';
|
@@ -118,7 +122,9 @@ function sgJsVariableThickbox() {
|
|
118 |
function sgPopupMediaButtonThickboxs()
|
119 |
{
|
120 |
global $pagenow, $typenow;
|
121 |
-
|
|
|
|
|
122 |
|
123 |
$showCurrentUser = SGFunctions::isShowMenuForCurrentUser();
|
124 |
if(!$showCurrentUser) {return;}
|
@@ -139,7 +145,7 @@ function sgPopupMediaButtonThickboxs()
|
|
139 |
$pagenow,
|
140 |
$pages
|
141 |
);
|
142 |
-
|
143 |
|
144 |
if ($checkPage && $typenow != 'download') :
|
145 |
$orderBy = 'id DESC';
|
@@ -156,7 +162,7 @@ function sgPopupMediaButtonThickboxs()
|
|
156 |
return;
|
157 |
}
|
158 |
var appearEvent = jQuery("#openEvent").val();
|
159 |
-
|
160 |
var selectionText = '';
|
161 |
if (typeof(tinyMCE.editors.content) != "undefined") {
|
162 |
selectionText = (tinyMCE.activeEditor.selection.getContent()) ? tinyMCE.activeEditor.selection.getContent() : '';
|
@@ -233,4 +239,4 @@ function sgPopupMediaButtonThickboxs()
|
|
233 |
}
|
234 |
|
235 |
add_action('admin_footer', 'sgPopupMediaButtonThickboxs');
|
236 |
-
add_action('admin_footer', 'sgJsVariableThickbox');
|
16 |
'widgets.php'
|
17 |
);
|
18 |
|
19 |
+
|
20 |
/* For show in plugins page when package is pro */
|
21 |
if(POPUP_BUILDER_PKG !== POPUP_BUILDER_PKG_FREE) {
|
22 |
array_push($pages, "admin.php");
|
28 |
);
|
29 |
|
30 |
if ($checkPage && $typenow != 'download') {
|
31 |
+
|
32 |
wp_enqueue_script('jquery-ui-dialog');
|
33 |
wp_register_style('sg_jQuery_ui', SG_APP_POPUP_URL . "/style/jQueryDialog/jquery-ui.css");
|
34 |
wp_enqueue_style('sg_jQuery_ui');
|
50 |
$buttonTitle = 'Insert custom JS variable';
|
51 |
$output = '';
|
52 |
|
53 |
+
require_once(ABSPATH .'wp-admin/includes/screen.php');
|
54 |
+
$currentScreen = get_current_screen();
|
55 |
+
$currentPageParams = get_object_vars($currentScreen);
|
56 |
|
57 |
if ($currentPageParams['id'] != 'popup-builder_page_edit-popup') {
|
58 |
return '';
|
72 |
|
73 |
function sgJsVariableThickbox() {
|
74 |
|
75 |
+
require_once(ABSPATH .'wp-admin/includes/screen.php');
|
76 |
+
$currentScreen = get_current_screen();
|
77 |
+
$currentPageParams = get_object_vars($currentScreen);
|
78 |
|
79 |
if($currentPageParams['id'] != 'popup-builder_page_edit-popup') {
|
80 |
return '';
|
122 |
function sgPopupMediaButtonThickboxs()
|
123 |
{
|
124 |
global $pagenow, $typenow;
|
125 |
+
require_once(ABSPATH .'wp-admin/includes/screen.php');
|
126 |
+
$currentScreen = get_current_screen();
|
127 |
+
$currentPageParams = get_object_vars($currentScreen);
|
128 |
|
129 |
$showCurrentUser = SGFunctions::isShowMenuForCurrentUser();
|
130 |
if(!$showCurrentUser) {return;}
|
145 |
$pagenow,
|
146 |
$pages
|
147 |
);
|
148 |
+
|
149 |
|
150 |
if ($checkPage && $typenow != 'download') :
|
151 |
$orderBy = 'id DESC';
|
162 |
return;
|
163 |
}
|
164 |
var appearEvent = jQuery("#openEvent").val();
|
165 |
+
|
166 |
var selectionText = '';
|
167 |
if (typeof(tinyMCE.editors.content) != "undefined") {
|
168 |
selectionText = (tinyMCE.activeEditor.selection.getContent()) ? tinyMCE.activeEditor.selection.getContent() : '';
|
239 |
}
|
240 |
|
241 |
add_action('admin_footer', 'sgPopupMediaButtonThickboxs');
|
242 |
+
add_action('admin_footer', 'sgJsVariableThickbox');
|
javascript/sg_popup_frontend.js
CHANGED
@@ -806,42 +806,77 @@ SGPopup.prototype.getSearchDataFromContent = function(content)
|
|
806 |
return collectedData;
|
807 |
};
|
808 |
|
809 |
-
SGPopup.prototype.replaceWithCustomShortcode = function(popupId)
|
|
|
810 |
var currentHtmlContent = jQuery('#sg-popup-content-wrapper-'+popupId).html();
|
811 |
var searchData = this.getSearchDataFromContent(currentHtmlContent);
|
|
|
812 |
|
813 |
-
if (searchData) {
|
814 |
-
|
815 |
-
|
816 |
-
var currentsearchData = currentSearchData['searchData'];
|
817 |
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
}
|
822 |
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
continue;
|
832 |
}
|
|
|
|
|
|
|
|
|
|
|
833 |
|
834 |
-
|
835 |
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
|
841 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
842 |
}
|
843 |
}
|
844 |
-
|
|
|
845 |
};
|
846 |
|
847 |
SGPopup.prototype.colorboxEventsListener = function ()
|
@@ -864,18 +899,17 @@ SGPopup.prototype.colorboxEventsListener = function ()
|
|
864 |
if(popupOpenSound && popupOpenSoundFile && typeof that.audio == 'undefined') {
|
865 |
that.audio = new Audio(popupOpenSoundFile);
|
866 |
}
|
867 |
-
jQuery('#sgcolorbox').
|
868 |
var popupId = args.popupId;
|
869 |
that.replaceWithCustomShortcode(popupId);
|
870 |
if(disablePageScrolling) {
|
871 |
-
jQuery('
|
872 |
}
|
873 |
});
|
874 |
|
875 |
-
jQuery('#sgcolorbox').
|
876 |
|
877 |
var popupId = args.popupId;
|
878 |
-
|
879 |
that.addToCounter(popupId);
|
880 |
|
881 |
if(that.popupData['type'] == 'html') {
|
@@ -933,9 +967,9 @@ SGPopup.prototype.colorboxEventsListener = function ()
|
|
933 |
}
|
934 |
});
|
935 |
|
936 |
-
jQuery('#sgcolorbox').
|
937 |
if(disablePageScrolling) {
|
938 |
-
jQuery('
|
939 |
}
|
940 |
if(that.popupData['type'] == 'html') {
|
941 |
that.htmlIframeFilterForOpen('close');
|
806 |
return collectedData;
|
807 |
};
|
808 |
|
809 |
+
SGPopup.prototype.replaceWithCustomShortcode = function(popupId)
|
810 |
+
{
|
811 |
var currentHtmlContent = jQuery('#sg-popup-content-wrapper-'+popupId).html();
|
812 |
var searchData = this.getSearchDataFromContent(currentHtmlContent);
|
813 |
+
var that = this;
|
814 |
|
815 |
+
if (!searchData.length) {
|
816 |
+
return false;
|
817 |
+
}
|
|
|
818 |
|
819 |
+
for (var index in searchData) {
|
820 |
+
var currentSearchData = searchData[index];
|
821 |
+
var searchAttributes = currentSearchData['searchData'];
|
|
|
822 |
|
823 |
+
if (typeof searchAttributes['selector'] == 'undefined' || typeof searchAttributes['attribute'] == 'undefined') {
|
824 |
+
that.replaceShortCode(currentSearchData['replaceString'], '');
|
825 |
+
continue;
|
826 |
+
}
|
827 |
+
|
828 |
+
try {
|
829 |
+
if (!jQuery(searchAttributes['selector']).length) {
|
830 |
+
that.replaceShortCode(currentSearchData['replaceString'], '');
|
831 |
continue;
|
832 |
}
|
833 |
+
}
|
834 |
+
catch (e) {
|
835 |
+
that.replaceShortCode(currentSearchData['replaceString'], '');
|
836 |
+
continue;
|
837 |
+
}
|
838 |
|
839 |
+
var replaceName = jQuery(searchAttributes['selector']).attr(searchAttributes['attribute']);
|
840 |
|
841 |
+
if (typeof replaceName == 'undefined') {
|
842 |
+
that.replaceShortCode(currentSearchData['replaceString'], '');
|
843 |
+
continue;
|
844 |
+
}
|
845 |
|
846 |
+
that.replaceShortCode(currentSearchData['replaceString'], replaceName);
|
847 |
+
}
|
848 |
+
};
|
849 |
+
|
850 |
+
SGPopup.prototype.replaceShortCode = function(shortCode, replaceText)
|
851 |
+
{
|
852 |
+
var popupId = parseInt(this.popupData['id']);
|
853 |
+
var popupContentWrapper = jQuery('#sg-popup-content-wrapper-'+popupId);
|
854 |
+
|
855 |
+
if (!popupContentWrapper.length) {
|
856 |
+
return false;
|
857 |
+
}
|
858 |
+
|
859 |
+
var currentHtmlContent = popupContentWrapper.contents();
|
860 |
+
|
861 |
+
if (!currentHtmlContent.length) {
|
862 |
+
return false;
|
863 |
+
}
|
864 |
+
|
865 |
+
for (var index in currentHtmlContent) {
|
866 |
+
var currentChild = currentHtmlContent[index];
|
867 |
+
var currentChildNodeValue = currentChild.nodeValue;
|
868 |
+
var currentChildNodeType = currentChild.nodeType;
|
869 |
+
|
870 |
+
if (currentChildNodeType != Node.TEXT_NODE) {
|
871 |
+
continue;
|
872 |
+
}
|
873 |
+
|
874 |
+
if (currentChildNodeValue.indexOf(shortCode) != -1) {
|
875 |
+
currentChild.nodeValue = currentChildNodeValue.replace(shortCode, replaceText);
|
876 |
}
|
877 |
}
|
878 |
+
|
879 |
+
return true;
|
880 |
};
|
881 |
|
882 |
SGPopup.prototype.colorboxEventsListener = function ()
|
899 |
if(popupOpenSound && popupOpenSoundFile && typeof that.audio == 'undefined') {
|
900 |
that.audio = new Audio(popupOpenSoundFile);
|
901 |
}
|
902 |
+
jQuery('#sgcolorbox').one("sgColorboxOnOpen", function (e, args) {
|
903 |
var popupId = args.popupId;
|
904 |
that.replaceWithCustomShortcode(popupId);
|
905 |
if(disablePageScrolling) {
|
906 |
+
jQuery('html').addClass('sgpb-disable-page-scrolling');
|
907 |
}
|
908 |
});
|
909 |
|
910 |
+
jQuery('#sgcolorbox').one("sgColorboxOnCompleate", function (e, args) {
|
911 |
|
912 |
var popupId = args.popupId;
|
|
|
913 |
that.addToCounter(popupId);
|
914 |
|
915 |
if(that.popupData['type'] == 'html') {
|
967 |
}
|
968 |
});
|
969 |
|
970 |
+
jQuery('#sgcolorbox').one("sgPopupClose", function () {
|
971 |
if(disablePageScrolling) {
|
972 |
+
jQuery('html').removeClass('sgpb-disable-page-scrolling');
|
973 |
}
|
974 |
if(that.popupData['type'] == 'html') {
|
975 |
that.htmlIframeFilterForOpen('close');
|
popup-builder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Popup Builder
|
4 |
* Plugin URI: https://popup-builder.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.6.7
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: https://sygnoos.com
|
9 |
* License: GPLv2
|
@@ -54,7 +54,12 @@ function sgPopupActivate()
|
|
54 |
update_option('SG_POPUP_VERSION', SG_POPUP_VERSION);
|
55 |
PopupInstaller::install();
|
56 |
if (POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
58 |
PopupProInstaller::install();
|
59 |
}
|
60 |
|
3 |
* Plugin Name: Popup Builder
|
4 |
* Plugin URI: https://popup-builder.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.6.7.2
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: https://sygnoos.com
|
9 |
* License: GPLv2
|
54 |
update_option('SG_POPUP_VERSION', SG_POPUP_VERSION);
|
55 |
PopupInstaller::install();
|
56 |
if (POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
57 |
+
try {
|
58 |
+
PopupProInstaller::addExtensionToPluginSection();
|
59 |
+
}
|
60 |
+
catch (Exception $e) {
|
61 |
+
echo $e->getMessage();
|
62 |
+
}
|
63 |
PopupProInstaller::install();
|
64 |
}
|
65 |
|
readme.txt
CHANGED
@@ -169,6 +169,15 @@ Go to the Popup Builder settings and set your desired options.
|
|
169 |
|
170 |
== Changelog ==
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
= Version 2.6.7 =
|
173 |
* Added new feature to use custom JS variables inside the popup.
|
174 |
* Content background issue fixed.
|
169 |
|
170 |
== Changelog ==
|
171 |
|
172 |
+
= Version 2.6.7.2 =
|
173 |
+
* Bug fixed connected to page builder plugins.
|
174 |
+
|
175 |
+
= Version 2.6.7.1 =
|
176 |
+
* Bug fixed connected custom JS variables inside the popup.
|
177 |
+
* Bug fixed connected to page scrolling when it is disabled.
|
178 |
+
* Bug fixed connected to activation and deactivation of some popup extensions.
|
179 |
+
* Bug fixed connected to get_screen function in themes where it was missing.
|
180 |
+
|
181 |
= Version 2.6.7 =
|
182 |
* Added new feature to use custom JS variables inside the popup.
|
183 |
* Content background issue fixed.
|