Version Description
Current Version of Popup Builder is 2.3.1
Download this release
Release Info
Developer | Sygnoos |
Plugin | Popup Builder – Responsive WordPress Pop up |
Version | 2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.2.9 to 2.3.1
- config.php +2 -2
- files/sg_more_plugins.php +54 -0
- files/sg_popup_ajax.php +15 -2
- files/sg_popup_create_new.php +22 -1
- files/sg_popup_save.php +6 -1
- javascript/sg_popup_frontend.js +12 -0
- javascript/sg_popup_javascript.php +2 -0
- popup-builder.php +54 -6
- readme.txt +12 -5
- style/sg_popup_style.css +39 -0
- style/sg_popup_style.php +8 -1
config.php
CHANGED
@@ -8,8 +8,8 @@ define('SG_APP_POPUP_FILES', SG_APP_POPUP_PATH . '/files');
|
|
8 |
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_TABLE_LIMIT', 15);
|
11 |
-
define('SG_POPUP_VERSION', 2.
|
12 |
-
define('SG_POPUP_PRO_URL', 'http://
|
13 |
define('SG_IP_TO_COUNTRY_SERVICE_TIMEOUT', 2);
|
14 |
define('SG_IP_TO_COUNTRY_SERVICE_URL', 'http://sygnoos.in/ip2data/?ip=');
|
15 |
define('SG_IP_TO_COUNTRY_SERVICE_TOKEN', 'd=b32e509a0c6da4147e7903f4bc0b60aa');
|
8 |
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_TABLE_LIMIT', 15);
|
11 |
+
define('SG_POPUP_VERSION', 2.31);
|
12 |
+
define('SG_POPUP_PRO_URL', 'http://popup-builder.com/');
|
13 |
define('SG_IP_TO_COUNTRY_SERVICE_TIMEOUT', 2);
|
14 |
define('SG_IP_TO_COUNTRY_SERVICE_URL', 'http://sygnoos.in/ip2data/?ip=');
|
15 |
define('SG_IP_TO_COUNTRY_SERVICE_TOKEN', 'd=b32e509a0c6da4147e7903f4bc0b60aa');
|
files/sg_more_plugins.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<div class="plugin-group" id="sg-plugins-wrapper">
|
3 |
+
<div class="plugin-card" onclick="window.open('https://wordpress.org/plugins/pricing-table-builder/')">
|
4 |
+
<div class="plugin-card-top">
|
5 |
+
<a href="https://wordpress.org/plugins/pricing-table-builder/" target="_blank" class="plugin-icon"><style type="text/css">#plugin-icon-pricing-table-builder { width:128px; height:128px; background-image: url(//ps.w.org/pricing-table-builder/assets/icon-128x128.png?rev=1414780); background-size:128px 128px; }</style><div class="plugin-icon" id="plugin-icon-pricing-table-builder" style="float:left; margin: 3px 6px 6px 0px;"></div></a>
|
6 |
+
<div class="name column-name">
|
7 |
+
<h4><a href="https://wordpress.org/plugins/pricing-table-builder/" target="_blank">Pricing Table Builder</a></h4>
|
8 |
+
</div>
|
9 |
+
<div class="desc column-description">
|
10 |
+
<p>Pricing Table Builder will allow you to create awesome pricing tables for your site/blog. Responsive Pricing Table By Sygnoos.</p>
|
11 |
+
<div class="column-compatibility"><span class="compatibility-compatible"><strong>Compatible</strong> with your version of WordPress</span></div>
|
12 |
+
</div>
|
13 |
+
</div>
|
14 |
+
</div>
|
15 |
+
|
16 |
+
<div class="plugin-card" onclick="window.open('https://wordpress.org/plugins/backup/')">
|
17 |
+
<div class="plugin-card-top">
|
18 |
+
<a href="https://wordpress.org/plugins/backup/" target="_blank" class="plugin-icon"><style type="text/css">#plugin-icon-backup { width:128px; height:128px; background-image: url(//ps.w.org/backup/assets/icon-128x128.png?rev=1293306); background-size:128px 128px; }</style><div class="plugin-icon" id="plugin-icon-backup" style="float:left; margin: 3px 6px 6px 0px;"></div></a>
|
19 |
+
<div class="name column-name">
|
20 |
+
<h4><a href="https://wordpress.org/plugins/backup/" target="_blank">Backup Guard</a></h4>
|
21 |
+
</div>
|
22 |
+
<div class="desc column-description">
|
23 |
+
<p>Backup Guard for WordPress is the best backup choice for WordPress based websites or blogs.</p>
|
24 |
+
<div class="column-compatibility"><span class="compatibility-compatible"><strong>Compatible</strong> with your version of WordPress</span></div>
|
25 |
+
</div>
|
26 |
+
</div>
|
27 |
+
</div>
|
28 |
+
|
29 |
+
<div class="plugin-card">
|
30 |
+
<div class="plugin-card-top" onclick="window.open('https://wordpress.org/plugins/social-media-builder/')">
|
31 |
+
<a href="https://wordpress.org/plugins/social-media-builder/" class="plugin-icon" target="_blank"><style type="text/css">#plugin-icon-social-media-builder { width:128px; height:128px; background-image: url(//ps.w.org/social-media-builder/assets/icon-128x128.png?rev=1315835); background-size:128px 128px; }</style><div class="plugin-icon" id="plugin-icon-social-media-builder" style="float:left; margin: 3px 6px 6px 0px;"></div></a>
|
32 |
+
<div class="name column-name">
|
33 |
+
<h4><a href="https://wordpress.org/plugins/social-media-builder/" target="_blank">Social</a></h4>
|
34 |
+
</div>
|
35 |
+
<div class="desc column-description">
|
36 |
+
<p>Social plugin provides you with many social networks, effects, dozens of themes and many other awesome options to make your page more shareable.</p>
|
37 |
+
<div class="column-compatibility"><span class="compatibility-compatible"><strong>Compatible</strong> with your version of WordPress</span></div>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<div class="plugin-card" onclick="window.open('https://wordpress.org/plugins/review-builder/')">
|
43 |
+
<div class="plugin-card-top">
|
44 |
+
<a href="https://wordpress.org/plugins/review-builder/" target="_blank" class="plugin-icon"><style type="text/css">#plugin-icon-review-builder { width:128px; height:128px; background-image: url(//ps.w.org/review-builder/assets/icon-128x128.jpg?rev=1430387); background-size:128px 128px; }</style><div class="plugin-icon" id="plugin-icon-review-builder" style="float:left; margin: 3px 6px 6px 0px;"></div></a>
|
45 |
+
<div class="name column-name">
|
46 |
+
<h4><a href="https://wordpress.org/plugins/review-builder/" target="_blank">Review</a></h4>
|
47 |
+
</div>
|
48 |
+
<div class="desc column-description">
|
49 |
+
<p>Review Builder will allow you to add reviews section to your site. Build a reviews section so customers can leave reviews for your products.</p>
|
50 |
+
<div class="column-compatibility"><span class="compatibility-compatible"><strong>Compatible</strong> with your version of WordPress</span></div>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
</div>
|
files/sg_popup_ajax.php
CHANGED
@@ -44,10 +44,23 @@ function sgContactForm()
|
|
44 |
$userMessage = $params['content-message'];
|
45 |
$mail = $params['contact-email'];
|
46 |
|
|
|
47 |
$message = '';
|
48 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
$message .= '<b>E-mail</b>: '.$mail."<br>";
|
50 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
$message .= '<b>Message</b>: '.$userMessage."<br>";
|
52 |
$headers = 'MIME-Version: 1.0'."\r\n";
|
53 |
$headers = 'From: '.$adminMail.''."\r\n";
|
44 |
$userMessage = $params['content-message'];
|
45 |
$mail = $params['contact-email'];
|
46 |
|
47 |
+
|
48 |
$message = '';
|
49 |
+
if(isset($name)) {
|
50 |
+
if($name == '') {
|
51 |
+
$name = 'Not provided';
|
52 |
+
}
|
53 |
+
$message .= '<b>Name</b>: '.$name."<br>";
|
54 |
+
}
|
55 |
+
|
56 |
$message .= '<b>E-mail</b>: '.$mail."<br>";
|
57 |
+
if(isset($subject)) {
|
58 |
+
if($subject == '') {
|
59 |
+
$subject = 'Not provided';
|
60 |
+
}
|
61 |
+
$message .= '<b>Subject</b>: '.$subject."<br>";
|
62 |
+
}
|
63 |
+
|
64 |
$message .= '<b>Message</b>: '.$userMessage."<br>";
|
65 |
$headers = 'MIME-Version: 1.0'."\r\n";
|
66 |
$headers = 'From: '.$adminMail.''."\r\n";
|
files/sg_popup_create_new.php
CHANGED
@@ -192,7 +192,12 @@
|
|
192 |
$sgSubsTextBorderWidth = @$subscriptionOptions['subs-text-border-width'];
|
193 |
$contactFormOptions = json_decode(@$params, true);
|
194 |
$sgContactNameLabel = @$contactFormOptions['contact-name'];
|
|
|
|
|
|
|
195 |
$sgContactSubjectLabel = @$contactFormOptions['contact-subject'];
|
|
|
|
|
196 |
$sgContactEmailLabel = @$contactFormOptions['contact-email'];
|
197 |
$sgContactMessageLabel = @$contactFormOptions['contact-message'];
|
198 |
$sgContactValidationMessage = @$contactFormOptions['contact-validation-message'];
|
@@ -287,7 +292,7 @@
|
|
287 |
'popup-timer-status' => false,
|
288 |
'countdown-position' => true,
|
289 |
'time-zone' => 'Etc/GMT',
|
290 |
-
'due-date' => date('M d
|
291 |
'popup-start-timer' => date('M d Y'),
|
292 |
'exit-intent-type' => "soft",
|
293 |
'exit-intent-expire-time' => '1',
|
@@ -312,6 +317,11 @@
|
|
312 |
'subs-validation-message' => 'This field is required.',
|
313 |
'subs-btn-progress-title' => 'Please wait...',
|
314 |
'contact-name' => 'Name *',
|
|
|
|
|
|
|
|
|
|
|
315 |
'contact-email' => 'E-mail *',
|
316 |
'contact-message' => 'Message *',
|
317 |
'contact-subject' => 'Subject *',
|
@@ -354,6 +364,11 @@
|
|
354 |
$allPosts = $popupProDefaultValues['allPosts'];
|
355 |
$allPagesStatus = sgBoolToChecked($popupProDefaultValues['allPagesStatus']);
|
356 |
$allPostsStatus = sgBoolToChecked($popupProDefaultValues['allPostsStatus']);
|
|
|
|
|
|
|
|
|
|
|
357 |
$onceExpiresTime = $popupProDefaultValues['onceExpiresTime'];
|
358 |
$popupAppearNumberLimit = $popupProDefaultValues['popup-appear-number-limit'];
|
359 |
$countryStatus = sgBoolToChecked($popupProDefaultValues['countryStatus']);
|
@@ -462,6 +477,12 @@
|
|
462 |
$sgSubsLastNameStatus = @sgSetChecked($sgSubsLastNameStatus, $subsLastNameStatus);
|
463 |
$sgSubsFirstNameStatus = @sgSetChecked($sgSubsFirstNameStatus, $subsFirstNameStatus);
|
464 |
$sgCountryStatus = @sgSetChecked($sgCountryStatus, $countryStatus);
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
|
466 |
function sgSetChecked($optionsParam,$defaultOption)
|
467 |
{
|
192 |
$sgSubsTextBorderWidth = @$subscriptionOptions['subs-text-border-width'];
|
193 |
$contactFormOptions = json_decode(@$params, true);
|
194 |
$sgContactNameLabel = @$contactFormOptions['contact-name'];
|
195 |
+
$sgContactNameStatus = @$contactFormOptions['contact-name-status'];
|
196 |
+
$sgShowFormToTop = @$contactFormOptions['show-form-to-top'];
|
197 |
+
$sgContactNameRequired = @$contactFormOptions['contact-name-required'];
|
198 |
$sgContactSubjectLabel = @$contactFormOptions['contact-subject'];
|
199 |
+
$sgContactSubjectStatus = @$contactFormOptions['contact-subject-status'];
|
200 |
+
$sgContactSubjectRequired = @$contactFormOptions['contact-subject-required'];
|
201 |
$sgContactEmailLabel = @$contactFormOptions['contact-email'];
|
202 |
$sgContactMessageLabel = @$contactFormOptions['contact-message'];
|
203 |
$sgContactValidationMessage = @$contactFormOptions['contact-validation-message'];
|
292 |
'popup-timer-status' => false,
|
293 |
'countdown-position' => true,
|
294 |
'time-zone' => 'Etc/GMT',
|
295 |
+
'due-date' => date('M d y H:i', strtotime(' +1 day')),
|
296 |
'popup-start-timer' => date('M d Y'),
|
297 |
'exit-intent-type' => "soft",
|
298 |
'exit-intent-expire-time' => '1',
|
317 |
'subs-validation-message' => 'This field is required.',
|
318 |
'subs-btn-progress-title' => 'Please wait...',
|
319 |
'contact-name' => 'Name *',
|
320 |
+
'contact-name-required' => true,
|
321 |
+
'contact-name-status' => true,
|
322 |
+
'show-form-to-top' => false,
|
323 |
+
'contact-subject-status' => true,
|
324 |
+
'contact-subject-required' => true,
|
325 |
'contact-email' => 'E-mail *',
|
326 |
'contact-message' => 'Message *',
|
327 |
'contact-subject' => 'Subject *',
|
364 |
$allPosts = $popupProDefaultValues['allPosts'];
|
365 |
$allPagesStatus = sgBoolToChecked($popupProDefaultValues['allPagesStatus']);
|
366 |
$allPostsStatus = sgBoolToChecked($popupProDefaultValues['allPostsStatus']);
|
367 |
+
$contactNameStatus = sgBoolToChecked($popupProDefaultValues['contact-name-status']);
|
368 |
+
$showFormToTop = sgBoolToChecked($popupProDefaultValues['show-form-to-top']);
|
369 |
+
$contactNameRequired = sgBoolToChecked($popupProDefaultValues['contact-name-required']);
|
370 |
+
$contactSubjectStatus = sgBoolToChecked($popupProDefaultValues['contact-subject-status']);
|
371 |
+
$contactSubjectRequired = sgBoolToChecked($popupProDefaultValues['contact-subject-required']);
|
372 |
$onceExpiresTime = $popupProDefaultValues['onceExpiresTime'];
|
373 |
$popupAppearNumberLimit = $popupProDefaultValues['popup-appear-number-limit'];
|
374 |
$countryStatus = sgBoolToChecked($popupProDefaultValues['countryStatus']);
|
477 |
$sgSubsLastNameStatus = @sgSetChecked($sgSubsLastNameStatus, $subsLastNameStatus);
|
478 |
$sgSubsFirstNameStatus = @sgSetChecked($sgSubsFirstNameStatus, $subsFirstNameStatus);
|
479 |
$sgCountryStatus = @sgSetChecked($sgCountryStatus, $countryStatus);
|
480 |
+
/* Contact popup otions */
|
481 |
+
$sgContactNameStatus = @sgSetChecked($sgContactNameStatus, $contactNameStatus);
|
482 |
+
$sgContactNameRequired = @sgSetChecked($sgContactNameRequired, $contactNameRequired);
|
483 |
+
$sgContactSubjectStatus = @sgSetChecked($sgContactSubjectStatus, $contactSubjectStatus);
|
484 |
+
$sgContactSubjectRequired = @sgSetChecked($sgContactSubjectRequired, $contactSubjectRequired);
|
485 |
+
$sgShowFormToTop = @sgSetChecked($sgShowFormToTop, $showFormToTop);
|
486 |
|
487 |
function sgSetChecked($optionsParam,$defaultOption)
|
488 |
{
|
files/sg_popup_save.php
CHANGED
@@ -126,7 +126,11 @@ function sgPopupSave()
|
|
126 |
|
127 |
$contactFormOptions = array(
|
128 |
'contact-name' => sgSanitize('contact-name'),
|
|
|
|
|
129 |
'contact-subject' => sgSanitize('contact-subject'),
|
|
|
|
|
130 |
'contact-email' => sgSanitize('contact-email'),
|
131 |
'contact-message' => sgSanitize('contact-message'),
|
132 |
'contact-validation-message' => sgSanitize('contact-validation-message'),
|
@@ -149,7 +153,8 @@ function sgPopupSave()
|
|
149 |
'sg-contact-resize' => sgSanitize('sg-contact-resize'),
|
150 |
'contact-validate-email' => sgSanitize('contact-validate-email'),
|
151 |
'contact-receive-email' => sgSanitize('contact-receive-email'),
|
152 |
-
'contact-fail-message' => sgSanitize('contact-fail-message')
|
|
|
153 |
);
|
154 |
|
155 |
$fblikeOptions = array(
|
126 |
|
127 |
$contactFormOptions = array(
|
128 |
'contact-name' => sgSanitize('contact-name'),
|
129 |
+
'contact-name-status' => sgSanitize('contact-name-status'),
|
130 |
+
'contact-name-required' => sgSanitize('contact-name-required'),
|
131 |
'contact-subject' => sgSanitize('contact-subject'),
|
132 |
+
'contact-subject-status' => sgSanitize('contact-subject-status'),
|
133 |
+
'contact-subject-required' => sgSanitize('contact-subject-required'),
|
134 |
'contact-email' => sgSanitize('contact-email'),
|
135 |
'contact-message' => sgSanitize('contact-message'),
|
136 |
'contact-validation-message' => sgSanitize('contact-validation-message'),
|
153 |
'sg-contact-resize' => sgSanitize('sg-contact-resize'),
|
154 |
'contact-validate-email' => sgSanitize('contact-validate-email'),
|
155 |
'contact-receive-email' => sgSanitize('contact-receive-email'),
|
156 |
+
'contact-fail-message' => sgSanitize('contact-fail-message'),
|
157 |
+
'show-form-to-top' => sgSanitize('show-form-to-top')
|
158 |
);
|
159 |
|
160 |
$fblikeOptions = array(
|
javascript/sg_popup_frontend.js
CHANGED
@@ -36,6 +36,15 @@ SGPopup.prototype.init = function() {
|
|
36 |
that.showPopup(sgPopupID,false);
|
37 |
});
|
38 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
SGPopup.prototype.onCompleate = function() {
|
@@ -103,6 +112,9 @@ SGPopup.prototype.showPopup = function(id, isOnLoad) {
|
|
103 |
var that = this;
|
104 |
|
105 |
this.popupData = SG_POPUP_DATA[id];
|
|
|
|
|
|
|
106 |
this.isOnLoad = isOnLoad;
|
107 |
this.openOnce = this.varToBool(this.popupData['repeatPopup']);
|
108 |
this.numberLimit = this.popupData['popup-appear-number-limit'];
|
36 |
that.showPopup(sgPopupID,false);
|
37 |
});
|
38 |
});
|
39 |
+
|
40 |
+
/* When user set popup by class name */
|
41 |
+
jQuery("[class*='sg-popup-id-']").each(function() {
|
42 |
+
jQuery(this).bind("click", function() {
|
43 |
+
var className = jQuery(this).attr("class");
|
44 |
+
var sgPopupID = className.split("sg-popup-id-")['1'];
|
45 |
+
that.showPopup(sgPopupID,false);
|
46 |
+
})
|
47 |
+
});
|
48 |
}
|
49 |
|
50 |
SGPopup.prototype.onCompleate = function() {
|
112 |
var that = this;
|
113 |
|
114 |
this.popupData = SG_POPUP_DATA[id];
|
115 |
+
if(typeof this.popupData == "undefined") {
|
116 |
+
return;
|
117 |
+
}
|
118 |
this.isOnLoad = isOnLoad;
|
119 |
this.openOnce = this.varToBool(this.popupData['repeatPopup']);
|
120 |
this.numberLimit = this.popupData['popup-appear-number-limit'];
|
javascript/sg_popup_javascript.php
CHANGED
@@ -42,6 +42,8 @@ function sg_popup_admin_scripts($hook) {
|
|
42 |
wp_enqueue_script('sg_social_backend');
|
43 |
}
|
44 |
if(POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
|
|
|
|
45 |
wp_enqueue_script('jquery-ui-datepicker');
|
46 |
wp_enqueue_script( 'sg_libs_handle', plugins_url('javascript/sg_datapickers.js',dirname(__FILE__)), array('wp-color-picker'));
|
47 |
wp_register_script('sg_popup_pro', SG_APP_POPUP_URL . '/javascript/sg_popup_backend_pro.js');
|
42 |
wp_enqueue_script('sg_social_backend');
|
43 |
}
|
44 |
if(POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
45 |
+
wp_register_script('datetimepicker', SG_APP_POPUP_URL . '/javascript/jquery.datetimepicker.full.min.js');
|
46 |
+
wp_enqueue_script('datetimepicker');
|
47 |
wp_enqueue_script('jquery-ui-datepicker');
|
48 |
wp_enqueue_script( 'sg_libs_handle', plugins_url('javascript/sg_datapickers.js',dirname(__FILE__)), array('wp-color-picker'));
|
49 |
wp_register_script('sg_popup_pro', SG_APP_POPUP_URL . '/javascript/sg_popup_backend_pro.js');
|
popup-builder.php
CHANGED
@@ -3,13 +3,12 @@
|
|
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.
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: http://www.sygnoos.com
|
9 |
* License: GPLv2
|
10 |
*/
|
11 |
|
12 |
-
|
13 |
require_once(dirname(__FILE__)."/config.php");
|
14 |
|
15 |
require_once(SG_APP_POPUP_CLASSES .'/SGPopup.php');
|
@@ -67,6 +66,7 @@ function sgAddMenu()
|
|
67 |
if (POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_SILVER) {
|
68 |
add_submenu_page("PopupBuilder", "Subscribers", "Subscribers", 'manage_options', "subscribers", "sgSubscribers");
|
69 |
}
|
|
|
70 |
}
|
71 |
|
72 |
function sgPopupMenu()
|
@@ -89,6 +89,10 @@ function sgSubscribers()
|
|
89 |
require_once( SG_APP_POPUP_FILES . '/sg_subscribers.php');
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
92 |
function sgRegisterScripts()
|
93 |
{
|
94 |
SGPopup::$registeredScripts = true;
|
@@ -111,6 +115,17 @@ function sgRegisterScripts()
|
|
111 |
wp_register_script('sg_popup_queue', SG_APP_POPUP_URL . '/javascript/sg_popup_queue.js');
|
112 |
wp_enqueue_script('sg_popup_queue');
|
113 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
}
|
115 |
|
116 |
function sgRenderPopupScript($id)
|
@@ -148,7 +163,7 @@ function sgFindPopupData($id)
|
|
148 |
}
|
149 |
|
150 |
echo "<script type='text/javascript'>";
|
151 |
-
echo
|
152 |
echo "</script>";
|
153 |
}
|
154 |
|
@@ -173,7 +188,11 @@ function sgShowShortCode($args, $content)
|
|
173 |
if(!isset($args['event'])) {
|
174 |
$eventName = 'click';
|
175 |
}
|
176 |
-
|
|
|
|
|
|
|
|
|
177 |
}
|
178 |
else {
|
179 |
/* Free user does not have QUEUE possibility */
|
@@ -201,7 +220,7 @@ function sgShowShortCode($args, $content)
|
|
201 |
}
|
202 |
$shortcodeContent = ob_get_contents();
|
203 |
ob_end_clean();
|
204 |
-
return $shortcodeContent;
|
205 |
}
|
206 |
add_shortCode('sg_popup', 'sgShowShortCode');
|
207 |
|
@@ -277,12 +296,35 @@ function redenderScriptMode($popupId)
|
|
277 |
sgRenderPopupOpen($popupId);
|
278 |
}
|
279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
function sgOnloadPopup()
|
281 |
{
|
282 |
$page = get_queried_object_id();
|
283 |
$popup = "sg_promotional_popup";
|
284 |
-
|
285 |
$popupId = SGPopup::getPagePopupId($page, $popup);
|
|
|
|
|
286 |
|
287 |
if(get_option("SG_ALL_PAGES") && (is_page() || is_home() || is_front_page())) {
|
288 |
showPopupInPage(get_option("SG_ALL_PAGES"));
|
@@ -325,6 +367,12 @@ function sgOnloadPopup()
|
|
325 |
if($popupId != 0) {
|
326 |
showPopupInPage($popupId);
|
327 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
return false;
|
329 |
}
|
330 |
|
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.3.1
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: http://www.sygnoos.com
|
9 |
* License: GPLv2
|
10 |
*/
|
11 |
|
|
|
12 |
require_once(dirname(__FILE__)."/config.php");
|
13 |
|
14 |
require_once(SG_APP_POPUP_CLASSES .'/SGPopup.php');
|
66 |
if (POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_SILVER) {
|
67 |
add_submenu_page("PopupBuilder", "Subscribers", "Subscribers", 'manage_options', "subscribers", "sgSubscribers");
|
68 |
}
|
69 |
+
add_submenu_page("PopupBuilder", "More plugins", "More plugins", 'manage_options', "more-plugins", "showMorePlugins");
|
70 |
}
|
71 |
|
72 |
function sgPopupMenu()
|
89 |
require_once( SG_APP_POPUP_FILES . '/sg_subscribers.php');
|
90 |
}
|
91 |
|
92 |
+
function showMorePlugins() {
|
93 |
+
require_once( SG_APP_POPUP_FILES . '/sg_more_plugins.php');
|
94 |
+
}
|
95 |
+
|
96 |
function sgRegisterScripts()
|
97 |
{
|
98 |
SGPopup::$registeredScripts = true;
|
115 |
wp_register_script('sg_popup_queue', SG_APP_POPUP_URL . '/javascript/sg_popup_queue.js');
|
116 |
wp_enqueue_script('sg_popup_queue');
|
117 |
}
|
118 |
+
/* For ajax case */
|
119 |
+
if (defined( 'DOING_AJAX' ) && DOING_AJAX) {
|
120 |
+
wp_print_scripts('sg_popup_frontend');
|
121 |
+
wp_print_scripts('sg_colorbox');
|
122 |
+
wp_print_scripts('sg_popup_support_plugins');
|
123 |
+
wp_print_scripts('sgPopupPro');
|
124 |
+
wp_print_scripts('sg_cookie');
|
125 |
+
wp_print_scripts('sg_popup_queue');
|
126 |
+
wp_print_scripts('sg_animate');
|
127 |
+
wp_print_scripts('sg_popup_init');
|
128 |
+
}
|
129 |
}
|
130 |
|
131 |
function sgRenderPopupScript($id)
|
163 |
}
|
164 |
|
165 |
echo "<script type='text/javascript'>";
|
166 |
+
echo @$content;
|
167 |
echo "</script>";
|
168 |
}
|
169 |
|
188 |
if(!isset($args['event'])) {
|
189 |
$eventName = 'click';
|
190 |
}
|
191 |
+
if(isset($args["wrap"])) {
|
192 |
+
echo "<".$args["wrap"]." class='sg-show-popup' data-sgpopupid=".@$args['id']." $attr data-popup-event=".$eventName.">".$content."</".$args["wrap"]." >";
|
193 |
+
} else {
|
194 |
+
echo "<a href='javascript:void(0)' class='sg-show-popup' data-sgpopupid=".@$args['id']." $attr data-popup-event=".$eventName.">".$content."</a>";
|
195 |
+
}
|
196 |
}
|
197 |
else {
|
198 |
/* Free user does not have QUEUE possibility */
|
220 |
}
|
221 |
$shortcodeContent = ob_get_contents();
|
222 |
ob_end_clean();
|
223 |
+
return do_shortcode($shortcodeContent);
|
224 |
}
|
225 |
add_shortCode('sg_popup', 'sgShowShortCode');
|
226 |
|
296 |
sgRenderPopupOpen($popupId);
|
297 |
}
|
298 |
|
299 |
+
function getPopupIdInPageByClass($pageId) {
|
300 |
+
$content = get_post($pageId)->post_content;
|
301 |
+
/* get current page content */
|
302 |
+
$contents = apply_filters ("the_content",$content);
|
303 |
+
$popupsID = array();
|
304 |
+
|
305 |
+
preg_match_all("/sg-popup-id-+[0-9]+/i", $content, $matchers);
|
306 |
+
/* when popup doesn't exist */
|
307 |
+
if(empty($matchers['0'])) {
|
308 |
+
return $popupsID;
|
309 |
+
}
|
310 |
+
foreach ($matchers['0'] as $value) {
|
311 |
+
$ids = explode("sg-popup-id-", $value);
|
312 |
+
$id = @$ids[1];
|
313 |
+
if(!empty($id)) {
|
314 |
+
array_push($popupsID, $id);
|
315 |
+
}
|
316 |
+
}
|
317 |
+
return $popupsID;
|
318 |
+
}
|
319 |
+
|
320 |
function sgOnloadPopup()
|
321 |
{
|
322 |
$page = get_queried_object_id();
|
323 |
$popup = "sg_promotional_popup";
|
324 |
+
/* If popup is set on page load */
|
325 |
$popupId = SGPopup::getPagePopupId($page, $popup);
|
326 |
+
/* get all popups id which set in current page by class */
|
327 |
+
$popupsIdByClass = getPopupIdInPageByClass($page);
|
328 |
|
329 |
if(get_option("SG_ALL_PAGES") && (is_page() || is_home() || is_front_page())) {
|
330 |
showPopupInPage(get_option("SG_ALL_PAGES"));
|
367 |
if($popupId != 0) {
|
368 |
showPopupInPage($popupId);
|
369 |
}
|
370 |
+
|
371 |
+
if(!empty($popupsIdByClass)) {
|
372 |
+
foreach ($popupsIdByClass as $popupId) {
|
373 |
+
sgRenderPopupScript($popupId);
|
374 |
+
}
|
375 |
+
}
|
376 |
return false;
|
377 |
}
|
378 |
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Plugin Name: Popup Builder
|
3 |
Contributors: Sygnoos, Popup By Sygnoos
|
4 |
Author: Sygnoos
|
5 |
-
Donate link: http://
|
6 |
Tags: popup, ads, modal, responsive popup, fancybox, lightbox, youtube, video popup, iframe popup, vimeo, contact form, html popup, social popup, age restriction, countdown, facebook, subscription popup, exit intent popup
|
7 |
Requires at least: 3.8
|
8 |
-
Tested up to: 4.5.
|
9 |
Stable tag: trunk
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -85,7 +85,7 @@ With popup builder plugin you can insert any type of content, right into your Po
|
|
85 |
* Popup showing frequency - you can select how many times you want the popup be shown to the same user. This means, you can make the popup appear for 3 times, for example, to the same user.
|
86 |
|
87 |
|
88 |
-
<a href="http://
|
89 |
<div>
|
90 |
Customizing the look and feel of the popup is as important as the content itself. That's why Popup Builder gives you the ability tu customize the timings, effects, position and size of the popup to your needs.
|
91 |
</div>
|
@@ -134,6 +134,13 @@ Go to the Popup Builder settings and set your desired options.
|
|
134 |
|
135 |
== Changelog ==
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
= Version 2.2.9 =
|
138 |
* Bug fixed connected to redirection on popup click.
|
139 |
|
@@ -342,7 +349,7 @@ You can select "Use active URL" and the current page URL will be shared.
|
|
342 |
|
343 |
**Why should I buy the PRO package?**
|
344 |
|
345 |
-
The Free version of Popup Builder gives you anything you need for creating unlimited fully functional popups and insert them wherever you want. Our PRO package gives you the ability to create more specific popups, like iframe, video or shortcode popups. Also, advanced options will be available for you to disable popup closing, disable popup for mobile devices, show the popup only once, and many other features. So if you need these advanced popups and functionalities, get Popup Builder PRO <a href="http://
|
346 |
|
347 |
**Can I create a popup and make it invisible for some countries? (PRO)**
|
348 |
|
@@ -363,7 +370,7 @@ Leave us a good review :)
|
|
363 |
|
364 |
== Upgrade Notice ==
|
365 |
|
366 |
-
Current Version of Popup Builder is 2.
|
367 |
|
368 |
== Other Notes ==
|
369 |
|
2 |
Plugin Name: Popup Builder
|
3 |
Contributors: Sygnoos, Popup By Sygnoos
|
4 |
Author: Sygnoos
|
5 |
+
Donate link: http://popup-builder.com
|
6 |
Tags: popup, ads, modal, responsive popup, fancybox, lightbox, youtube, video popup, iframe popup, vimeo, contact form, html popup, social popup, age restriction, countdown, facebook, subscription popup, exit intent popup
|
7 |
Requires at least: 3.8
|
8 |
+
Tested up to: 4.5.3
|
9 |
Stable tag: trunk
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
85 |
* Popup showing frequency - you can select how many times you want the popup be shown to the same user. This means, you can make the popup appear for 3 times, for example, to the same user.
|
86 |
|
87 |
|
88 |
+
<a href="http://popup-builder.com" target="_blank">Get Popup Builder PRO package</a>
|
89 |
<div>
|
90 |
Customizing the look and feel of the popup is as important as the content itself. That's why Popup Builder gives you the ability tu customize the timings, effects, position and size of the popup to your needs.
|
91 |
</div>
|
134 |
|
135 |
== Changelog ==
|
136 |
|
137 |
+
= Version 2.3.1 =
|
138 |
+
* Bug fixed connected to PHP version
|
139 |
+
|
140 |
+
= Version 2.3.0 =
|
141 |
+
* Popup shortcode modified, onclick popup can be wrapped to any element. Ex `[sg_popup id="1" wrap="span" event="click"]Open Popup #1[/sg_popup]`
|
142 |
+
* Popup can be opened via html class. Ex. `<span class='sg-popup-id-1'>Popup #1</span>`
|
143 |
+
|
144 |
= Version 2.2.9 =
|
145 |
* Bug fixed connected to redirection on popup click.
|
146 |
|
349 |
|
350 |
**Why should I buy the PRO package?**
|
351 |
|
352 |
+
The Free version of Popup Builder gives you anything you need for creating unlimited fully functional popups and insert them wherever you want. Our PRO package gives you the ability to create more specific popups, like iframe, video or shortcode popups. Also, advanced options will be available for you to disable popup closing, disable popup for mobile devices, show the popup only once, and many other features. So if you need these advanced popups and functionalities, get Popup Builder PRO <a href="http://popup-builder.com">here</a>.
|
353 |
|
354 |
**Can I create a popup and make it invisible for some countries? (PRO)**
|
355 |
|
370 |
|
371 |
== Upgrade Notice ==
|
372 |
|
373 |
+
Current Version of Popup Builder is 2.3.1
|
374 |
|
375 |
== Other Notes ==
|
376 |
|
style/sg_popup_style.css
CHANGED
@@ -1096,6 +1096,45 @@ input[name="theme"] {
|
|
1096 |
padding: 30px;
|
1097 |
}
|
1098 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1099 |
@media only screen and (min-width:800px) {
|
1100 |
.sgmb-container {
|
1101 |
min-width:800px;
|
1096 |
padding: 30px;
|
1097 |
}
|
1098 |
|
1099 |
+
.sub-options-content {
|
1100 |
+
width: 100%;
|
1101 |
+
margin-left: 16px;
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
/* Feature plugins design */
|
1105 |
+
|
1106 |
+
#sg-plugins-wrapper {
|
1107 |
+
width: 90%;
|
1108 |
+
margin: 0 auto;
|
1109 |
+
padding-top: 30px;
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
.plugin-icon {
|
1113 |
+
top: 0px !important;
|
1114 |
+
left: 10px !important;
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
.plugin-card .desc {
|
1118 |
+
margin-right: 0px;
|
1119 |
+
}
|
1120 |
+
|
1121 |
+
.plugin-card-top {
|
1122 |
+
padding-top: 0px !important;
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
.plugin-card .compatibility-compatible:before {
|
1126 |
+
content: "\f147" !important;
|
1127 |
+
}
|
1128 |
+
|
1129 |
+
#sg-plugins-wrapper .column-compatibility {
|
1130 |
+
width: 100%;
|
1131 |
+
text-align: inherit;
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
#sg-plugins-wrapper .plugin-card {
|
1135 |
+
cursor: pointer;
|
1136 |
+
}
|
1137 |
+
|
1138 |
@media only screen and (min-width:800px) {
|
1139 |
.sgmb-container {
|
1140 |
min-width:800px;
|
style/sg_popup_style.php
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
<?php
|
2 |
function sg_popup_admin_style($hook) {
|
3 |
-
if ('toplevel_page_PopupBuilder' != $hook &&
|
|
|
|
|
|
|
|
|
|
|
4 |
return;
|
5 |
}
|
6 |
wp_register_style('sg_popup_style', SG_APP_POPUP_URL . '/style/sg_popup_style.css', false, '1.0.0');
|
@@ -18,6 +23,8 @@ function sg_popup_admin_style($hook) {
|
|
18 |
wp_enqueue_style('sg_flipclock_css');
|
19 |
wp_register_style('sg_jqueryUi_css', SG_APP_POPUP_URL . "/style/jquery-ui.min.css");
|
20 |
wp_enqueue_style('sg_jqueryUi_css');
|
|
|
|
|
21 |
}
|
22 |
if(POPUP_BUILDER_PKG == POPUP_BUILDER_PKG_PLATINUM) {
|
23 |
wp_register_style('sg_bootstrap_input', SG_APP_POPUP_URL . "/style/bootstrap-tagsinput.css");
|
1 |
<?php
|
2 |
function sg_popup_admin_style($hook) {
|
3 |
+
if ('toplevel_page_PopupBuilder' != $hook &&
|
4 |
+
'popup-builder_page_create-popup' != $hook &&
|
5 |
+
'popup-builder_page_edit-popup' != $hook &&
|
6 |
+
'popup-builder_page_sgPopupMenu' != $hook &&
|
7 |
+
'popup-builder_page_more-plugins' != $hook &&
|
8 |
+
'popup-builder_page_subscribers' != $hook) {
|
9 |
return;
|
10 |
}
|
11 |
wp_register_style('sg_popup_style', SG_APP_POPUP_URL . '/style/sg_popup_style.css', false, '1.0.0');
|
23 |
wp_enqueue_style('sg_flipclock_css');
|
24 |
wp_register_style('sg_jqueryUi_css', SG_APP_POPUP_URL . "/style/jquery-ui.min.css");
|
25 |
wp_enqueue_style('sg_jqueryUi_css');
|
26 |
+
wp_register_style('sg_datetimepicker_css', SG_APP_POPUP_URL . "/style/jquery.datetimepicker.min.css");
|
27 |
+
wp_enqueue_style('sg_datetimepicker_css');
|
28 |
}
|
29 |
if(POPUP_BUILDER_PKG == POPUP_BUILDER_PKG_PLATINUM) {
|
30 |
wp_register_style('sg_bootstrap_input', SG_APP_POPUP_URL . "/style/bootstrap-tagsinput.css");
|