Version Description
Current Version of Popup Builder is 2.6.4.2
Download this release
Release Info
Developer | Sygnoos |
Plugin | Popup Builder – Responsive WordPress Pop up |
Version | 2.6.4.2 |
Comparing to | |
See all releases |
Code changes from version 2.6.4.1 to 2.6.4.2
- classes/SGImagePopup.php +1 -1
- classes/SGPopup.php +19 -1
- classes/sgDataTable/SGPopupTable.php +7 -0
- config.php +2 -2
- files/sg_functions.php +1 -1
- files/sg_popup_actions.php +1 -1
- files/sg_popup_ajax.php +357 -0
- files/sg_popup_create_new.php +61 -5
- files/sg_popup_save.php +3 -0
- helpers/Integrate_external_settings.php +5 -1
- helpers/SgPopupGetData.php +30 -0
- javascript/sg_popup_backend.js +1 -1
- javascript/sg_popup_frontend.js +52 -20
- javascript/sg_popup_javascript.php +4 -0
- popup-builder.php +1 -1
- readme.txt +8 -2
- style/sg_popup_style.css +24 -2
classes/SGImagePopup.php
CHANGED
@@ -40,7 +40,7 @@ class SGImagePopup extends SGPopup {
|
|
40 |
|
41 |
public function getRemoveOptions()
|
42 |
{
|
43 |
-
return array('popup-content-padding' => 1);
|
44 |
}
|
45 |
|
46 |
protected function setCustomOptions($id) {
|
40 |
|
41 |
public function getRemoveOptions()
|
42 |
{
|
43 |
+
return array('popup-content-padding' => 1, 'popupContentBgImage' => 1);
|
44 |
}
|
45 |
|
46 |
protected function setCustomOptions($id) {
|
classes/SGPopup.php
CHANGED
@@ -192,8 +192,24 @@ abstract class SGPopup {
|
|
192 |
}
|
193 |
public static function delete($id) {
|
194 |
$pop = self::findById($id);
|
|
|
|
|
|
|
195 |
$type = $pop->getType();
|
196 |
-
$table = 'sg_'.$type.'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
|
198 |
global $wpdb;
|
199 |
$wpdb->query(
|
@@ -215,6 +231,8 @@ abstract class SGPopup {
|
|
215 |
,$id
|
216 |
)
|
217 |
);
|
|
|
|
|
218 |
}
|
219 |
|
220 |
public static function setPopupForPost($post_id, $popupId) {
|
192 |
}
|
193 |
public static function delete($id) {
|
194 |
$pop = self::findById($id);
|
195 |
+
if(empty($pop)) {
|
196 |
+
return false;
|
197 |
+
}
|
198 |
$type = $pop->getType();
|
199 |
+
$table = 'sg_'.$type.'_popup';
|
200 |
+
|
201 |
+
if($type == 'mailchimp' || $type == 'aweber') {
|
202 |
+
$table = 'sg_popup_'.$type;
|
203 |
+
}
|
204 |
+
if($type == 'shortcode') {
|
205 |
+
$table = 'sg_shortCode_popup';
|
206 |
+
}
|
207 |
+
else if($type == 'ageRestriction') {
|
208 |
+
$table = 'sg_age_restriction_popup';
|
209 |
+
}
|
210 |
+
else if($type == 'contactForm') {
|
211 |
+
$table = 'sg_contact_form_popup';
|
212 |
+
}
|
213 |
|
214 |
global $wpdb;
|
215 |
$wpdb->query(
|
231 |
,$id
|
232 |
)
|
233 |
);
|
234 |
+
|
235 |
+
return true;
|
236 |
}
|
237 |
|
238 |
public static function setPopupForPost($post_id, $popupId) {
|
classes/sgDataTable/SGPopupTable.php
CHANGED
@@ -87,6 +87,13 @@ class SGPB_PopupsView extends SGPB_Table
|
|
87 |
|
88 |
foreach ($popupsData as $key => $popupData) {
|
89 |
$type = $popupData[$typeKey];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
$className = "SG".ucfirst(strtolower($type)).'Popup';
|
91 |
/* get current popup app path */
|
92 |
$paths = IntegrateExternalSettings::getCurrentPopupAppPaths($type);
|
87 |
|
88 |
foreach ($popupsData as $key => $popupData) {
|
89 |
$type = $popupData[$typeKey];
|
90 |
+
$popupId = $popupData[0];
|
91 |
+
$popupPreviewId = get_option('popupPreviewId');
|
92 |
+
|
93 |
+
if($popupPreviewId && $popupId == $popupPreviewId) {
|
94 |
+
unset($popupsData[$key]);
|
95 |
+
}
|
96 |
+
|
97 |
$className = "SG".ucfirst(strtolower($type)).'Popup';
|
98 |
/* get current popup app path */
|
99 |
$paths = IntegrateExternalSettings::getCurrentPopupAppPaths($type);
|
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.642);
|
28 |
+
define('SG_POPUP_PRO_VERSION', 3.372);
|
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/sg_functions.php
CHANGED
@@ -353,7 +353,7 @@ class SGFunctions
|
|
353 |
if(empty($popupData)) {
|
354 |
continue;
|
355 |
}
|
356 |
-
|
357 |
$title = $popupData->getTitle();
|
358 |
$type = $popupData->getType();
|
359 |
$id = $popupData->getId();
|
353 |
if(empty($popupData)) {
|
354 |
continue;
|
355 |
}
|
356 |
+
|
357 |
$title = $popupData->getTitle();
|
358 |
$type = $popupData->getType();
|
359 |
$id = $popupData->getId();
|
files/sg_popup_actions.php
CHANGED
@@ -20,7 +20,7 @@ class sgPopupActions {
|
|
20 |
$popupCount = get_option('SGPBMaxOpenCount');
|
21 |
$popupId = $args['popupId'];
|
22 |
|
23 |
-
if(isset($popupCount[$popupId])) {
|
24 |
unset($popupCount[$popupId]);
|
25 |
update_option('SGPBMaxOpenCount', $popupId);
|
26 |
}
|
20 |
$popupCount = get_option('SGPBMaxOpenCount');
|
21 |
$popupId = $args['popupId'];
|
22 |
|
23 |
+
if(is_array($popupCount) && isset($popupCount[$popupId])) {
|
24 |
unset($popupCount[$popupId]);
|
25 |
update_option('SGPBMaxOpenCount', $popupId);
|
26 |
}
|
files/sg_popup_ajax.php
CHANGED
@@ -305,3 +305,360 @@ function sgChangePopupStatus() {
|
|
305 |
}
|
306 |
add_action('wp_ajax_change_popup_status', 'sgChangePopupStatus');
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
}
|
306 |
add_action('wp_ajax_change_popup_status', 'sgChangePopupStatus');
|
307 |
|
308 |
+
function savePopupPreviewData() {
|
309 |
+
check_ajax_referer('popup-builder-ajax', 'ajaxNonce');
|
310 |
+
|
311 |
+
$formSerializedData = $_POST['popupDta'];
|
312 |
+
if(get_option('popupPreviewId')) {
|
313 |
+
$id = (int)get_option('popupPreviewId');
|
314 |
+
|
315 |
+
if($id == 0 || !$id) {
|
316 |
+
return;
|
317 |
+
}
|
318 |
+
|
319 |
+
require_once(SG_APP_POPUP_CLASSES.'/SGPopup.php');
|
320 |
+
$delete = SGPopup::delete($id);
|
321 |
+
if(!$delete) {
|
322 |
+
delete_option('popupPreviewId');
|
323 |
+
}
|
324 |
+
|
325 |
+
$args = array('popupId'=> $id);
|
326 |
+
do_action('sgPopupDelete', $args);
|
327 |
+
}
|
328 |
+
|
329 |
+
parse_str($formSerializedData, $popupPreviewPostData);
|
330 |
+
$popupPreviewPostData['allPagesStatus'] = '';
|
331 |
+
$popupPreviewPostData['allPostsStatus'] = '';
|
332 |
+
$popupPreviewPostData['allCustomPostsStatus'] = '';
|
333 |
+
$popupPreviewPostData['onScrolling'] = '';
|
334 |
+
$popupPreviewPostData['inActivityStatus'] = '';
|
335 |
+
$popupPreviewPostData['popup-timer-status'] = '';
|
336 |
+
$popupPreviewPostData['popup-schedule-status'] = '';
|
337 |
+
$popupPreviewPostData['sg-user-status'] = '';
|
338 |
+
$popupPreviewPostData['countryStatus'] = '';
|
339 |
+
$popupPreviewPostData['forMobile'] = '';
|
340 |
+
$popupPreviewPostData['openMobile'] = '';
|
341 |
+
$popupPreviewPostData['hidden_popup_number'] = '';
|
342 |
+
$popupPreviewPostData['repeatPopup'] = '';
|
343 |
+
$_POST += $popupPreviewPostData;
|
344 |
+
|
345 |
+
$showAllPages = sgSanitize('allPages');
|
346 |
+
$showAllPosts = sgSanitize('allPosts');
|
347 |
+
$showAllCustomPosts = sgSanitize('allCustomPosts');
|
348 |
+
$allSelectedPages = "";
|
349 |
+
$allSelectedPosts = "";
|
350 |
+
$allSelectedCustomPosts = "";
|
351 |
+
$allSelectedCategories = sgSanitize("posts-all-categories", true);
|
352 |
+
|
353 |
+
$selectedPages = sgSanitize('all-selected-page');
|
354 |
+
$selectedPosts = sgSanitize('all-selected-posts');
|
355 |
+
$selectedCustomPosts = sgSanitize('all-selected-custom-posts');
|
356 |
+
|
357 |
+
/* if popup check for all pages it is not needed for save all pages all posts */
|
358 |
+
if($showAllPages !== "all" && !empty($selectedPages)) {
|
359 |
+
$allSelectedPages = explode(",", $selectedPages);
|
360 |
+
}
|
361 |
+
|
362 |
+
if($showAllPosts !== "all" && !empty($selectedPosts)) {
|
363 |
+
$allSelectedPosts = explode(",", $selectedPosts);
|
364 |
+
}
|
365 |
+
if($showAllCustomPosts !== "all" && !empty($selectedCustomPosts)) {
|
366 |
+
$allSelectedCustomPosts = explode(",", $selectedCustomPosts);
|
367 |
+
}
|
368 |
+
|
369 |
+
$socialOptions = array(
|
370 |
+
'sgSocialTheme' => sgSanitize('sgSocialTheme'),
|
371 |
+
'sgSocialButtonsSize' => sgSanitize('sgSocialButtonsSize'),
|
372 |
+
'sgSocialLabel' => sgSanitize('sgSocialLabel'),
|
373 |
+
'sgSocialShareCount' => sgSanitize('sgSocialShareCount'),
|
374 |
+
'sgRoundButton' => sgSanitize('sgRoundButton'),
|
375 |
+
'fbShareLabel' => sgSanitize('fbShareLabel'),
|
376 |
+
'lindkinLabel' => sgSanitize('lindkinLabel'),
|
377 |
+
'sgShareUrl' => esc_url_raw(@$_POST['sgShareUrl']),
|
378 |
+
'shareUrlType' => sgSanitize('shareUrlType'),
|
379 |
+
'googLelabel' => sgSanitize('googLelabel'),
|
380 |
+
'twitterLabel' => sgSanitize('twitterLabel'),
|
381 |
+
'pinterestLabel' => sgSanitize('pinterestLabel'),
|
382 |
+
'sgMailSubject' => sgSanitize('sgMailSubject'),
|
383 |
+
'sgMailLable' => sgSanitize('sgMailLable')
|
384 |
+
);
|
385 |
+
|
386 |
+
$socialButtons = array(
|
387 |
+
'sgTwitterStatus' => sgSanitize('sgTwitterStatus'),
|
388 |
+
'sgFbStatus' => sgSanitize('sgFbStatus'),
|
389 |
+
'sgEmailStatus' => sgSanitize('sgEmailStatus'),
|
390 |
+
'sgLinkedinStatus' => sgSanitize('sgLinkedinStatus'),
|
391 |
+
'sgGoogleStatus' => sgSanitize('sgGoogleStatus'),
|
392 |
+
'sgPinterestStatus' => sgSanitize('sgPinterestStatus'),
|
393 |
+
'pushToBottom' => sgSanitize('pushToBottom')
|
394 |
+
);
|
395 |
+
|
396 |
+
$countdownOptions = array(
|
397 |
+
'pushToBottom' => sgSanitize('pushToBottom'),
|
398 |
+
'countdownNumbersBgColor' => sgSanitize('countdownNumbersBgColor'),
|
399 |
+
'countdownNumbersTextColor' => sgSanitize('countdownNumbersTextColor'),
|
400 |
+
'sg-due-date' => sgSanitize('sg-due-date'),
|
401 |
+
'countdown-position' => sgSanitize('countdown-position'),
|
402 |
+
'counts-language'=> sgSanitize('counts-language'),
|
403 |
+
'sg-time-zone' => sgSanitize('sg-time-zone'),
|
404 |
+
'sg-countdown-type' => sgSanitize('sg-countdown-type'),
|
405 |
+
'countdown-autoclose' => sgSanitize('countdown-autoclose')
|
406 |
+
);
|
407 |
+
|
408 |
+
$videoOptions = array(
|
409 |
+
'video-autoplay' => sgSanitize('video-autoplay')
|
410 |
+
);
|
411 |
+
|
412 |
+
$exitIntentOptions = array(
|
413 |
+
'exit-intent-type' => sgSanitize('exit-intent-type'),
|
414 |
+
'exit-intent-expire-time' => sgSanitize('exit-intent-expire-time'),
|
415 |
+
'exit-intent-alert' => sgSanitize('exit-intent-alert')
|
416 |
+
);
|
417 |
+
|
418 |
+
$subscriptionOptions = array(
|
419 |
+
'subs-first-name-status' => sgSanitize('subs-first-name-status'),
|
420 |
+
'subs-last-name-status' => sgSanitize('subs-last-name-status'),
|
421 |
+
// email input placeholder text
|
422 |
+
'subscription-email' => sgSanitize('subscription-email'),
|
423 |
+
'subs-first-name' => sgSanitize('subs-first-name'),
|
424 |
+
'subs-last-name' => sgSanitize('subs-last-name'),
|
425 |
+
'subs-text-width' => sgSanitize('subs-text-width'),
|
426 |
+
'subs-button-bgColor' => sgSanitize('subs-button-bgColor'),
|
427 |
+
'subs-btn-width' => sgSanitize('subs-btn-width'),
|
428 |
+
'subs-btn-title' => sgSanitize('subs-btn-title'),
|
429 |
+
'subs-text-input-bgColor' => sgSanitize('subs-text-input-bgColor'),
|
430 |
+
'subs-text-borderColor' => sgSanitize('subs-text-borderColor'),
|
431 |
+
'subs-button-color' => sgSanitize('subs-button-color'),
|
432 |
+
'subs-inputs-color' => sgSanitize('subs-inputs-color'),
|
433 |
+
'subs-btn-height' => sgSanitize('subs-btn-height'),
|
434 |
+
'subs-text-height' => sgSanitize('subs-text-height'),
|
435 |
+
'subs-placeholder-color' => sgSanitize('subs-placeholder-color'),
|
436 |
+
'subs-validation-message' => sgSanitize('subs-validation-message'),
|
437 |
+
'subs-success-message' => sgSanitize('subs-success-message'),
|
438 |
+
'subs-btn-progress-title' => sgSanitize('subs-btn-progress-title'),
|
439 |
+
'subs-text-border-width' => sgSanitize('subs-text-border-width'),
|
440 |
+
'subs-success-behavior' => sgSanitize('subs-success-behavior'),
|
441 |
+
'subs-success-redirect-url' => esc_url_raw(@$_POST['subs-success-redirect-url']),
|
442 |
+
'subs-success-popups-list' => sgSanitize('subs-success-popups-list'),
|
443 |
+
'subs-first-name-required' => sgSanitize('subs-first-name-required'),
|
444 |
+
'subs-last-name-required' => sgSanitize('subs-last-name-required'),
|
445 |
+
'subs-success-redirect-new-tab' => sgSanitize('subs-success-redirect-new-tab')
|
446 |
+
);
|
447 |
+
|
448 |
+
$contactFormOptions = array(
|
449 |
+
'contact-name' => sgSanitize('contact-name'),
|
450 |
+
'contact-name-status' => sgSanitize('contact-name-status'),
|
451 |
+
'contact-name-required' => sgSanitize('contact-name-required'),
|
452 |
+
'contact-subject' => sgSanitize('contact-subject'),
|
453 |
+
'contact-subject-status' => sgSanitize('contact-subject-status'),
|
454 |
+
'contact-subject-required' => sgSanitize('contact-subject-required'),
|
455 |
+
// email input placeholder text(string)
|
456 |
+
'contact-email' => sgSanitize('contact-email'),
|
457 |
+
'contact-message' => sgSanitize('contact-message'),
|
458 |
+
'contact-validation-message' => sgSanitize('contact-validation-message'),
|
459 |
+
'contact-success-message' => sgSanitize('contact-success-message'),
|
460 |
+
'contact-inputs-width' => sgSanitize('contact-inputs-width'),
|
461 |
+
'contact-inputs-height' => sgSanitize('contact-inputs-height'),
|
462 |
+
'contact-inputs-border-width' => sgSanitize('contact-inputs-border-width'),
|
463 |
+
'contact-text-input-bgcolor' => sgSanitize('contact-text-input-bgcolor'),
|
464 |
+
'contact-text-bordercolor' => sgSanitize('contact-text-bordercolor'),
|
465 |
+
'contact-inputs-color' => sgSanitize('contact-inputs-color'),
|
466 |
+
'contact-placeholder-color' => sgSanitize('contact-placeholder-color'),
|
467 |
+
'contact-btn-width' => sgSanitize('contact-btn-width'),
|
468 |
+
'contact-btn-height' => sgSanitize('contact-btn-height'),
|
469 |
+
'contact-btn-title' => sgSanitize('contact-btn-title'),
|
470 |
+
'contact-btn-progress-title' => sgSanitize('contact-btn-progress-title'),
|
471 |
+
'contact-button-bgcolor' => sgSanitize('contact-button-bgcolor'),
|
472 |
+
'contact-button-color' => sgSanitize('contact-button-color'),
|
473 |
+
'contact-area-width' => sgSanitize('contact-area-width'),
|
474 |
+
'contact-area-height' => sgSanitize('contact-area-height'),
|
475 |
+
'sg-contact-resize' => sgSanitize('sg-contact-resize'),
|
476 |
+
'contact-validate-email' => sgSanitize('contact-validate-email'),
|
477 |
+
'contact-receive-email' => sanitize_email(@$_POST['contact-receive-email']),
|
478 |
+
'contact-fail-message' => sgSanitize('contact-fail-message'),
|
479 |
+
'show-form-to-top' => sgSanitize('show-form-to-top'),
|
480 |
+
'contact-success-behavior' => sgSanitize('contact-success-behavior'),
|
481 |
+
'contact-success-redirect-url' => sgSanitize('contact-success-redirect-url'),
|
482 |
+
'contact-success-popups-list' => sgSanitize('contact-success-popups-list'),
|
483 |
+
'dont-show-content-to-contacted-user' => sgSanitize('dont-show-content-to-contacted-user'),
|
484 |
+
'contact-success-frequency-days' => sgSanitize('contact-success-frequency-days'),
|
485 |
+
'contact-success-redirect-new-tab' => sgSanitize('contact-success-redirect-new-tab')
|
486 |
+
);
|
487 |
+
|
488 |
+
$fblikeOptions = array(
|
489 |
+
'fblike-like-url' => esc_url_raw(@$_POST['fblike-like-url']),
|
490 |
+
'fblike-layout' => sgSanitize('fblike-layout')
|
491 |
+
);
|
492 |
+
|
493 |
+
$addToGeneralOptions = array(
|
494 |
+
'showAllPages' => array(),
|
495 |
+
'showAllPosts' => array(),
|
496 |
+
'showAllCustomPosts' => array(),
|
497 |
+
'allSelectedPages' => array(),
|
498 |
+
'allSelectedPosts' => array(),
|
499 |
+
'allSelectedCustomPosts' => array(),
|
500 |
+
'allSelectedCategories'=> array(),
|
501 |
+
'fblikeOptions'=> $fblikeOptions,
|
502 |
+
'videoOptions'=>$videoOptions,
|
503 |
+
'exitIntentOptions'=> $exitIntentOptions,
|
504 |
+
'countdownOptions'=> $countdownOptions,
|
505 |
+
'socialOptions'=> $socialOptions,
|
506 |
+
'socialButtons'=> $socialButtons
|
507 |
+
);
|
508 |
+
|
509 |
+
$options = IntegrateExternalSettings::getPopupGeneralOptions($addToGeneralOptions);
|
510 |
+
|
511 |
+
$html = stripslashes(sgSanitize("sg_popup_html"));
|
512 |
+
$fblike = stripslashes(sgSanitize("sg_popup_fblike"));
|
513 |
+
$ageRestriction = stripslashes(sgSanitize('sg_ageRestriction'));
|
514 |
+
$social = stripslashes(sgSanitize('sg_social'));
|
515 |
+
$image = sgSanitize('ad_image');
|
516 |
+
$countdown = stripslashes(sgSanitize('sg_countdown'));
|
517 |
+
$subscription = stripslashes(sgSanitize('sg_subscription'));
|
518 |
+
$sgContactForm = stripslashes(sgSanitize('sg_contactForm'));
|
519 |
+
$iframe = sgSanitize('iframe');
|
520 |
+
$video = sgSanitize('video');
|
521 |
+
$shortCode = stripslashes(sgSanitize('shortcode'));
|
522 |
+
$mailchimp = stripslashes(sgSanitize('sg_popup_mailchimp'));
|
523 |
+
$aweber = stripslashes(sgSanitize('sg_popup_aweber'));
|
524 |
+
$exitIntent = stripslashes(sgSanitize('sg-exit-intent'));
|
525 |
+
$type = sgSanitize('type');
|
526 |
+
|
527 |
+
if($type == 'mailchimp') {
|
528 |
+
|
529 |
+
$mailchimpOptions = array(
|
530 |
+
'mailchimp-disable-double-optin' => sgSanitize('mailchimp-disable-double-optin'),
|
531 |
+
'mailchimp-list-id' => sgSanitize('mailchimp-list-id'),
|
532 |
+
'sg-mailchimp-form' => stripslashes(sgSanitize('sg-mailchimp-form')),
|
533 |
+
'mailchimp-required-error-message' => sgSanitize('mailchimp-required-error-message'),
|
534 |
+
'mailchimp-email-validate-message' => sgSanitize('mailchimp-email-validate-message'),
|
535 |
+
'mailchimp-error-message' => sgSanitize('mailchimp-error-message'),
|
536 |
+
'mailchimp-submit-button-bgcolor' => sgSanitize('mailchimp-submit-button-bgcolor'),
|
537 |
+
'mailchimp-form-aligment' => sgSanitize('mailchimp-form-aligment'),
|
538 |
+
'mailchimp-label-aligment' => sgSanitize('mailchimp-label-aligment'),
|
539 |
+
'mailchimp-success-message' => sgSanitize('mailchimp-success-message'),
|
540 |
+
'mailchimp-only-required' => sgSanitize('mailchimp-only-required'),
|
541 |
+
'mailchimp-show-form-to-top' => sgSanitize('mailchimp-show-form-to-top'),
|
542 |
+
'mailchimp-label-color' => sgSanitize('mailchimp-label-color'),
|
543 |
+
'mailchimp-input-width' => sgSanitize('mailchimp-input-width'),
|
544 |
+
'mailchimp-input-height' => sgSanitize('mailchimp-input-height'),
|
545 |
+
'mailchimp-input-border-radius' => sgSanitize('mailchimp-input-border-radius'),
|
546 |
+
'mailchimp-input-border-width' => sgSanitize('mailchimp-input-border-width'),
|
547 |
+
'mailchimp-input-border-color' => sgSanitize('mailchimp-input-border-color'),
|
548 |
+
'mailchimp-input-bg-color' => sgSanitize('mailchimp-input-bg-color'),
|
549 |
+
'mailchimp-input-text-color' => sgSanitize('mailchimp-input-text-color'),
|
550 |
+
'mailchimp-submit-width' => sgSanitize('mailchimp-submit-width'),
|
551 |
+
'mailchimp-submit-height' => sgSanitize('mailchimp-submit-height'),
|
552 |
+
'mailchimp-submit-border-width' => sgSanitize('mailchimp-submit-border-width'),
|
553 |
+
'mailchimp-submit-border-radius' => sgSanitize('mailchimp-submit-border-radius'),
|
554 |
+
'mailchimp-submit-border-color' => sgSanitize('mailchimp-submit-border-color'),
|
555 |
+
'mailchimp-submit-color' => sgSanitize('mailchimp-submit-color'),
|
556 |
+
'mailchimp-submit-title' => sgSanitize('mailchimp-submit-title'),
|
557 |
+
'mailchimp-email-label' => sgSanitize('mailchimp-email-label'),
|
558 |
+
'mailchimp-indicates-required-fields' => sgSanitize('mailchimp-indicates-required-fields'),
|
559 |
+
'mailchimp-asterisk-label' => sgSanitize('mailchimp-asterisk-label'),
|
560 |
+
'mailchimp-success-behavior' => sgSanitize('mailchimp-success-behavior'),
|
561 |
+
'mailchimp-success-redirect-url' => sgSanitize('mailchimp-success-redirect-url'),
|
562 |
+
'mailchimp-success-popups-list' => sgSanitize('mailchimp-success-popups-list'),
|
563 |
+
'mailchimp-success-redirect-new-tab' => sgSanitize('mailchimp-success-redirect-new-tab')
|
564 |
+
);
|
565 |
+
|
566 |
+
$options['mailchimpOptions'] = json_encode($mailchimpOptions);
|
567 |
+
}
|
568 |
+
|
569 |
+
if($type == 'aweber') {
|
570 |
+
$aweberOptions = array(
|
571 |
+
'sg-aweber-webform' => sgSanitize('sg-aweber-webform'),
|
572 |
+
'sg-aweber-list' => sgSanitize('sg-aweber-list'),
|
573 |
+
'aweber-custom-success-message' => sgSanitize('aweber-custom-success-message'),
|
574 |
+
'aweber-success-message' => sgSanitize('aweber-success-message'),
|
575 |
+
'aweber-custom-invalid-email-message' => sgSanitize('aweber-custom-invalid-email-message'),
|
576 |
+
'aweber-invalid-email' => sgSanitize('aweber-invalid-email'),
|
577 |
+
'aweber-custom-error-message' => sgSanitize('aweber-custom-error-message'),
|
578 |
+
'aweber-error-message' => sgSanitize('aweber-error-message'),
|
579 |
+
'aweber-custom-subscribed-message' => sgSanitize('aweber-custom-subscribed-message'),
|
580 |
+
'aweber-already-subscribed-message' => sgSanitize('aweber-already-subscribed-message'),
|
581 |
+
'aweber-validate-email-message' => sgSanitize('aweber-validate-email-message'),
|
582 |
+
'aweber-required-message' => sgSanitize('aweber-required-message'),
|
583 |
+
'aweber-success-behavior' => sgSanitize('aweber-success-behavior'),
|
584 |
+
'aweber-success-redirect-url' => sgSanitize('aweber-success-redirect-url'),
|
585 |
+
'aweber-success-popups-list' => sgSanitize('aweber-success-popups-list'),
|
586 |
+
'aweber-success-redirect-new-tab' => sgSanitize('aweber-success-redirect-new-tab')
|
587 |
+
);
|
588 |
+
$options['aweberOptions'] = json_encode($aweberOptions);
|
589 |
+
}
|
590 |
+
|
591 |
+
|
592 |
+
$title = stripslashes(sgSanitize('title'));
|
593 |
+
$id = sgSanitize('hidden_popup_number');
|
594 |
+
$jsonDataArray = json_encode($options);
|
595 |
+
|
596 |
+
$data = array(
|
597 |
+
'id' => $id,
|
598 |
+
'title' => $title,
|
599 |
+
'type' => $type,
|
600 |
+
'image' => $image,
|
601 |
+
'html' => $html,
|
602 |
+
'fblike' => $fblike,
|
603 |
+
'iframe' => $iframe,
|
604 |
+
'video' => $video,
|
605 |
+
'shortcode' => $shortCode,
|
606 |
+
'ageRestriction' => $ageRestriction,
|
607 |
+
'countdown' => $countdown,
|
608 |
+
'exitIntent' => $exitIntent,
|
609 |
+
'sg_subscription' => $subscription,
|
610 |
+
'sg_contactForm' => $sgContactForm,
|
611 |
+
'social' => $social,
|
612 |
+
'mailchimp' => $mailchimp,
|
613 |
+
'aweber' => $aweber,
|
614 |
+
'options' => $jsonDataArray,
|
615 |
+
'subscriptionOptions' => json_encode($subscriptionOptions),
|
616 |
+
'contactFormOptions' => json_encode($contactFormOptions)
|
617 |
+
);
|
618 |
+
|
619 |
+
function setPopupForAllPages($id, $data, $type) {
|
620 |
+
//-1 is the home page key
|
621 |
+
if(is_array($data) && $data[0] == -1 && defined('ICL_LANGUAGE_CODE')) {
|
622 |
+
$data[0] .='_'.ICL_LANGUAGE_CODE;
|
623 |
+
}
|
624 |
+
SGPopup::addPopupForAllPages($id, $data, $type);
|
625 |
+
}
|
626 |
+
|
627 |
+
function setOptionPopupType($id, $type) {
|
628 |
+
update_option("SG_POPUP_".strtoupper($type)."_".$id,$id);
|
629 |
+
}
|
630 |
+
|
631 |
+
$popupName = "SG".sanitize_text_field(ucfirst(strtolower($popupPreviewPostData['type'])));
|
632 |
+
$popupClassName = $popupName."Popup";
|
633 |
+
$classPath = SG_APP_POPUP_PATH;
|
634 |
+
|
635 |
+
if($type == 'mailchimp' || $type == 'aweber') {
|
636 |
+
|
637 |
+
$currentActionName1 = IntegrateExternalSettings::getCurrentPopupAppPaths($type);
|
638 |
+
$classPath = $currentActionName1['app-path'];
|
639 |
+
}
|
640 |
+
|
641 |
+
require_once($classPath ."/classes/".$popupClassName.".php");
|
642 |
+
|
643 |
+
if ($id == "") {
|
644 |
+
global $wpdb;
|
645 |
+
|
646 |
+
call_user_func(array($popupClassName, 'create'), $data);
|
647 |
+
|
648 |
+
$lastId = $wpdb->get_var("SELECT LAST_INSERT_ID() FROM ". $wpdb->prefix."sg_popup");
|
649 |
+
$postData['saveMod'] = '';
|
650 |
+
$postData['popupId'] = $lastId;
|
651 |
+
$extensionManagerObj = new SGPBExtensionManager();
|
652 |
+
$extensionManagerObj->setPostData($postData);
|
653 |
+
$extensionManagerObj->save();
|
654 |
+
update_option('popupPreviewId', $lastId);
|
655 |
+
setOptionPopupType($lastId, $type);
|
656 |
+
echo $lastId;
|
657 |
+
die();
|
658 |
+
}
|
659 |
+
|
660 |
+
die();
|
661 |
+
}
|
662 |
+
|
663 |
+
add_action('wp_ajax_save_popup_preview_data', 'savePopupPreviewData');
|
664 |
+
|
files/sg_popup_create_new.php
CHANGED
@@ -5,6 +5,7 @@ $popupType = @sanitize_text_field($_GET['type']);
|
|
5 |
if (!$popupType) {
|
6 |
$popupType = 'html';
|
7 |
}
|
|
|
8 |
|
9 |
//Get current paths for popup, for addons it different
|
10 |
$paths = IntegrateExternalSettings::getCurrentPopupAppPaths($popupType);
|
@@ -150,6 +151,10 @@ if (isset($_GET['id'])) {
|
|
150 |
$sgRandomPopup = @$jsonData['randomPopup'];
|
151 |
$sgPopupOpenSound = @$jsonData['popupOpenSound'];
|
152 |
$sgPopupOpenSoundFile = @$jsonData['popupOpenSoundFile'];
|
|
|
|
|
|
|
|
|
153 |
$sgCountryStatus = @$jsonData['countryStatus'];
|
154 |
$sgAllSelectedPages = @$jsonData['allSelectedPages'];
|
155 |
$sgAllSelectedCustomPosts = @$jsonData['allSelectedCustomPosts'];
|
@@ -340,7 +345,11 @@ $popupProDefaultValues = array(
|
|
340 |
'autoClosePopup' => false,
|
341 |
'randomPopup' => false,
|
342 |
'popupOpenSound' => false,
|
|
|
343 |
'popupOpenSoundFile' => SG_APP_POPUP_URL.'/files/lib/popupOpenSound.wav',
|
|
|
|
|
|
|
344 |
'fbStatus' => true,
|
345 |
'twitterStatus' => true,
|
346 |
'emailStatus' => true,
|
@@ -459,6 +468,7 @@ $disablePopupOverlay = sgBoolToChecked($popupProDefaultValues['disablePopupOverl
|
|
459 |
$autoClosePopup = sgBoolToChecked($popupProDefaultValues['autoClosePopup']);
|
460 |
$randomPopup = sgBoolToChecked($popupProDefaultValues['randomPopup']);
|
461 |
$popupOpenSound = sgBoolToChecked($popupProDefaultValues['popupOpenSound']);
|
|
|
462 |
$fbStatus = sgBoolToChecked($popupProDefaultValues['fbStatus']);
|
463 |
$twitterStatus = sgBoolToChecked($popupProDefaultValues['twitterStatus']);
|
464 |
$emailStatus = sgBoolToChecked($popupProDefaultValues['emailStatus']);
|
@@ -546,6 +556,9 @@ $dontShowContentToContactedUser = sgBoolToChecked($popupProDefaultValues['dont-s
|
|
546 |
$contactSuccessFrequencyDays = $popupProDefaultValues['contact-success-frequency-days'];
|
547 |
$contactSuccessRedirectNewTab = $popupProDefaultValues['contact-success-redirect-new-tab'];
|
548 |
$popupOpenSoundFile = $popupProDefaultValues['popupOpenSoundFile'];
|
|
|
|
|
|
|
549 |
|
550 |
function sgBoolToChecked($var)
|
551 |
{
|
@@ -604,6 +617,7 @@ $sgDisablePopupOverlay = @sgSetChecked($sgDisablePopupOverlay, $disablePopupOver
|
|
604 |
$sgAutoClosePopup = @sgSetChecked($sgAutoClosePopup, $autoClosePopup);
|
605 |
$sgRandomPopup = @sgSetChecked($sgRandomPopup, $randomPopup);
|
606 |
$sgPopupOpenSound = @sgSetChecked($sgPopupOpenSound, $popupOpenSound);
|
|
|
607 |
$sgFbStatus = @sgSetChecked($sgFbStatus, $fbStatus);
|
608 |
$sgTwitterStatus = @sgSetChecked($sgTwitterStatus, $twitterStatus);
|
609 |
$sgEmailStatus = @sgSetChecked($sgEmailStatus, $emailStatus);
|
@@ -654,6 +668,9 @@ function sgSetChecked($optionsParam,$defaultOption)
|
|
654 |
|
655 |
$sgTheme3BorderRadius = @sgGetValue($sgTheme3BorderRadius, $theme3BorderRadius);
|
656 |
$sgPopupOpenSoundFile = @sgGetValue($sgPopupOpenSoundFile, $popupOpenSoundFile);
|
|
|
|
|
|
|
657 |
$sgOpacity = @sgGetValue($sgOpacity, $opacityValue);
|
658 |
$sgPopupBackgroundOpacity = @sgGetValue($sgPopupBackgroundOpacity, $popupBackgroundOpacity);
|
659 |
$sgWidth = @sgGetValue($sgWidth, $width);
|
@@ -1025,6 +1042,19 @@ $sgPopupEffects = array(
|
|
1025 |
'sgpb-fadeIn' => 'fadeIn'
|
1026 |
);
|
1027 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1028 |
$sgPopupTheme = array(
|
1029 |
'colorbox1.css',
|
1030 |
'colorbox2.css',
|
@@ -1196,14 +1226,17 @@ if (isset($_GET["titleError"])): ?>
|
|
1196 |
<?php else: ?>
|
1197 |
<h2>Create new popup</h2>
|
1198 |
<?php endif; ?>
|
|
|
1199 |
</div>
|
1200 |
<div class="button-wrapper">
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
<?php endif; ?>
|
1205 |
-
|
1206 |
-
|
|
|
|
|
1207 |
</div>
|
1208 |
</div>
|
1209 |
<div class="clear"></div>
|
@@ -1279,6 +1312,29 @@ if (isset($_GET["titleError"])): ?>
|
|
1279 |
</div>
|
1280 |
</div>
|
1281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1282 |
<span class="liquid-width">Popup opening delay:</span>
|
1283 |
<input class="input-width-static" type="text" name="delay" value="<?php echo esc_attr($delay);?>" pattern = "\d+" title="It must be number"/><span class="dashicons dashicons-info contentClick infoImageDelay sameImageStyle"></span><span class="infoDelay samefontStyle">Specify how long the popup appearance should be delayed after loading the page (in sec).</span></br>
|
1284 |
</div>
|
5 |
if (!$popupType) {
|
6 |
$popupType = 'html';
|
7 |
}
|
8 |
+
$popupCount = get_option('SGPBMaxOpenCount');
|
9 |
|
10 |
//Get current paths for popup, for addons it different
|
11 |
$paths = IntegrateExternalSettings::getCurrentPopupAppPaths($popupType);
|
151 |
$sgRandomPopup = @$jsonData['randomPopup'];
|
152 |
$sgPopupOpenSound = @$jsonData['popupOpenSound'];
|
153 |
$sgPopupOpenSoundFile = @$jsonData['popupOpenSoundFile'];
|
154 |
+
$sgPopupContentBgImage = @$jsonData['popupContentBgImage'];
|
155 |
+
$sgPopupContentBgImageUrl = @$jsonData['popupContentBgImageUrl'];
|
156 |
+
$sgPopupContentBackgroundSize = @$jsonData['popupContentBackgroundSize'];
|
157 |
+
$sgPopupContentBackgroundRepeat = @$jsonData['popupContentBackgroundRepeat'];
|
158 |
$sgCountryStatus = @$jsonData['countryStatus'];
|
159 |
$sgAllSelectedPages = @$jsonData['allSelectedPages'];
|
160 |
$sgAllSelectedCustomPosts = @$jsonData['allSelectedCustomPosts'];
|
345 |
'autoClosePopup' => false,
|
346 |
'randomPopup' => false,
|
347 |
'popupOpenSound' => false,
|
348 |
+
'popupContentBgImage' => false,
|
349 |
'popupOpenSoundFile' => SG_APP_POPUP_URL.'/files/lib/popupOpenSound.wav',
|
350 |
+
'popupContentBgImageUrl' => '',
|
351 |
+
'popupContentBackgroundSize' => 'cover',
|
352 |
+
'popupContentBackgroundRepeat' => 'no-repeat',
|
353 |
'fbStatus' => true,
|
354 |
'twitterStatus' => true,
|
355 |
'emailStatus' => true,
|
468 |
$autoClosePopup = sgBoolToChecked($popupProDefaultValues['autoClosePopup']);
|
469 |
$randomPopup = sgBoolToChecked($popupProDefaultValues['randomPopup']);
|
470 |
$popupOpenSound = sgBoolToChecked($popupProDefaultValues['popupOpenSound']);
|
471 |
+
$popupContentBgImage = sgBoolToChecked($popupProDefaultValues['popupContentBgImage']);
|
472 |
$fbStatus = sgBoolToChecked($popupProDefaultValues['fbStatus']);
|
473 |
$twitterStatus = sgBoolToChecked($popupProDefaultValues['twitterStatus']);
|
474 |
$emailStatus = sgBoolToChecked($popupProDefaultValues['emailStatus']);
|
556 |
$contactSuccessFrequencyDays = $popupProDefaultValues['contact-success-frequency-days'];
|
557 |
$contactSuccessRedirectNewTab = $popupProDefaultValues['contact-success-redirect-new-tab'];
|
558 |
$popupOpenSoundFile = $popupProDefaultValues['popupOpenSoundFile'];
|
559 |
+
$popupContentBgImageUrl = $popupProDefaultValues['popupContentBgImageUrl'];
|
560 |
+
$popupContentBackgroundSize = $popupProDefaultValues['popupContentBackgroundSize'];
|
561 |
+
$popupContentBackgroundRepeat = $popupProDefaultValues['popupContentBackgroundRepeat'];
|
562 |
|
563 |
function sgBoolToChecked($var)
|
564 |
{
|
617 |
$sgAutoClosePopup = @sgSetChecked($sgAutoClosePopup, $autoClosePopup);
|
618 |
$sgRandomPopup = @sgSetChecked($sgRandomPopup, $randomPopup);
|
619 |
$sgPopupOpenSound = @sgSetChecked($sgPopupOpenSound, $popupOpenSound);
|
620 |
+
$sgPopupContentBgImage = @sgSetChecked($sgPopupContentBgImage, $popupContentBgImage);
|
621 |
$sgFbStatus = @sgSetChecked($sgFbStatus, $fbStatus);
|
622 |
$sgTwitterStatus = @sgSetChecked($sgTwitterStatus, $twitterStatus);
|
623 |
$sgEmailStatus = @sgSetChecked($sgEmailStatus, $emailStatus);
|
668 |
|
669 |
$sgTheme3BorderRadius = @sgGetValue($sgTheme3BorderRadius, $theme3BorderRadius);
|
670 |
$sgPopupOpenSoundFile = @sgGetValue($sgPopupOpenSoundFile, $popupOpenSoundFile);
|
671 |
+
$sgPopupContentBackgroundSize = @sgGetValue($sgPopupContentBackgroundSize, $popupContentBackgroundSize);
|
672 |
+
$sgPopupContentBackgroundRepeat = @sgGetValue($sgPopupContentBackgroundRepeat, $popupContentBackgroundRepeat);
|
673 |
+
$sgPopupContentBgImageUrl = @sgGetValue($sgPopupContentBgImageUrl, $popupContentBgImageUrl);
|
674 |
$sgOpacity = @sgGetValue($sgOpacity, $opacityValue);
|
675 |
$sgPopupBackgroundOpacity = @sgGetValue($sgPopupBackgroundOpacity, $popupBackgroundOpacity);
|
676 |
$sgWidth = @sgGetValue($sgWidth, $width);
|
1042 |
'sgpb-fadeIn' => 'fadeIn'
|
1043 |
);
|
1044 |
|
1045 |
+
$sgPopupBgSizes = array(
|
1046 |
+
'auto' => 'Auto',
|
1047 |
+
'cover' => 'Cover',
|
1048 |
+
'contain' => 'Contain'
|
1049 |
+
);
|
1050 |
+
|
1051 |
+
$sgPopupBgRepeat = array(
|
1052 |
+
'repeat' => 'Repeat',
|
1053 |
+
'repeat-x' => 'Repeat x',
|
1054 |
+
'repeat-y' => 'Repeat y',
|
1055 |
+
'no-repeat' => 'Not repeat'
|
1056 |
+
);
|
1057 |
+
|
1058 |
$sgPopupTheme = array(
|
1059 |
'colorbox1.css',
|
1060 |
'colorbox2.css',
|
1226 |
<?php else: ?>
|
1227 |
<h2>Create new popup</h2>
|
1228 |
<?php endif; ?>
|
1229 |
+
<?php $pageUrl = SgPopupGetData::getPageUrl(); ?>
|
1230 |
</div>
|
1231 |
<div class="button-wrapper">
|
1232 |
+
<input type="submit" id="sg-save-button" class="button-primary" value="<?php echo 'Save Changes'; ?>">
|
1233 |
+
<?php if( !empty($pageUrl)): ?>
|
1234 |
+
<input type="button" class="sg-popup-preview button-primary sg-popup-general-option" data-page-url="<?php echo $pageUrl; ?>" value="Preview">
|
1235 |
<?php endif; ?>
|
1236 |
+
<?php if (POPUP_BUILDER_PKG == POPUP_BUILDER_PKG_FREE): ?>
|
1237 |
+
<input class="crud-to-pro" type="button" value="Upgrade to PRO version" onclick="window.open('<?php echo SG_POPUP_PRO_URL;?>')"><div class="clear"></div>
|
1238 |
+
<?php endif; ?>
|
1239 |
+
|
1240 |
</div>
|
1241 |
</div>
|
1242 |
<div class="clear"></div>
|
1312 |
</div>
|
1313 |
</div>
|
1314 |
|
1315 |
+
<?php if(!sgRemoveOption('popupContentBgImage')): ?>
|
1316 |
+
<span class="liquid-width">Popup background image:</span>
|
1317 |
+
<div class="input-width-static sg-display-inline">
|
1318 |
+
<input class="input-width-static js-popup-content-bg-image" type="checkbox" name="popupContentBgImage" <?php echo $sgPopupContentBgImage;?>></div><span class="dashicons dashicons-info repeatPopup same-image-style"></span><span class="infoSelectRepeat samefontStyle">Enable this option if you need to have background image for popup.</span><br>
|
1319 |
+
<div class="acordion-main-div-content js-popup-content-bg-image-wrapper">
|
1320 |
+
<span class="liquid-width">Background size:</span>
|
1321 |
+
<?php echo sgCreateSelect($sgPopupBgSizes,'popupContentBackgroundSize',esc_html(@$sgPopupContentBackgroundSize));?>
|
1322 |
+
<span class="liquid-width">Background repeat:</span>
|
1323 |
+
<?php echo sgCreateSelect($sgPopupBgRepeat,'popupContentBackgroundRepeat',esc_html(@$sgPopupContentBackgroundRepeat));?>
|
1324 |
+
|
1325 |
+
<div class="sg-wp-editor-container">
|
1326 |
+
<div class="liquid-width-div sg-vertical-top">
|
1327 |
+
<input id="js-upload-image-button" class="button popup-content-bg-image-btn" type="button" value="Select image">
|
1328 |
+
</div>
|
1329 |
+
<input class="input-width-static popup-content-bg-image-url" id="js-upload-image" type="text" size="36" name="popupContentBgImageUrl" value="<?php echo esc_attr($sgPopupContentBgImageUrl); ?>" >
|
1330 |
+
<span class="liquid-width-div"></span>
|
1331 |
+
<div class="show-image-contenier popup-content-bg-image-preview">
|
1332 |
+
<span class="no-image">(No image selected)</span>
|
1333 |
+
</div>
|
1334 |
+
</div>
|
1335 |
+
|
1336 |
+
</div>
|
1337 |
+
<?php endif; ?>
|
1338 |
<span class="liquid-width">Popup opening delay:</span>
|
1339 |
<input class="input-width-static" type="text" name="delay" value="<?php echo esc_attr($delay);?>" pattern = "\d+" title="It must be number"/><span class="dashicons dashicons-info contentClick infoImageDelay sameImageStyle"></span><span class="infoDelay samefontStyle">Specify how long the popup appearance should be delayed after loading the page (in sec).</span></br>
|
1340 |
</div>
|
files/sg_popup_save.php
CHANGED
@@ -14,6 +14,9 @@ function sgSanitize($optionsKey, $isTextField = false)
|
|
14 |
$optionsKey == "sg_contactForm" ||
|
15 |
$optionsKey == "all-selected-page" ||
|
16 |
$optionsKey == "all-selected-posts" ||
|
|
|
|
|
|
|
17 |
$isTextField == true
|
18 |
) {
|
19 |
if(POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
14 |
$optionsKey == "sg_contactForm" ||
|
15 |
$optionsKey == "all-selected-page" ||
|
16 |
$optionsKey == "all-selected-posts" ||
|
17 |
+
$optionsKey == "sg_popup_mailchimp" ||
|
18 |
+
$optionsKey == "sg_popup_aweber" ||
|
19 |
+
$optionsKey == "sg-mailchimp-form" ||
|
20 |
$isTextField == true
|
21 |
) {
|
22 |
if(POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
helpers/Integrate_external_settings.php
CHANGED
@@ -189,7 +189,11 @@ Class IntegrateExternalSettings {
|
|
189 |
'repetitivePopupPeriod' => sgSanitize('repetitivePopupPeriod'),
|
190 |
'randomPopup' => sgSanitize('randomPopup'),
|
191 |
'popupOpenSound' => sgSanitize('popupOpenSound'),
|
192 |
-
'popupOpenSoundFile' => sgSanitize('popupOpenSoundFile')
|
|
|
|
|
|
|
|
|
193 |
);
|
194 |
|
195 |
return $options;
|
189 |
'repetitivePopupPeriod' => sgSanitize('repetitivePopupPeriod'),
|
190 |
'randomPopup' => sgSanitize('randomPopup'),
|
191 |
'popupOpenSound' => sgSanitize('popupOpenSound'),
|
192 |
+
'popupOpenSoundFile' => sgSanitize('popupOpenSoundFile'),
|
193 |
+
'popupContentBgImage' => sgSanitize('popupContentBgImage'),
|
194 |
+
'popupContentBgImageUrl' => sgSanitize('popupContentBgImageUrl'),
|
195 |
+
'popupContentBackgroundSize' => sgSanitize('popupContentBackgroundSize'),
|
196 |
+
'popupContentBackgroundRepeat' => sgSanitize('popupContentBackgroundRepeat')
|
197 |
);
|
198 |
|
199 |
return $options;
|
helpers/SgPopupGetData.php
CHANGED
@@ -187,4 +187,34 @@ class SgPopupGetData {
|
|
187 |
|
188 |
return $allCustomPosts;
|
189 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
}
|
187 |
|
188 |
return $allCustomPosts;
|
189 |
}
|
190 |
+
|
191 |
+
public static function getPageUrl()
|
192 |
+
{
|
193 |
+
$args = array(
|
194 |
+
'sort_order' => 'asc',
|
195 |
+
'sort_column' => 'post_title',
|
196 |
+
'hierarchical' => 1,
|
197 |
+
'exclude' => '',
|
198 |
+
'include' => '',
|
199 |
+
'meta_key' => '',
|
200 |
+
'meta_value' => '',
|
201 |
+
'authors' => '',
|
202 |
+
'child_of' => 0,
|
203 |
+
'parent' => -1,
|
204 |
+
'exclude_tree' => '',
|
205 |
+
'number' => 2,
|
206 |
+
'offset' => 0,
|
207 |
+
'post_type' => 'page',
|
208 |
+
'post_status' => 'publish'
|
209 |
+
);
|
210 |
+
$pages = get_pages($args);
|
211 |
+
|
212 |
+
if(empty($pages[0])) {
|
213 |
+
return "";
|
214 |
+
}
|
215 |
+
|
216 |
+
$pageId = $pages[0]->ID;
|
217 |
+
$pageUrl = get_permalink($pageId);
|
218 |
+
return $pageUrl;
|
219 |
+
}
|
220 |
}
|
javascript/sg_popup_backend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function beckend() {
|
2 |
this.titleNotEmpty(); /* Check title is Empty */
|
3 |
this.showThemePicture(); /* Show themes pictures */
|
4 |
this.showEffects(); /* Show effect type */
|
5 |
this.pageAcordion(); /* For page accordion divs */
|
6 |
this.fixedPostionSelection(); /* Functionality for selected position */
|
7 |
this.showInfo(); /* Show description options */
|
8 |
this.opacityRange();
|
9 |
this.subOptionContents();
|
10 |
this.addCountries();
|
11 |
this.showCloseTextFieldForTheme();
|
12 |
this.popupReview();
|
13 |
this.colorPicekr(); /* Color picker */
|
14 |
this.switchPopupActive();
|
15 |
this.initAccordions();
|
16 |
});
|
17 |
jQuery('.sg-info-close').on('click', function() {
|
18 |
jQuery( ".sg-info-panel-wrapper" ).hide(300);
|
19 |
});
|
20 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"showMessage", jQuery('.js-subs-success-message-content'));
|
21 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"redirectToUrl", jQuery('.js-subs-success-redirect-content'));
|
22 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"openPopup", jQuery('.js-subs-success-popups-list-content'));
|
23 |
checkedElement.after(toggleContnet.css({'display':'inline-block'}));
|
|
|
24 |
this.titleNotEmpty(); /* Check title is Empty */
|
25 |
this.showThemePicture(); /* Show themes pictures */
|
26 |
this.showEffects(); /* Show effect type */
|
27 |
this.pageAcordion(); /* For page accordion divs */
|
28 |
this.fixedPostionSelection(); /* Functionality for selected position */
|
29 |
this.showInfo(); /* Show description options */
|
30 |
this.opacityRange();
|
31 |
this.subOptionContents();
|
32 |
this.addCountries();
|
33 |
this.showCloseTextFieldForTheme();
|
34 |
this.popupReview();
|
35 |
this.colorPicekr(); /* Color picker */
|
36 |
this.switchPopupActive();
|
37 |
this.initAccordions();
|
38 |
});
|
39 |
jQuery('.sg-info-close').on('click', function() {
|
40 |
jQuery( ".sg-info-panel-wrapper" ).hide(300);
|
41 |
});
|
42 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"showMessage", jQuery('.js-subs-success-message-content'));
|
43 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"redirectToUrl", jQuery('.js-subs-success-redirect-content'));
|
44 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"openPopup", jQuery('.js-subs-success-popups-list-content'));
|
45 |
checkedElement.after(toggleContnet.css({'display':'inline-block'}));
|
|
|
1 |
this.titleNotEmpty(); /* Check title is Empty */
|
2 |
this.showThemePicture(); /* Show themes pictures */
|
3 |
this.showEffects(); /* Show effect type */
|
4 |
this.pageAcordion(); /* For page accordion divs */
|
5 |
this.fixedPostionSelection(); /* Functionality for selected position */
|
6 |
this.showInfo(); /* Show description options */
|
7 |
this.opacityRange();
|
8 |
this.subOptionContents();
|
9 |
this.addCountries();
|
10 |
this.showCloseTextFieldForTheme();
|
11 |
this.popupReview();
|
12 |
this.colorPicekr(); /* Color picker */
|
13 |
this.switchPopupActive();
|
14 |
this.initAccordions();
|
15 |
});
|
16 |
jQuery('.sg-info-close').on('click', function() {
|
17 |
jQuery( ".sg-info-panel-wrapper" ).hide(300);
|
18 |
});
|
19 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"showMessage", jQuery('.js-subs-success-message-content'));
|
20 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"redirectToUrl", jQuery('.js-subs-success-redirect-content'));
|
21 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"openPopup", jQuery('.js-subs-success-popups-list-content'));
|
22 |
checkedElement.after(toggleContnet.css({'display':'inline-block'}));
|
23 |
+
function beckend() {
|
24 |
this.titleNotEmpty(); /* Check title is Empty */
|
25 |
this.showThemePicture(); /* Show themes pictures */
|
26 |
this.showEffects(); /* Show effect type */
|
27 |
this.pageAcordion(); /* For page accordion divs */
|
28 |
this.fixedPostionSelection(); /* Functionality for selected position */
|
29 |
this.showInfo(); /* Show description options */
|
30 |
this.opacityRange();
|
31 |
this.subOptionContents();
|
32 |
this.addCountries();
|
33 |
this.showCloseTextFieldForTheme();
|
34 |
this.popupReview();
|
35 |
this.colorPicekr(); /* Color picker */
|
36 |
this.switchPopupActive();
|
37 |
this.initAccordions();
|
38 |
});
|
39 |
jQuery('.sg-info-close').on('click', function() {
|
40 |
jQuery( ".sg-info-panel-wrapper" ).hide(300);
|
41 |
});
|
42 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"showMessage", jQuery('.js-subs-success-message-content'));
|
43 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"redirectToUrl", jQuery('.js-subs-success-redirect-content'));
|
44 |
this.radioButtonAcordion(jQuery("[name='subs-success-behavior']"),jQuery("[name='subs-success-behavior']:checked"),"openPopup", jQuery('.js-subs-success-popups-list-content'));
|
45 |
checkedElement.after(toggleContnet.css({'display':'inline-block'}));
|
javascript/sg_popup_frontend.js
CHANGED
@@ -109,11 +109,31 @@ SGPopup.prototype.init = function () {
|
|
109 |
this.popupOpenByCookie();
|
110 |
this.attacheShortCodeEvent();
|
111 |
this.attacheClickEvent();
|
|
|
112 |
this.attacheIframeEvent();
|
113 |
this.attacheConfirmEvent();
|
114 |
this.popupClassEventsTrigger();
|
115 |
};
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
SGPopup.prototype.attacheShortCodeEvent = function () {
|
118 |
|
119 |
var that = this;
|
@@ -708,7 +728,11 @@ SGPopup.prototype.colorboxEventsListener = function () {
|
|
708 |
var that = this;
|
709 |
var disablePageScrolling = this.varToBool(this.popupData['disable-page-scrolling']);
|
710 |
var popupOpenSound = this.varToBool(this.popupData['popupOpenSound']);
|
|
|
711 |
var popupOpenSoundFile = this.popupData['popupOpenSoundFile'];
|
|
|
|
|
|
|
712 |
var repetitivePopup = this.popupData['repetitivePopup'];
|
713 |
var repetitivePopupPeriod = this.popupData['repetitivePopupPeriod'];
|
714 |
repetitivePopupPeriod = parseInt(repetitivePopupPeriod)*1000;
|
@@ -743,6 +767,13 @@ SGPopup.prototype.colorboxEventsListener = function () {
|
|
743 |
SGPopup.soundValue = 1;
|
744 |
}
|
745 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
746 |
jQuery('#sgcolorbox').unbind("sgColorboxOnCompleate");
|
747 |
});
|
748 |
|
@@ -863,33 +894,33 @@ SGPopup.prototype.sgShowColorboxWithOptions = function () {
|
|
863 |
|
864 |
var popupPositionTop = that.getPositionPercent("50%", sgScreenHeight, sgPopupHeightPx);
|
865 |
var popupPositionLeft = that.getPositionPercent("50%", sgScreenWidth, staticPositionWidth);
|
|
|
866 |
|
867 |
-
if (popupPosition == 1) {
|
868 |
that.setFixedPosition('0%', '3%', false, false, 0, 0);
|
869 |
-
}
|
870 |
-
else if (popupPosition == 2) { // Left Top
|
871 |
that.setFixedPosition(popupPositionLeft, '3%', false, false, 0, 50);
|
872 |
-
}
|
873 |
-
else if (popupPosition == 3) { //Right Top
|
874 |
that.setFixedPosition(false, '3%', false, '0%', 0, 90);
|
875 |
-
}
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
|
|
|
|
880 |
sgPopupFixed = true;
|
881 |
that.setFixedPosition(false, false, false, false, 50, 50);
|
882 |
-
}
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
|
|
887 |
that.setFixedPosition('0%', false, '0%', false, 90, 0);
|
888 |
-
}
|
889 |
-
else if (popupPosition == 8) { // Center Bottom
|
890 |
that.setFixedPosition(popupPositionLeft, false, '0%', false, 90, 50);
|
891 |
-
}
|
892 |
-
else if (popupPosition == 9) { // Right Bottom
|
893 |
that.setFixedPosition(false, false, '0%', '0%', 90, 90);
|
894 |
}
|
895 |
if (!sgPopupFixed) {
|
@@ -940,7 +971,8 @@ SGPopup.prototype.sgShowColorboxWithOptions = function () {
|
|
940 |
var contentImage = jQuery(that.sgColorboxHref).find('img').first();
|
941 |
if(contentImage.length) {
|
942 |
var height = contentImage.attr('height');
|
943 |
-
|
|
|
944 |
}
|
945 |
}
|
946 |
jQuery('#sgcolorbox').removeAttr('style');
|
109 |
this.popupOpenByCookie();
|
110 |
this.attacheShortCodeEvent();
|
111 |
this.attacheClickEvent();
|
112 |
+
this.popupOpenByClickUrl();
|
113 |
this.attacheIframeEvent();
|
114 |
this.attacheConfirmEvent();
|
115 |
this.popupClassEventsTrigger();
|
116 |
};
|
117 |
|
118 |
+
SGPopup.prototype.popupOpenByClickUrl = function () {
|
119 |
+
|
120 |
+
var that = this;
|
121 |
+
if(jQuery("a[href*=sg-popup-id-]").length) {
|
122 |
+
jQuery("a[href*=sg-popup-id-]").each(function () {
|
123 |
+
jQuery(this).bind('click', function (e) {
|
124 |
+
e.preventDefault();
|
125 |
+
var href = jQuery(this).attr('href');
|
126 |
+
var splitData = href.split("sg-popup-id-");
|
127 |
+
|
128 |
+
if(typeof splitData[1] != 'undefined') {
|
129 |
+
var popupId = parseInt(splitData[1]);
|
130 |
+
that.showPopup(popupId, false);
|
131 |
+
}
|
132 |
+
})
|
133 |
+
});
|
134 |
+
}
|
135 |
+
};
|
136 |
+
|
137 |
SGPopup.prototype.attacheShortCodeEvent = function () {
|
138 |
|
139 |
var that = this;
|
728 |
var that = this;
|
729 |
var disablePageScrolling = this.varToBool(this.popupData['disable-page-scrolling']);
|
730 |
var popupOpenSound = this.varToBool(this.popupData['popupOpenSound']);
|
731 |
+
var popupContentBgImage = this.varToBool(this.popupData['popupContentBgImage']);
|
732 |
var popupOpenSoundFile = this.popupData['popupOpenSoundFile'];
|
733 |
+
var popupContentBgImageUrl = this.popupData['popupContentBgImageUrl'];
|
734 |
+
var popupContentBackgroundSize = this.popupData['popupContentBackgroundSize'];
|
735 |
+
var popupContentBackgroundRepeat = this.popupData['popupContentBackgroundRepeat'];
|
736 |
var repetitivePopup = this.popupData['repetitivePopup'];
|
737 |
var repetitivePopupPeriod = this.popupData['repetitivePopupPeriod'];
|
738 |
repetitivePopupPeriod = parseInt(repetitivePopupPeriod)*1000;
|
767 |
SGPopup.soundValue = 1;
|
768 |
}
|
769 |
}
|
770 |
+
if(popupContentBgImage) {
|
771 |
+
jQuery('#sgcboxLoadedContent').css({
|
772 |
+
'background-image': 'url('+popupContentBgImageUrl+')',
|
773 |
+
'background-size': popupContentBackgroundSize,
|
774 |
+
'background-repeat': popupContentBackgroundRepeat
|
775 |
+
});
|
776 |
+
}
|
777 |
jQuery('#sgcolorbox').unbind("sgColorboxOnCompleate");
|
778 |
});
|
779 |
|
894 |
|
895 |
var popupPositionTop = that.getPositionPercent("50%", sgScreenHeight, sgPopupHeightPx);
|
896 |
var popupPositionLeft = that.getPositionPercent("50%", sgScreenWidth, staticPositionWidth);
|
897 |
+
var posTopForSettings = popupPositionTop;
|
898 |
|
899 |
+
if (popupPosition == 1) {
|
900 |
that.setFixedPosition('0%', '3%', false, false, 0, 0);
|
901 |
+
} else if (popupPosition == 2) {
|
|
|
902 |
that.setFixedPosition(popupPositionLeft, '3%', false, false, 0, 50);
|
903 |
+
} else if (popupPosition == 3) {
|
|
|
904 |
that.setFixedPosition(false, '3%', false, '0%', 0, 90);
|
905 |
+
} else if (popupPosition == 4) {
|
906 |
+
|
907 |
+
if(isNaN(popupPositionTop)) {
|
908 |
+
posTopForSettings = false;
|
909 |
+
}
|
910 |
+
that.setFixedPosition('0%', posTopForSettings, false, false, posTopForSettings, 0);
|
911 |
+
} else if (popupPosition == 5) {
|
912 |
sgPopupFixed = true;
|
913 |
that.setFixedPosition(false, false, false, false, 50, 50);
|
914 |
+
} else if (popupPosition == 6) {
|
915 |
+
if(isNaN(popupPositionTop)) {
|
916 |
+
posTopForSettings = false;
|
917 |
+
}
|
918 |
+
that.setFixedPosition('0%', posTopForSettings, false, '0%', 50, 90);
|
919 |
+
} else if (popupPosition == 7) {
|
920 |
that.setFixedPosition('0%', false, '0%', false, 90, 0);
|
921 |
+
} else if (popupPosition == 8) {
|
|
|
922 |
that.setFixedPosition(popupPositionLeft, false, '0%', false, 90, 50);
|
923 |
+
} else if (popupPosition == 9) {
|
|
|
924 |
that.setFixedPosition(false, false, '0%', '0%', 90, 90);
|
925 |
}
|
926 |
if (!sgPopupFixed) {
|
971 |
var contentImage = jQuery(that.sgColorboxHref).find('img').first();
|
972 |
if(contentImage.length) {
|
973 |
var height = contentImage.attr('height');
|
974 |
+
height = parseInt(height);
|
975 |
+
contentImage.attr('style', 'height: '+height+' !important');
|
976 |
}
|
977 |
}
|
978 |
jQuery('#sgcolorbox').removeAttr('style');
|
javascript/sg_popup_javascript.php
CHANGED
@@ -17,6 +17,10 @@ function sg_popup_admin_scripts($hook) {
|
|
17 |
wp_register_script('javascript', SG_APP_POPUP_URL . '/javascript/sg_popup_backend.js', array('jquery', 'wp-color-picker'));
|
18 |
wp_enqueue_script('jquery');
|
19 |
wp_enqueue_script('javascript');
|
|
|
|
|
|
|
|
|
20 |
|
21 |
if(POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
22 |
wp_register_script('sg_popup_pro', SG_APP_POPUP_URL . '/javascript/sg_popup_backend_pro.js');
|
17 |
wp_register_script('javascript', SG_APP_POPUP_URL . '/javascript/sg_popup_backend.js', array('jquery', 'wp-color-picker'));
|
18 |
wp_enqueue_script('jquery');
|
19 |
wp_enqueue_script('javascript');
|
20 |
+
$localizedData = array(
|
21 |
+
'ajaxNonce' => wp_create_nonce('popup-builder-ajax', 'sgpbAjaxNonce')
|
22 |
+
);
|
23 |
+
wp_localize_script('javascript', 'backendLocalizedData', $localizedData);
|
24 |
|
25 |
if(POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
26 |
wp_register_script('sg_popup_pro', SG_APP_POPUP_URL . '/javascript/sg_popup_backend_pro.js');
|
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.4.
|
7 |
* Author: Popup Builder
|
8 |
* Author URI: http://www.sygnoos.com
|
9 |
* License: GPLv2
|
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.4.2
|
7 |
* Author: Popup Builder
|
8 |
* Author URI: http://www.sygnoos.com
|
9 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -115,7 +115,7 @@ With popup builder plugin you can insert any type of content, right into your Po
|
|
115 |
* 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.
|
116 |
|
117 |
|
118 |
-
<a href="
|
119 |
<div>
|
120 |
Customizing the look and feel of the popup is as important as the content itself. That's why Popup Builder gives you the ability to customize the timings, effects, position and size of the popup to your needs.
|
121 |
</div>
|
@@ -166,6 +166,12 @@ Go to the Popup Builder settings and set your desired options.
|
|
166 |
|
167 |
== Changelog ==
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
= Version 2.6.4.1 =
|
170 |
* Added popup counter feature.
|
171 |
* Added review section.
|
@@ -704,7 +710,7 @@ Leave us a good review :)
|
|
704 |
|
705 |
== Upgrade Notice ==
|
706 |
|
707 |
-
Current Version of Popup Builder is 2.6.4.
|
708 |
|
709 |
== Other Notes ==
|
710 |
|
115 |
* 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.
|
116 |
|
117 |
|
118 |
+
<a href="https://popup-builder.com" target="_blank">Get Popup Builder PRO package</a>
|
119 |
<div>
|
120 |
Customizing the look and feel of the popup is as important as the content itself. That's why Popup Builder gives you the ability to customize the timings, effects, position and size of the popup to your needs.
|
121 |
</div>
|
166 |
|
167 |
== Changelog ==
|
168 |
|
169 |
+
= Version 2.6.4.2 =
|
170 |
+
* Added popup preview option.
|
171 |
+
* Added popup background image option.
|
172 |
+
* Added new option to open popup from URL. Example `<a href="https://yoursite.com#sg-popup-id-1">Click Text</a>`
|
173 |
+
* Minor fixes and improvements.
|
174 |
+
|
175 |
= Version 2.6.4.1 =
|
176 |
* Added popup counter feature.
|
177 |
* Added review section.
|
710 |
|
711 |
== Upgrade Notice ==
|
712 |
|
713 |
+
Current Version of Popup Builder is 2.6.4.2
|
714 |
|
715 |
== Other Notes ==
|
716 |
|
style/sg_popup_style.css
CHANGED
@@ -316,12 +316,13 @@ div.sg-hide {
|
|
316 |
|
317 |
.crud-to-pro {
|
318 |
float: right;
|
319 |
-
margin-top:
|
320 |
background-color: #D54E21;
|
321 |
border: 1px solid #D54E21;
|
322 |
color: white;
|
323 |
cursor: pointer;
|
324 |
-
margin-right:
|
|
|
325 |
}
|
326 |
|
327 |
.sg-js-delete-link,
|
@@ -332,6 +333,13 @@ div.sg-hide {
|
|
332 |
#sg-save-button {
|
333 |
float: right;
|
334 |
margin-right: 30px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
}
|
336 |
|
337 |
.improve-icon {
|
@@ -1583,6 +1591,20 @@ input:checked + .sg-slider:before {
|
|
1583 |
padding: 6px 0px 6px 0px;
|
1584 |
}
|
1585 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1586 |
@media(max-width: 1042px) {
|
1587 |
.sg-black-info {
|
1588 |
width: 200px;
|
316 |
|
317 |
.crud-to-pro {
|
318 |
float: right;
|
319 |
+
margin-top: 12px;
|
320 |
background-color: #D54E21;
|
321 |
border: 1px solid #D54E21;
|
322 |
color: white;
|
323 |
cursor: pointer;
|
324 |
+
margin-right: 15px;
|
325 |
+
padding: 4px;
|
326 |
}
|
327 |
|
328 |
.sg-js-delete-link,
|
333 |
#sg-save-button {
|
334 |
float: right;
|
335 |
margin-right: 30px;
|
336 |
+
margin-top: 10px !important;
|
337 |
+
}
|
338 |
+
|
339 |
+
.sg-popup-preview {
|
340 |
+
float: right !important;
|
341 |
+
margin-right: 9px !important;
|
342 |
+
margin-top: 10px !important;
|
343 |
}
|
344 |
|
345 |
.improve-icon {
|
1591 |
padding: 6px 0px 6px 0px;
|
1592 |
}
|
1593 |
|
1594 |
+
.popup-content-bg-image-btn {
|
1595 |
+
width: 128px !important;
|
1596 |
+
}
|
1597 |
+
|
1598 |
+
div.popup-content-bg-image-preview {
|
1599 |
+
margin: 14px 0 !important;
|
1600 |
+
display: inline-block;
|
1601 |
+
}
|
1602 |
+
|
1603 |
+
.popup-content-bg-image-url {
|
1604 |
+
width: 44% !important;
|
1605 |
+
min-width: 165px !important;
|
1606 |
+
}
|
1607 |
+
|
1608 |
@media(max-width: 1042px) {
|
1609 |
.sg-black-info {
|
1610 |
width: 200px;
|