Popup Builder – Responsive WordPress Pop up - Version 2.1.4

Version Description

Download this release

Release Info

Developer Sygnoos
Plugin Icon 128x128 Popup Builder – Responsive WordPress Pop up
Version 2.1.4
Comparing to
See all releases

Code changes from version 2.1.3 to 2.1.4

Files changed (47) hide show
  1. classes/PopupInstaller.php +9 -0
  2. classes/SGHtmlPopup.php +10 -7
  3. classes/SGPopup.php +11 -0
  4. classes/SGShortcodePopup.php +55 -0
  5. files/main_section/fblike.php +2 -1
  6. files/main_section/html.php +2 -1
  7. files/main_section/shortcode.php +2 -0
  8. files/options_section/shortcode.php +25 -0
  9. files/sg_functions.php +1 -1
  10. files/sg_popup_ajax.php +20 -0
  11. files/sg_popup_create.php +12 -9
  12. files/sg_popup_create_new.php +209 -12
  13. files/sg_popup_main.php +0 -0
  14. files/sg_popup_page_selection.php +0 -0
  15. files/sg_popup_save.php +44 -12
  16. img/ContactFormButtonPro.png +0 -0
  17. img/ShortcodePopup.png +0 -0
  18. img/ShortcodePopupPro.png +0 -0
  19. img/default-image.png +0 -0
  20. img/down_arrow-2x.gif +0 -0
  21. img/info.png +0 -0
  22. img/theme1.jpg +0 -0
  23. img/theme2.jpg +0 -0
  24. img/theme3.jpg +0 -0
  25. img/theme4.jpg +0 -0
  26. img/theme5.jpg +0 -0
  27. img/wpspin_light.gif +0 -0
  28. javascript/bootstrap-tagsinput.js +0 -617
  29. javascript/jquery.cookie.js +0 -117
  30. javascript/jquery.sgcolorbox-min.js +1 -1
  31. javascript/sg_datapickers.js +23 -15
  32. javascript/sg_popup_backend.js +1 -1
  33. javascript/sg_popup_frontend.js +5 -6
  34. javascript/sg_popup_javascript.php +3 -2
  35. javascript/sg_popup_rangeslider.js +0 -0
  36. javascript/sg_popup_support_plugins.js +26 -0
  37. popup-builder.php +50 -25
  38. readme.txt +24 -12
  39. style/animate.css +0 -0
  40. style/sg_popup_rangeslider.css +0 -0
  41. style/sg_popup_style.css +34 -6
  42. style/sg_popup_style.php +2 -10
  43. style/sgcolorbox/colorbox1.css +0 -0
  44. style/sgcolorbox/colorbox2.css +0 -0
  45. style/sgcolorbox/colorbox3.css +0 -0
  46. style/sgcolorbox/colorbox4.css +0 -0
  47. style/sgcolorbox/colorbox5.css +0 -0
classes/PopupInstaller.php CHANGED
@@ -25,12 +25,17 @@ class PopupInstaller
25
  `content` text NOT NULL,
26
  `options` text NOT NULL
27
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
 
 
 
 
28
 
29
 
30
  $wpdb->query($sgPopupBase);
31
  $wpdb->query($sgPopupImageBase);
32
  $wpdb->query($sgPopupHtmlBase);
33
  $wpdb->query($sgPopupFblikeBase);
 
34
  }
35
 
36
  public static function install()
@@ -65,11 +70,15 @@ class PopupInstaller
65
 
66
  $popupFblikeTable = $wpdb->prefix.$blogsId."sg_fblike_popup";
67
  $popupFblikeSql = "DROP TABLE ". $popupFblikeTable;
 
 
 
68
 
69
  $wpdb->query($popupSql);
70
  $wpdb->query($popupImageSql);
71
  $wpdb->query($popupHtmlSql);
72
  $wpdb->query($popupFblikeSql);
 
73
  }
74
 
75
  public static function deleteSgPopupOptions($blogsId)
25
  `content` text NOT NULL,
26
  `options` text NOT NULL
27
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
28
+ $sgPopupShortcodeBase = "CREATE TABLE IF NOT EXISTS ". $wpdb->prefix.$blogsId."sg_shortCode_popup (
29
+ `id` int(12) NOT NULL,
30
+ `url` text NOT NULL
31
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;";
32
 
33
 
34
  $wpdb->query($sgPopupBase);
35
  $wpdb->query($sgPopupImageBase);
36
  $wpdb->query($sgPopupHtmlBase);
37
  $wpdb->query($sgPopupFblikeBase);
38
+ $wpdb->query($sgPopupShortcodeBase);
39
  }
40
 
41
  public static function install()
70
 
71
  $popupFblikeTable = $wpdb->prefix.$blogsId."sg_fblike_popup";
72
  $popupFblikeSql = "DROP TABLE ". $popupFblikeTable;
73
+
74
+ $popupShortcodeTable = $wpdb->prefix.$blogId."sg_shortCode_popup";
75
+ $popupShortcodeSql = "DROP TABLE ". $popupShortcodeTable;
76
 
77
  $wpdb->query($popupSql);
78
  $wpdb->query($popupImageSql);
79
  $wpdb->query($popupHtmlSql);
80
  $wpdb->query($popupFblikeSql);
81
+ $wpdb->query($popupShortcodeSql);
82
  }
83
 
84
  public static function deleteSgPopupOptions($blogsId)
classes/SGHtmlPopup.php CHANGED
@@ -12,7 +12,7 @@ class SGHtmlPopup extends SGPopup {
12
  }
13
  public static function create($data, $obj = null) {
14
  $obj = new self();
15
-
16
  $obj->setContent($data['html']);
17
 
18
  return parent::create($data, $obj);
@@ -20,26 +20,26 @@ class SGHtmlPopup extends SGPopup {
20
  public function save($data = array()) {
21
 
22
  $editMode = $this->getId()?true:false;
23
-
24
  $res = parent::save($data);
25
  if ($res===false) return false;
26
-
27
  $sgHtmlPopup = $this->getContent();
28
 
29
  global $wpdb;
30
  if ($editMode) {
31
  $sgHtmlPopup = stripslashes($sgHtmlPopup);
32
- $sql = $wpdb->prepare("UPDATE ". $wpdb->prefix ."sg_html_popup SET content=%s WHERE id=%d",$sgHtmlPopup,$this->getId());
33
  $res = $wpdb->query($sql);
34
  }
35
  else {
36
 
37
- $sql = $wpdb->prepare( "INSERT INTO ". $wpdb->prefix ."sg_html_popup (id, content) VALUES (%d,%s)",$this->getId(),$sgHtmlPopup);
38
  $res = $wpdb->query($sql);
39
  }
40
  return $res;
41
  }
42
-
43
  protected function setCustomOptions($id) {
44
  global $wpdb;
45
  $st = $wpdb->prepare("SELECT * FROM ". $wpdb->prefix ."sg_html_popup WHERE id = %d",$id);
@@ -48,7 +48,10 @@ class SGHtmlPopup extends SGPopup {
48
  }
49
 
50
  protected function getExtraRenderOptions() {
51
- return array('html'=>$this->getContent());
 
 
 
52
  }
53
 
54
  public function render() {
12
  }
13
  public static function create($data, $obj = null) {
14
  $obj = new self();
15
+
16
  $obj->setContent($data['html']);
17
 
18
  return parent::create($data, $obj);
20
  public function save($data = array()) {
21
 
22
  $editMode = $this->getId()?true:false;
23
+
24
  $res = parent::save($data);
25
  if ($res===false) return false;
26
+
27
  $sgHtmlPopup = $this->getContent();
28
 
29
  global $wpdb;
30
  if ($editMode) {
31
  $sgHtmlPopup = stripslashes($sgHtmlPopup);
32
+ $sql = $wpdb->prepare("UPDATE ". $wpdb->prefix ."sg_html_popup SET content=%s WHERE id=%d",$sgHtmlPopup,$this->getId());
33
  $res = $wpdb->query($sql);
34
  }
35
  else {
36
 
37
+ $sql = $wpdb->prepare( "INSERT INTO ". $wpdb->prefix ."sg_html_popup (id, content) VALUES (%d,%s)",$this->getId(),$sgHtmlPopup);
38
  $res = $wpdb->query($sql);
39
  }
40
  return $res;
41
  }
42
+
43
  protected function setCustomOptions($id) {
44
  global $wpdb;
45
  $st = $wpdb->prepare("SELECT * FROM ". $wpdb->prefix ."sg_html_popup WHERE id = %d",$id);
48
  }
49
 
50
  protected function getExtraRenderOptions() {
51
+ $content = $this->getContent();
52
+ $content = $this->improveContent($content);
53
+
54
+ return array('html' => $content);
55
  }
56
 
57
  public function render() {
classes/SGPopup.php CHANGED
@@ -214,6 +214,17 @@ abstract class SGPopup {
214
  update_post_meta($post_id, 'wp_sg_popup' , $popupId);
215
  }
216
 
 
 
 
 
 
 
 
 
 
 
 
217
 
218
  public function render() {
219
  $parentOption = array('id'=>$this->getId(),'title'=>$this->getTitle(),'type'=>$this->getType(),'effect'=>$this->getEffect(),'width',$this->getWidth(),'height'=>$this->getHeight(),'delay'=>$this->getDelay(),'duration'=>$this->getEffectDuration(),'initialWidth',$this->getInitialWidth(),'initialHeight'=>$this->getInitialHeight());
214
  update_post_meta($post_id, 'wp_sg_popup' , $popupId);
215
  }
216
 
217
+ public function getRemoveOptions() {
218
+ return array();
219
+ }
220
+
221
+ public function improveContent($content) {
222
+ if(SG_POPUP_PRO) {
223
+ require_once(SG_APP_POPUP_FILES ."/sg_popup_pro.php");
224
+ return SgPopupPro::sgPopupExtraSanitize($content);
225
+ }
226
+ return $content;
227
+ }
228
 
229
  public function render() {
230
  $parentOption = array('id'=>$this->getId(),'title'=>$this->getTitle(),'type'=>$this->getType(),'effect'=>$this->getEffect(),'width',$this->getWidth(),'height'=>$this->getHeight(),'delay'=>$this->getDelay(),'duration'=>$this->getEffectDuration(),'initialWidth',$this->getInitialWidth(),'initialHeight'=>$this->getInitialHeight());
classes/SGShortcodePopup.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once(dirname(__FILE__).'/SGPopup.php');
3
+ class SGShortcodePopup extends SGPopup {
4
+ private $shortcode;
5
+
6
+ public function setShortcode($shortcode) {
7
+ $this->shortcode = $shortcode;
8
+ }
9
+ public function getShortcode() {
10
+ return $this->shortcode;
11
+ }
12
+ public static function create($data, $obj = null) {
13
+ $obj = new self();
14
+
15
+ $obj->setShortcode($data['shortcode']);
16
+
17
+ parent::create($data, $obj);
18
+ }
19
+ public function save($data = array()) {
20
+
21
+ $editMode = $this->getId()?true:false;
22
+
23
+ $res = parent::save($data);
24
+
25
+ if ($res===false) return false;
26
+ global $wpdb;
27
+ if ($editMode) {
28
+
29
+ $sqlUp = $wpdb->prepare("UPDATE ". $wpdb->prefix ."sg_shortCode_popup SET url=%s WHERE id=%d",$this->getShortcode(),$this->getId());
30
+ $res = $wpdb->query($sqlUp);
31
+ }
32
+ else {
33
+ $sql = $wpdb->prepare( "INSERT INTO ". $wpdb->prefix ."sg_shortCode_popup (id, url) VALUES (%d,%s)",$this->getId(),$this->getShortcode());
34
+ $res = $wpdb->query($sql);
35
+ }
36
+ return $res;
37
+ }
38
+ protected function setCustomOptions($id) {
39
+ global $wpdb;
40
+
41
+ $st = $wpdb->prepare("SELECT * FROM ". $wpdb->prefix ."sg_shortCode_popup WHERE id = %d",$id);
42
+ $arr = $wpdb->get_row($st,ARRAY_A);
43
+
44
+ $this->setShortcode($arr['url']);
45
+ }
46
+ protected function getExtraRenderOptions() {
47
+ return array(
48
+ 'shortcode'=>do_shortcode($this->getShortcode())
49
+ );
50
+ }
51
+
52
+ public function render() {
53
+ return parent::render();
54
+ }
55
+ }
files/main_section/fblike.php CHANGED
@@ -1,4 +1,5 @@
1
  <div class="sg-wp-editor-container">
 
2
  <?php
3
  $content = @$sgPopupDataFblike;
4
  $editorId = 'sg_popup_fblike';
@@ -12,4 +13,4 @@
12
  );
13
  wp_editor($content, $editorId, $settings);
14
  ?>
15
- </div>
1
  <div class="sg-wp-editor-container">
2
+ <span class="shortcode-use-info">NOTE: Shortcodes don't work inside the HTML Popup. Please use <a href="<?php echo SG_APP_POPUP_ADMIN_URL?>admin.php?page=edit-popup&type=shortcode">Shortcode Popup</a> instead.</span>
3
  <?php
4
  $content = @$sgPopupDataFblike;
5
  $editorId = 'sg_popup_fblike';
13
  );
14
  wp_editor($content, $editorId, $settings);
15
  ?>
16
+ </div>
files/main_section/html.php CHANGED
@@ -1,4 +1,5 @@
1
  <div class="sg-wp-editor-container">
 
2
  <?php
3
  $content = @$sgPopupDataHtml;
4
  $editorId = 'sg_popup_html';
@@ -12,4 +13,4 @@
12
  );
13
  wp_editor($content, $editorId, $settings);
14
  ?>
15
- </div>
1
  <div class="sg-wp-editor-container">
2
+ <span class="shortcode-use-info">NOTE: Shortcodes don't work inside the HTML Popup. Please use <a href="<?php echo SG_APP_POPUP_ADMIN_URL?>admin.php?page=edit-popup&type=shortcode">Shortcode Popup</a> instead.</span>
3
  <?php
4
  $content = @$sgPopupDataHtml;
5
  $editorId = 'sg_popup_html';
13
  );
14
  wp_editor($content, $editorId, $settings);
15
  ?>
16
+ </div>
files/main_section/shortcode.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <span class="liquid-width">Enter shortcode:</span>
2
+ <input class="input-width-static" type="text" name="shortcode" value="<?php echo esc_attr(@$sgPopupDataShortcode);?>"><br>
files/options_section/shortcode.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="special-options">
2
+ <div id="post-body" class="metabox-holder columns-2">
3
+ <div id="postbox-container-2" class="postbox-container">
4
+ <div id="normal-sortables" class="meta-box-sortables ui-sortable">
5
+ <div class="postbox popup-builder-special-postbox">
6
+ <div class="handlediv js-special-title" title="Click to toggle"><br></div>
7
+ <h3 class="hndle ui-sortable-handle js-special-title">
8
+ <span>
9
+ <?php
10
+ global $POPUP_TITLES;
11
+ $popupTypeTitle = $POPUP_TITLES[$popupType];
12
+ echo $popupTypeTitle." <span>options</span>";
13
+ ?>
14
+ </span>
15
+ </h3>
16
+ <div class="inside">
17
+ <div class="special-options-content">
18
+ <p>No options</p>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </div>
files/sg_functions.php CHANGED
@@ -10,4 +10,4 @@ class SGFunctions
10
  $sgInfo .= "<a href=\"https://www.youtube.com/watch?v=3ZwRKPhHMzY\" target=\"_blank\">How to create a popup</a>";
11
  echo $sgInfo;
12
  }
13
- }
10
  $sgInfo .= "<a href=\"https://www.youtube.com/watch?v=3ZwRKPhHMzY\" target=\"_blank\">How to create a popup</a>";
11
  echo $sgInfo;
12
  }
13
+ }
files/sg_popup_ajax.php CHANGED
@@ -11,3 +11,23 @@ function sgPopupDelete()
11
  }
12
 
13
  add_action('wp_ajax_delete_popup', 'sgPopupDelete');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  }
12
 
13
  add_action('wp_ajax_delete_popup', 'sgPopupDelete');
14
+
15
+ function sgFrontend() {
16
+ global $wpdb;
17
+ parse_str($_POST['subsribers'], $subsribers);
18
+ $email = $subsribers['subs-email-name'];
19
+ $firstName = $subsribers['subs-first-name'];
20
+ $lastName = $subsribers['subs-last-name'];
21
+ $title = $subsribers['subs-popup-title'];
22
+
23
+ $query = $wpdb->prepare("SELECT id FROM ". $wpdb->prefix ."sg_subscribers WHERE email = %s AND subscriptionType = %s", $email, $title);
24
+ $list = $wpdb->get_row($query, ARRAY_A);
25
+ if(!isset($list['id'])) {
26
+ $sql = $wpdb->prepare("INSERT INTO ".$wpdb->prefix."sg_subscribers (firstName, lastName, email, subscriptionType) VALUES (%s, %s, %s, %s)", $firstName, $lastName, $email, $title);
27
+ $res = $wpdb->query($sql);
28
+ }
29
+ die();
30
+ }
31
+
32
+ add_action('wp_ajax_nopriv_subs_send_mail', 'sgFrontend');
33
+ add_action('wp_ajax_subs_send_mail', 'sgFrontend');
files/sg_popup_create.php CHANGED
@@ -12,15 +12,15 @@
12
  <div class="popups-div fblike-popup">
13
  </div>
14
  </a>
 
 
 
 
15
  <?php if(SG_POPUP_PRO): ?>
16
  <a class="create-popup-link" href="<?php echo SG_APP_POPUP_ADMIN_URL?>admin.php?page=edit-popup&type=iframe">
17
  <div class="popups-div iframe-popup">
18
  </div>
19
  </a>
20
- <a class="create-popup-link" href="<?php echo SG_APP_POPUP_ADMIN_URL?>admin.php?page=edit-popup&type=shortcode">
21
- <div class="popups-div shortcode-popup">
22
- </div>
23
- </a>
24
  <a class="create-popup-link" href="<?php echo SG_APP_POPUP_ADMIN_URL?>admin.php?page=edit-popup&type=video">
25
  <div class="popups-div video-popup">
26
  </div>
@@ -41,17 +41,16 @@
41
  <div class="popups-div sg-exit-intent">
42
  </div>
43
  </a>
44
-
 
 
 
45
  <?php endif; ?>
46
  <?php if (SG_POPUP_PRO == 0): ?>
47
  <a class="create-popup-link" href="<?php echo SG_POPUP_PRO_URL;?>" target="_blank">
48
  <div class="popups-div iframe-popup-pro">
49
  </div>
50
  </a>
51
- <a class="create-popup-link" href="<?php echo SG_POPUP_PRO_URL;?>" target="_blank">
52
- <div class="popups-div shortcode-popup-pro">
53
- </div>
54
- </a>
55
  <a class="create-popup-link" href="<?php echo SG_POPUP_PRO_URL;?>" target="_blank">
56
  <div class="popups-div video-popup-pro">
57
  </div>
@@ -76,5 +75,9 @@
76
  <div class="popups-div subscription-pro">
77
  </div>
78
  </a>
 
 
 
 
79
  <?php endif; ?>
80
  </div>
12
  <div class="popups-div fblike-popup">
13
  </div>
14
  </a>
15
+ <a class="create-popup-link" href="<?php echo SG_APP_POPUP_ADMIN_URL?>admin.php?page=edit-popup&type=shortcode">
16
+ <div class="popups-div shortcode-popup">
17
+ </div>
18
+ </a>
19
  <?php if(SG_POPUP_PRO): ?>
20
  <a class="create-popup-link" href="<?php echo SG_APP_POPUP_ADMIN_URL?>admin.php?page=edit-popup&type=iframe">
21
  <div class="popups-div iframe-popup">
22
  </div>
23
  </a>
 
 
 
 
24
  <a class="create-popup-link" href="<?php echo SG_APP_POPUP_ADMIN_URL?>admin.php?page=edit-popup&type=video">
25
  <div class="popups-div video-popup">
26
  </div>
41
  <div class="popups-div sg-exit-intent">
42
  </div>
43
  </a>
44
+ <a class="create-popup-link" href="<?php echo SG_APP_POPUP_ADMIN_URL?>admin.php?page=edit-popup&type=subscription">
45
+ <div class="popups-div sg-subscription">
46
+ </div>
47
+ </a>
48
  <?php endif; ?>
49
  <?php if (SG_POPUP_PRO == 0): ?>
50
  <a class="create-popup-link" href="<?php echo SG_POPUP_PRO_URL;?>" target="_blank">
51
  <div class="popups-div iframe-popup-pro">
52
  </div>
53
  </a>
 
 
 
 
54
  <a class="create-popup-link" href="<?php echo SG_POPUP_PRO_URL;?>" target="_blank">
55
  <div class="popups-div video-popup-pro">
56
  </div>
75
  <div class="popups-div subscription-pro">
76
  </div>
77
  </a>
78
+ <a class="create-popup-link" href="<?php echo SG_POPUP_PRO_URL;?>" target="_blank">
79
+ <div class="popups-div contact-pro">
80
+ </div>
81
+ </a>
82
  <?php endif; ?>
83
  </div>
files/sg_popup_create_new.php CHANGED
@@ -20,6 +20,7 @@
20
  break;
21
  case 'video':
22
  $sgPopupDataVideo = $result->getRealUrl();
 
23
  break;
24
  case 'image':
25
  $sgPopupDataImage = $result->getUrl();
@@ -45,7 +46,7 @@
45
  $countdownOptions = json_decode(sgSafeStr($result->getCountdownOptions()),true);
46
  $sgCountdownNumbersBgColor = $countdownOptions['countdownNumbersBgColor'];
47
  $sgCountdownNumbersTextColor = $countdownOptions['countdownNumbersTextColor'];
48
- $sgDueData = $countdownOptions['sg-due-date'];
49
  @$sgGetCountdownType = $countdownOptions['sg-countdown-type'];
50
  $sgCountdownLang = $countdownOptions['counts-language'];
51
  $sgCountdownPosition = $countdownOptions['coundown-position'];
@@ -53,11 +54,22 @@
53
  break;
54
  case 'social':
55
  $sgSocialContent = ($result->getSocialContent());
56
- $sgSocialButtons = sgSafeStr($result->getButtons());
57
  $sgSocialOptions = sgSafeStr($result->getSocialOptions());
58
  break;
 
 
 
 
 
 
 
 
59
  }
60
 
 
 
 
61
  $title = $result->getTitle();
62
  $jsonData = json_decode($result->getOptions(), true);
63
  $sgEscKey = @$jsonData['escKey'];
@@ -82,6 +94,7 @@
82
  $sgMaxWidth = @$jsonData['maxWidth'];
83
  $sgMaxHeight = @$jsonData['maxHeight'];
84
  $sgForMobile = @$jsonData['forMobile'];
 
85
  $sgAllPages = @$jsonData['allPages'];
86
  $sgRepeatPopup = @$jsonData['repeatPopup'];
87
  $sgDisablePopup = @$jsonData['disablePopup'];
@@ -118,12 +131,38 @@
118
  $sgSocialShareCount = @sgSafeStr($sgSocialOptions['sgSocialShareCount']);
119
  $sgRoundButton = @sgSafeStr($sgSocialOptions['sgRoundButton']);
120
  $sgPushToBottom = @sgSafeStr($jsonData['pushToBottom']);
 
 
 
 
 
 
121
  $sgFlikeOptions = json_decode(@$sgFlikeOptions, true);
122
  $sgFblikeurl = @$sgFlikeOptions['fblike-like-url'];
123
  $sgFbLikeLayout = @$sgFlikeOptions['fblike-layout'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  }
125
 
126
-
127
  $sgPopup = array(
128
  'escKey'=> true,
129
  'closeButton' => true,
@@ -150,7 +189,9 @@
150
  $popupProDefaultValues = array(
151
  'closeType' => false,
152
  'onScrolling' => false,
 
153
  'forMobile' => false,
 
154
  'repetPopup' => false,
155
  'disablePopup' => false,
156
  'autoClosePopup' => false,
@@ -162,7 +203,7 @@
162
  'pinterestStatus' => true,
163
  'sgSocialLabel'=>true,
164
  'roundButtons'=>false,
165
- 'sgShareUrl' => 'http//',
166
  'pushToBottom' => true,
167
  'allPages' => false,
168
  'countdownNumbersTextColor' => '',
@@ -170,7 +211,29 @@
170
  'countDownLang' => 'English',
171
  'countdown-position' => true,
172
  'time-zone' => 'Etc/GMT',
173
- 'due-date' => date('Y-m-d', strtotime(' +1 day'))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  );
175
 
176
  $escKey = sgBoolToChecked($sgPopup['escKey']);
@@ -183,6 +246,7 @@
183
  $closeType = sgBoolToChecked($popupProDefaultValues['closeType']);
184
  $onScrolling = sgBoolToChecked($popupProDefaultValues['onScrolling']);
185
  $forMobile = sgBoolToChecked($popupProDefaultValues['forMobile']);
 
186
  $repetPopup = sgBoolToChecked($popupProDefaultValues['repetPopup']);
187
  $disablePopup = sgBoolToChecked($popupProDefaultValues['disablePopup']);
188
  $autoClosePopup = sgBoolToChecked($popupProDefaultValues['autoClosePopup']);
@@ -203,12 +267,40 @@
203
  $countdownPosition = $popupProDefaultValues['countdown-position'];
204
  $timeZone = $popupProDefaultValues['time-zone'];
205
  $dueDate = $popupProDefaultValues['due-date'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
 
207
  function sgBoolToChecked($var)
208
  {
209
  return ($var?'checked':'');
210
  }
211
 
 
 
 
 
 
 
212
  $width = $sgPopup['width'];
213
  $height = $sgPopup['height'];
214
  $opacityValue = $sgPopup['opacity'];
@@ -234,6 +326,7 @@
234
  $sgCloseType = @sgSetChecked($sgCloseType, $closeType);
235
  $sgOnScrolling = @sgSetChecked($sgOnScrolling, $onScrolling);
236
  $sgForMobile = @sgSetChecked($sgForMobile, $forMobile);
 
237
  $sgRepeatPopup = @sgSetChecked($sgRepeatPopup, $repetPopup);
238
  $sgDisablePopup = @sgSetChecked($sgDisablePopup, $disablePopup);
239
  $sgAutoClosePopup = @sgSetChecked($sgAutoClosePopup, $autoClosePopup);
@@ -250,6 +343,9 @@
250
  @$sgAllPages = (get_option('SG_POPUP_ONLOAD_ID') && get_option('SG_POPUP_ONLOAD_ID') == $id)? true: false;
251
  $sgAllPages = @sgSetChecked($sgAllPages, $allPages);
252
  $sgCountdownPosition = @sgSetChecked($sgCountdownPosition, $countdownPosition);
 
 
 
253
 
254
  function sgSetChecked($optionsParam,$defaultOption)
255
  {
@@ -283,7 +379,27 @@
283
  $sgCountdownNumbersBgColor = @sgGetValue($sgCountdownNumbersBgColor, $countdownNumbersBgColor);
284
  $sgCountdownLang = @sgGetValue($sgCountdownLang, $countdownLang);
285
  $sgSelectedTimeZone = @sgGetValue($sgSelectedTimeZone, $timeZone);
286
- $sgDueData = @sgGetValue($sgDueData, $dueDate);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
 
288
  function sgGetValue($getedVal,$defValue)
289
  {
@@ -328,6 +444,78 @@
328
  return $content;
329
  }
330
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  $sgPopupEffects = array(
332
  'No effect' => 'No Effect',
333
  'flip' => 'flip',
@@ -353,10 +541,10 @@
353
  );
354
 
355
  $sgFbLikeButtons = array(
356
- 'button' => 'Button',
357
  'standard' => 'Standard',
358
  'box_count' => 'Box with count',
359
- 'button_count' => 'Button with count'
 
360
  );
361
 
362
  $sgTheme = array(
@@ -402,9 +590,15 @@
402
  'Swedish' => 'Swedish',
403
  'Chinese' => 'Chinese'
404
  );
405
- if(SG_POPUP_PRO) {
406
- require_once(SG_APP_POPUP_FILES ."/sg_params_arrays.php");
407
- }
 
 
 
 
 
 
408
 
409
  function sgCreateSelect($options,$name,$selecteOption)
410
  {
@@ -442,7 +636,7 @@
442
  else {
443
  $selected ='';
444
  }
445
- $str .= "<option value='".$key."' ".$selected." >$option</potion>";
446
  }
447
 
448
  $str .="</select>" ;
@@ -451,6 +645,7 @@
451
  }
452
 
453
  }
 
454
  if (isset($_GET['saved']) && $_GET['saved']==1) {
455
  echo '<div id="default-message" class="updated notice notice-success is-dismissible" ><p>Popup updated.</p></div>';
456
  }
@@ -634,3 +829,5 @@
634
  </div>
635
  </div>
636
  </form>
 
 
20
  break;
21
  case 'video':
22
  $sgPopupDataVideo = $result->getRealUrl();
23
+ $sgVideoOptions = $result->getVideoOptions();
24
  break;
25
  case 'image':
26
  $sgPopupDataImage = $result->getUrl();
46
  $countdownOptions = json_decode(sgSafeStr($result->getCountdownOptions()),true);
47
  $sgCountdownNumbersBgColor = $countdownOptions['countdownNumbersBgColor'];
48
  $sgCountdownNumbersTextColor = $countdownOptions['countdownNumbersTextColor'];
49
+ $sgDueDate = $countdownOptions['sg-due-date'];
50
  @$sgGetCountdownType = $countdownOptions['sg-countdown-type'];
51
  $sgCountdownLang = $countdownOptions['counts-language'];
52
  $sgCountdownPosition = $countdownOptions['coundown-position'];
54
  break;
55
  case 'social':
56
  $sgSocialContent = ($result->getSocialContent());
57
+ $sgSocialButtons = sgSafeStr($result->getButtons());
58
  $sgSocialOptions = sgSafeStr($result->getSocialOptions());
59
  break;
60
+ case 'exitIntent':
61
+ $sgExitIntentContent = $result->getContent();
62
+ $exitIntentOptions = $result->getExitIntentOptions();
63
+ break;
64
+ case 'subscription':
65
+ $sgSunbscriptionContent = $result->getContent();
66
+ $subscriptionOptions = $result->getSubscriptionOptions();
67
+ break;
68
  }
69
 
70
+ global $removeOptions;
71
+ $removeOptions = $result->getRemoveOptions();
72
+
73
  $title = $result->getTitle();
74
  $jsonData = json_decode($result->getOptions(), true);
75
  $sgEscKey = @$jsonData['escKey'];
94
  $sgMaxWidth = @$jsonData['maxWidth'];
95
  $sgMaxHeight = @$jsonData['maxHeight'];
96
  $sgForMobile = @$jsonData['forMobile'];
97
+ $sgOpenOnMobile = @$jsonData['openMobile'];
98
  $sgAllPages = @$jsonData['allPages'];
99
  $sgRepeatPopup = @$jsonData['repeatPopup'];
100
  $sgDisablePopup = @$jsonData['disablePopup'];
131
  $sgSocialShareCount = @sgSafeStr($sgSocialOptions['sgSocialShareCount']);
132
  $sgRoundButton = @sgSafeStr($sgSocialOptions['sgRoundButton']);
133
  $sgPushToBottom = @sgSafeStr($jsonData['pushToBottom']);
134
+ $exitIntentOptions = json_decode(@$exitIntentOptions, true);
135
+ $sgExitIntentTpype = $exitIntentOptions['exit-intent-type'];
136
+ $sgExitIntntExpire = $exitIntentOptions['exit-intent-expire-time'];
137
+ $sgExitIntentAlert = $exitIntentOptions['exit-intent-alert'];
138
+ $sgVideoOptions = json_decode(@$sgVideoOptions, true);
139
+ $sgVideoAutoplay = $sgVideoOptions['video-autoplay'];
140
  $sgFlikeOptions = json_decode(@$sgFlikeOptions, true);
141
  $sgFblikeurl = @$sgFlikeOptions['fblike-like-url'];
142
  $sgFbLikeLayout = @$sgFlikeOptions['fblike-layout'];
143
+ $subscriptionOptions = json_decode(@$subscriptionOptions, true);
144
+ $sgSubsFirstNameStatus = $subscriptionOptions['subs-first-name-status'];
145
+ $sgSubsLastNameStatus = $subscriptionOptions['subs-last-name-status'];
146
+ $sgSubscriptionEmail = @$subscriptionOptions['subscription-email'];
147
+ $sgSubsFirstName = @$subscriptionOptions['subs-first-name'];
148
+ $sgSubsLastName = @$subscriptionOptions['subs-last-name'];
149
+ $sgSubsButtonBgcolor = @$subscriptionOptions['subs-button-bgcolor'];
150
+ $sgSubsBtnWidth = @$subscriptionOptions['subs-btn-width'];
151
+ $sgSubsBtnHeight = @$subscriptionOptions['subs-btn-height'];
152
+ $sgSubsTextHeight = @$subscriptionOptions['subs-text-height'];
153
+ $sgSubsBtnTitle = @$subscriptionOptions['subs-btn-title'];
154
+ $sgSubsTextInputBgcolor = @$subscriptionOptions['subs-text-input-bgcolor'];
155
+ $sgSubsTextBordercolor = @$subscriptionOptions['subs-text-bordercolor'];
156
+ $sgSubsTextWidth = @$subscriptionOptions['subs-text-width'];
157
+ $sgSubsButtonColor = @$subscriptionOptions['subs-button-color'];
158
+ $sgSubsInputsColor = @$subscriptionOptions['subs-inputs-color'];
159
+ $sgSubsPlaceholderColor = @$subscriptionOptions['subs-placeholder-color'];
160
+ $sgSubsValidateMessage = @$subscriptionOptions['subs-validation-message'];
161
+ $sgSuccessMessage = @$subscriptionOptions['subs-success-message'];
162
+ $sgSubsBtnProgressTitle = @$subscriptionOptions['subs-btn-progress-title'];
163
+ $sgSubsTextBorderWidth = @$subscriptionOptions['subs-text-border-width'];
164
  }
165
 
 
166
  $sgPopup = array(
167
  'escKey'=> true,
168
  'closeButton' => true,
189
  $popupProDefaultValues = array(
190
  'closeType' => false,
191
  'onScrolling' => false,
192
+ 'video-autoplay' => false,
193
  'forMobile' => false,
194
+ 'openMobile' => false,
195
  'repetPopup' => false,
196
  'disablePopup' => false,
197
  'autoClosePopup' => false,
203
  'pinterestStatus' => true,
204
  'sgSocialLabel'=>true,
205
  'roundButtons'=>false,
206
+ 'sgShareUrl' => 'http://',
207
  'pushToBottom' => true,
208
  'allPages' => false,
209
  'countdownNumbersTextColor' => '',
211
  'countDownLang' => 'English',
212
  'countdown-position' => true,
213
  'time-zone' => 'Etc/GMT',
214
+ 'due-date' => date('M d Y', strtotime(' +1 day')),
215
+ 'exit-intent-type' => "soft",
216
+ 'exit-intent-expire-time' => '1',
217
+ 'subs-first-name-status' => true,
218
+ 'subs-last-name-status' => true,
219
+ 'subscription-email' => 'Email *',
220
+ 'subs-first-name' => 'First name',
221
+ 'subs-last-name' => 'Last name',
222
+ 'subs-button-bgcolor' => '#239744',
223
+ 'subs-button-color' => '#FFFFFF',
224
+ 'subs-text-input-bgcolor' => '#FFFFFF',
225
+ 'subs-inputs-color' => '#000000',
226
+ 'subs-placeholder-color' => '#CCCCCC',
227
+ 'subs-text-bordercolor' => '#CCCCCC',
228
+ 'subs-btn-title' => 'Subscribe',
229
+ 'subs-text-height' => '30px',
230
+ 'subs-btn-height' => '30px',
231
+ 'subs-text-width' => '200px',
232
+ 'subs-btn-width' => '200px',
233
+ 'subs-text-border-width' => '2px',
234
+ 'subs-success-message' =>'You have successfully subscribed to the newsletter',
235
+ 'subs-validation-message' => 'Please enter a valid email',
236
+ 'subs-btn-progress-title' => 'Please wait ...'
237
  );
238
 
239
  $escKey = sgBoolToChecked($sgPopup['escKey']);
246
  $closeType = sgBoolToChecked($popupProDefaultValues['closeType']);
247
  $onScrolling = sgBoolToChecked($popupProDefaultValues['onScrolling']);
248
  $forMobile = sgBoolToChecked($popupProDefaultValues['forMobile']);
249
+ $openMobile = sgBoolToChecked($popupProDefaultValues['openMobile']);
250
  $repetPopup = sgBoolToChecked($popupProDefaultValues['repetPopup']);
251
  $disablePopup = sgBoolToChecked($popupProDefaultValues['disablePopup']);
252
  $autoClosePopup = sgBoolToChecked($popupProDefaultValues['autoClosePopup']);
267
  $countdownPosition = $popupProDefaultValues['countdown-position'];
268
  $timeZone = $popupProDefaultValues['time-zone'];
269
  $dueDate = $popupProDefaultValues['due-date'];
270
+ $exitIntentType = $popupProDefaultValues['exit-intent-type'];
271
+ $exitIntentExpireTime = $popupProDefaultValues['exit-intent-expire-time'];
272
+ $subsFirstNameStatus = sgBoolToChecked($popupProDefaultValues['subs-first-name-status']);
273
+ $subsLastNameStatus = sgBoolToChecked($popupProDefaultValues['subs-last-name-status']);
274
+ $subscriptionEmail = $popupProDefaultValues['subscription-email'];
275
+ $subsFirstName = $popupProDefaultValues['subs-first-name'];
276
+ $subsLastName = $popupProDefaultValues['subs-last-name'];
277
+ $subsButtonBgcolor = $popupProDefaultValues['subs-button-bgcolor'];
278
+ $subsButtonColor = $popupProDefaultValues['subs-button-color'];
279
+ $subsInputsColor = $popupProDefaultValues['subs-inputs-color'];
280
+ $subsBtnTitle = $popupProDefaultValues['subs-btn-title'];
281
+ $subsPlaceholderColor = $popupProDefaultValues['subs-placeholder-color'];
282
+ $subsTextHeight = $popupProDefaultValues['subs-text-height'];
283
+ $subsBtnHeight = $popupProDefaultValues['subs-btn-height'];
284
+ $subsSuccessMessage = $popupProDefaultValues['subs-success-message'];
285
+ $subsValidationMessage = $popupProDefaultValues['subs-validation-message'];
286
+ $subsTextWidth = $popupProDefaultValues['subs-text-width'];
287
+ $subsBtnWidth = $popupProDefaultValues['subs-btn-width'];
288
+ $subsBtnProgressTitle = $popupProDefaultValues['subs-btn-progress-title'];
289
+ $subsTextBorderWidth = $popupProDefaultValues['subs-text-border-width'];
290
+ $subsTextBordercolor = $popupProDefaultValues['subs-text-bordercolor'];
291
+ $subsTextInputBgcolor = $popupProDefaultValues['subs-text-input-bgcolor'];
292
 
293
  function sgBoolToChecked($var)
294
  {
295
  return ($var?'checked':'');
296
  }
297
 
298
+ function sgRemoveOption($option)
299
+ {
300
+ global $removeOptions;
301
+ return isset($removeOptions[$option]);
302
+ }
303
+
304
  $width = $sgPopup['width'];
305
  $height = $sgPopup['height'];
306
  $opacityValue = $sgPopup['opacity'];
326
  $sgCloseType = @sgSetChecked($sgCloseType, $closeType);
327
  $sgOnScrolling = @sgSetChecked($sgOnScrolling, $onScrolling);
328
  $sgForMobile = @sgSetChecked($sgForMobile, $forMobile);
329
+ $sgOpenOnMobile = @sgSetChecked($sgOpenOnMobile, $openMobile);
330
  $sgRepeatPopup = @sgSetChecked($sgRepeatPopup, $repetPopup);
331
  $sgDisablePopup = @sgSetChecked($sgDisablePopup, $disablePopup);
332
  $sgAutoClosePopup = @sgSetChecked($sgAutoClosePopup, $autoClosePopup);
343
  @$sgAllPages = (get_option('SG_POPUP_ONLOAD_ID') && get_option('SG_POPUP_ONLOAD_ID') == $id)? true: false;
344
  $sgAllPages = @sgSetChecked($sgAllPages, $allPages);
345
  $sgCountdownPosition = @sgSetChecked($sgCountdownPosition, $countdownPosition);
346
+ $sgVideoAutoplay = @sgSetChecked($sgVideoAutoplay, $videoAutoplay);
347
+ $sgSubsLastNameStatus = @sgSetChecked($sgSubsLastNameStatus, $subsLastNameStatus);
348
+ $sgSubsFirstNameStatus = @sgSetChecked($sgSubsFirstNameStatus, $subsFirstNameStatus);
349
 
350
  function sgSetChecked($optionsParam,$defaultOption)
351
  {
379
  $sgCountdownNumbersBgColor = @sgGetValue($sgCountdownNumbersBgColor, $countdownNumbersBgColor);
380
  $sgCountdownLang = @sgGetValue($sgCountdownLang, $countdownLang);
381
  $sgSelectedTimeZone = @sgGetValue($sgSelectedTimeZone, $timeZone);
382
+ $sgDueDate = @sgGetValue($sgDueDate, $dueDate);
383
+ $sgExitIntentTpype = @sgGetValue($sgExitIntentTpype, $exitIntentType);
384
+ $sgExitIntntExpire = @sgGetValue($sgExitIntntExpire, $exitIntentExpireTime);
385
+ $sgSubsTextWidth = @sgGetValue($sgSubsTextWidth, $subsTextWidth);
386
+ $sgSubsBtnWidth = @sgGetValue($sgSubsBtnWidth, $subsBtnWidth);
387
+ $sgSubsTextInputBgcolor = @sgGetValue($sgSubsTextInputBgcolor, $subsTextInputBgcolor);
388
+ $sgSubsButtonBgcolor = @sgGetValue($sgSubsButtonBgcolor, $subsButtonBgcolor);
389
+ $sgSubsTextBordercolor = @sgGetValue($sgSubsTextBordercolor, $subsTextBordercolor);
390
+ $sgSubscriptionEmail = @sgGetValue($sgSubscriptionEmail, $subscriptionEmail);
391
+ $sgSubsFirstName = @sgGetValue($sgSubsFirstName, $subsFirstName);
392
+ $sgSubsLastName = @sgGetValue($sgSubsLastName, $subsLastName);
393
+ $sgSubsButtonColor = @sgGetValue($sgSubsButtonColor, $subsButtonColor);
394
+ $sgSubsInputsColor = @sgGetValue($sgSubsInputsColor, $subsInputsColor);
395
+ $sgSubsBtnTitle = @sgGetValue($sgSubsBtnTitle, $subsBtnTitle);
396
+ $sgSubsPlaceholderColor = @sgGetValue($sgSubsPlaceholderColor, $subsPlaceholderColor);
397
+ $sgSubsTextHeight = @sgGetValue($sgSubsTextHeight, $subsTextHeight);
398
+ $sgSubsBtnHeight = @sgGetValue($sgSubsBtnHeight, $subsBtnHeight);
399
+ $sgSuccessMessage = @sgGetValue($sgSuccessMessage, $subsSuccessMessage);
400
+ $sgSubsValidateMessage = @sgGetValue($sgSubsValidateMessage, $subsValidationMessage);
401
+ $sgSubsBtnProgressTitle = @sgGetValue($sgSubsBtnProgressTitle, $subsBtnProgressTitle);
402
+ $sgSubsTextBorderWidth = @sgGetValue($sgSubsTextBorderWidth, $subsTextBorderWidth);
403
 
404
  function sgGetValue($getedVal,$defValue)
405
  {
444
  return $content;
445
  }
446
 
447
+ $radiobuttons = array(
448
+ array(
449
+ "title" => "Soft mode:",
450
+ "value" => "soft",
451
+ "info" => "<span class=\"dashicons dashicons-info repositionImg sameImageStyle\"></span>
452
+ <span class='infoReposition samefontStyle'>
453
+ If the user navigate away from the site the popup will appear.
454
+ </span>"
455
+ ),
456
+ array(
457
+ "title" => "Aggressive mode:",
458
+ "value" => "aggressive",
459
+ "info" => "<span class=\"dashicons dashicons-info repositionImg sameImageStyle\"></span>
460
+ <span class='infoReposition samefontStyle'>
461
+ If the user try to navigate elsewhere he/she will be interrupted and forced to read the message and choose to leave or stay.
462
+ After the alert box popup will appear.
463
+ </span>"
464
+ ),
465
+ array(
466
+ "title" => "Soft and Aggressive modes:",
467
+ "value" => "softAndAgressive",
468
+ "info" => "<span class=\"dashicons dashicons-info repositionImg sameImageStyle\"></span>
469
+ <span class='infoReposition samefontStyle'>
470
+ This will enable the both modes. Depends which action will be triggered first.
471
+ </span>"
472
+ ),
473
+ array(
474
+ "title" => "Aggressive without popup:",
475
+ "value" => "agresiveWithoutPopup",
476
+ "info" => "<span class='dashicons dashicons-info repositionImg sameImageStyle'></span>
477
+ <span class='infoReposition samefontStyle'>
478
+ Tha same as aggressive mode but without a popup.
479
+ </span>"
480
+ ),
481
+
482
+ );
483
+
484
+
485
+ function createRadiobuttons($elements, $name, $newLine, $selectedInput, $class)
486
+ {
487
+ $str = "";
488
+
489
+ foreach ($elements as $key => $elment) {
490
+ $breakLine = "";
491
+ $infoIcon = "";
492
+ $title = "";
493
+ $value = "";
494
+ $infoIcon = "";
495
+ $checked = "";
496
+
497
+ if(isset($elment["title"])) {
498
+ $title = $elment["title"];
499
+ }
500
+ if(isset($elment["value"])) {
501
+ $value = $elment["value"];
502
+ }
503
+ if($newLine) {
504
+ $breakLine = "<br>";
505
+ }
506
+ if(isset($elment["info"])) {
507
+ $infoIcon = $elment['info'];
508
+ }
509
+ if($elment["value"] == $selectedInput) {
510
+ $checked = "checked";
511
+ }
512
+ $str .= "<span class=".$class.">".$elment['title']."</span>
513
+ <input type=\"radio\" name=".$name." value=".$value." $checked>".$infoIcon.$breakLine;
514
+ }
515
+
516
+ echo $str;
517
+ }
518
+
519
  $sgPopupEffects = array(
520
  'No effect' => 'No Effect',
521
  'flip' => 'flip',
541
  );
542
 
543
  $sgFbLikeButtons = array(
 
544
  'standard' => 'Standard',
545
  'box_count' => 'Box with count',
546
+ 'button_count' => 'Button with count',
547
+ 'button' => 'Button'
548
  );
549
 
550
  $sgTheme = array(
590
  'Swedish' => 'Swedish',
591
  'Chinese' => 'Chinese'
592
  );
593
+
594
+ $sgExitIntentSelectOptions = array(
595
+ "perSesion" => "per Session",
596
+ "1" => "per minute",
597
+ "10080" => "per 7 days",
598
+ "43200" => "per month",
599
+ "always" => "always"
600
+ );
601
+
602
 
603
  function sgCreateSelect($options,$name,$selecteOption)
604
  {
636
  else {
637
  $selected ='';
638
  }
639
+ $str .= "<option value='".$key."' ".$selected." >$option</potion>";
640
  }
641
 
642
  $str .="</select>" ;
645
  }
646
 
647
  }
648
+
649
  if (isset($_GET['saved']) && $_GET['saved']==1) {
650
  echo '<div id="default-message" class="updated notice notice-success is-dismissible" ><p>Popup updated.</p></div>';
651
  }
829
  </div>
830
  </div>
831
  </form>
832
+ <?php
833
+ SGFunctions::showInfo();
files/sg_popup_main.php CHANGED
File without changes
files/sg_popup_page_selection.php CHANGED
File without changes
files/sg_popup_save.php CHANGED
@@ -5,12 +5,13 @@ function sgSanitize($optionsKey)
5
  {
6
  if (isset($_POST[$optionsKey])) {
7
  if ($optionsKey == "sg_popup_html"||
8
- $optionsKey == 'sg_ageRestriction'||
9
- $optionsKey =='sg_countdown'||
10
- $optionsKey =='iframe'||
11
- $optionsKey =='sg_social' ||
12
- $optionsKey =="sg-exit-intent" ||
13
- $optionsKey =="sg_popup_fblike"
 
14
  ) {
15
  if(SG_POPUP_PRO) {
16
  $sgPopupData = $_POST[$optionsKey];
@@ -33,6 +34,7 @@ function sgPopupSave()
33
  $socialOptions = array();
34
  $countdownOptions = array();
35
  $fblikeOptions = array();
 
36
  $options = array();
37
  $showAllPages = sgSanitize('allPages');
38
 
@@ -79,14 +81,37 @@ function sgPopupSave()
79
  );
80
 
81
  $exitIntentOptions = array(
82
- "exit-intent-type" => sgSanitize('exit-intent-type'),
83
- "exit-intent-expire-time" => sgSanitize('exit-intent-expire-time'),
84
- "exit-intent-alert" => sgSanitize('exit-intent-alert')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  );
86
 
87
  $fblikeOptions = array(
88
- "fblike-like-url" => sgSanitize("fblike-like-url"),
89
- "fblike-layout" => sgSanitize("fblike-layout")
90
  );
91
 
92
  $options = array(
@@ -142,6 +167,7 @@ function sgPopupSave()
142
  $social = stripslashes(sgSanitize('sg_social'));
143
  $image = sgSanitize('ad_image');
144
  $countdown = stripslashes(sgSanitize('sg_countdown'));
 
145
  $iframe = sgSanitize('iframe');
146
  $video = sgSanitize('video');
147
  $shortCode = stripslashes(sgSanitize('shortcode'));
@@ -164,8 +190,10 @@ function sgPopupSave()
164
  'ageRestriction' => $ageRestriction,
165
  'countdown' => $countdown,
166
  'exitIntent' => $exitIntent,
 
167
  'social' => $social,
168
- 'options' => $jsonDataArray
 
169
  );
170
 
171
  function setPopupForAllPages($id, $allPages) {
@@ -245,6 +273,10 @@ function sgPopupSave()
245
  $popup->setContent($exitIntent);
246
  $popup->setExitIntentOptions(json_encode($exitIntentOptions));
247
  break;
 
 
 
 
248
  }
249
  setPopupForAllPages($id, $showAllPages);
250
  setOptionPopupType($id, $type);
5
  {
6
  if (isset($_POST[$optionsKey])) {
7
  if ($optionsKey == "sg_popup_html"||
8
+ $optionsKey == "sg_ageRestriction"||
9
+ $optionsKey == "sg_countdown"||
10
+ $optionsKey == "iframe"||
11
+ $optionsKey == "sg_social" ||
12
+ $optionsKey == "sg-exit-intent" ||
13
+ $optionsKey == "sg_popup_fblike" ||
14
+ $optionsKey == "sg_subscription"
15
  ) {
16
  if(SG_POPUP_PRO) {
17
  $sgPopupData = $_POST[$optionsKey];
34
  $socialOptions = array();
35
  $countdownOptions = array();
36
  $fblikeOptions = array();
37
+ $subscriptionOptions = array();
38
  $options = array();
39
  $showAllPages = sgSanitize('allPages');
40
 
81
  );
82
 
83
  $exitIntentOptions = array(
84
+ 'exit-intent-type' => sgSanitize('exit-intent-type'),
85
+ 'exit-intent-expire-time' => sgSanitize('exit-intent-expire-time'),
86
+ 'exit-intent-alert' => sgSanitize('exit-intent-alert')
87
+ );
88
+
89
+ $subscriptionOptions = array(
90
+ 'subs-first-name-status' => sgSanitize('subs-first-name-status'),
91
+ 'subs-last-name-status' => sgSanitize('subs-last-name-status'),
92
+ 'subscription-email' => sgSanitize('subscription-email'),
93
+ 'subs-first-name' => sgSanitize('subs-first-name'),
94
+ 'subs-last-name' => sgSanitize('subs-last-name'),
95
+ 'subs-text-width' => sgSanitize('subs-text-width'),
96
+ 'subs-button-bgcolor' => sgSanitize('subs-button-bgcolor'),
97
+ 'subs-btn-width' => sgSanitize('subs-btn-width'),
98
+ 'subs-btn-title' => sgSanitize('subs-btn-title'),
99
+ 'subs-text-input-bgcolor' => sgSanitize('subs-text-input-bgcolor'),
100
+ 'subs-text-bordercolor' => sgSanitize('subs-text-bordercolor'),
101
+ 'subs-button-color' => sgSanitize('subs-button-color'),
102
+ 'subs-inputs-color' => sgSanitize('subs-inputs-color'),
103
+ 'subs-btn-height' => sgSanitize('subs-btn-height'),
104
+ 'subs-text-height' => sgSanitize('subs-text-height'),
105
+ 'subs-placeholder-color' => sgSanitize('subs-placeholder-color'),
106
+ 'subs-validation-message' => sgSanitize('subs-validation-message'),
107
+ 'subs-success-message' => sgSanitize('subs-success-message'),
108
+ 'subs-btn-progress-title' => sgSanitize('subs-btn-progress-title'),
109
+ 'subs-text-border-width' => sgSanitize('subs-text-border-width'),
110
  );
111
 
112
  $fblikeOptions = array(
113
+ 'fblike-like-url' => sgSanitize('fblike-like-url'),
114
+ 'fblike-layout' => sgSanitize('fblike-layout')
115
  );
116
 
117
  $options = array(
167
  $social = stripslashes(sgSanitize('sg_social'));
168
  $image = sgSanitize('ad_image');
169
  $countdown = stripslashes(sgSanitize('sg_countdown'));
170
+ $subscription = stripslashes(sgSanitize('sg_subscription'));
171
  $iframe = sgSanitize('iframe');
172
  $video = sgSanitize('video');
173
  $shortCode = stripslashes(sgSanitize('shortcode'));
190
  'ageRestriction' => $ageRestriction,
191
  'countdown' => $countdown,
192
  'exitIntent' => $exitIntent,
193
+ 'sg_subscription' => $subscription,
194
  'social' => $social,
195
+ 'options' => $jsonDataArray,
196
+ 'subscriptionOptions' => json_encode($subscriptionOptions)
197
  );
198
 
199
  function setPopupForAllPages($id, $allPages) {
273
  $popup->setContent($exitIntent);
274
  $popup->setExitIntentOptions(json_encode($exitIntentOptions));
275
  break;
276
+ case 'SGSubscription':
277
+ $popup->setContent($subscription);
278
+ $popup->setSubscriptionOptions(json_encode($subscriptionOptions));
279
+ break;
280
  }
281
  setPopupForAllPages($id, $showAllPages);
282
  setOptionPopupType($id, $type);
img/ContactFormButtonPro.png ADDED
Binary file
img/ShortcodePopup.png ADDED
Binary file
img/ShortcodePopupPro.png DELETED
Binary file
img/default-image.png CHANGED
File without changes
img/down_arrow-2x.gif CHANGED
File without changes
img/info.png CHANGED
File without changes
img/theme1.jpg CHANGED
File without changes
img/theme2.jpg CHANGED
File without changes
img/theme3.jpg CHANGED
File without changes
img/theme4.jpg CHANGED
File without changes
img/theme5.jpg CHANGED
File without changes
img/wpspin_light.gif CHANGED
File without changes
javascript/bootstrap-tagsinput.js DELETED
@@ -1,617 +0,0 @@
1
- (function ($) {
2
- "use strict";
3
-
4
- var defaultOptions = {
5
- tagClass: function(item) {
6
- return 'label label-info';
7
- },
8
- itemValue: function(item) {
9
- return item ? item.toString() : item;
10
- },
11
- itemText: function(item) {
12
- return this.itemValue(item);
13
- },
14
- freeInput: true,
15
- addOnBlur: true,
16
- maxTags: undefined,
17
- maxChars: undefined,
18
- confirmKeys: [13, 44],
19
- onTagExists: function(item, $tag) {
20
- $tag.hide().fadeIn();
21
- },
22
- trimValue: false,
23
- allowDuplicates: false
24
- };
25
-
26
- /**
27
- * Constructor function
28
- */
29
- function TagsInput(element, options) {
30
- this.itemsArray = [];
31
-
32
- this.$element = $(element);
33
- this.$element.hide();
34
-
35
- this.isSelect = (element.tagName === 'SELECT');
36
- this.multiple = (this.isSelect && element.hasAttribute('multiple'));
37
- this.objectItems = options && options.itemValue;
38
- this.placeholderText = element.hasAttribute('placeholder') ? this.$element.attr('placeholder') : '';
39
- this.inputSize = Math.max(1, this.placeholderText.length);
40
-
41
- this.$container = $('<div class="bootstrap-tagsinput"></div>');
42
- this.$input = $('<input type="text" placeholder="' + this.placeholderText + '"/>').appendTo(this.$container);
43
-
44
- this.$element.after(this.$container);
45
-
46
- var inputWidth = (this.inputSize < 3 ? 3 : this.inputSize) + "em";
47
- this.$input.get(0).style.cssText = "width: " + inputWidth + " !important;";
48
- this.build(options);
49
- }
50
-
51
- TagsInput.prototype = {
52
- constructor: TagsInput,
53
-
54
- /**
55
- * Adds the given item as a new tag. Pass true to dontPushVal to prevent
56
- * updating the elements val()
57
- */
58
- add: function(item, dontPushVal) {
59
- var self = this;
60
-
61
- if (self.options.maxTags && self.itemsArray.length >= self.options.maxTags)
62
- return;
63
-
64
- // Ignore falsey values, except false
65
- if (item !== false && !item)
66
- return;
67
-
68
- // Trim value
69
- if (typeof item === "string" && self.options.trimValue) {
70
- item = $.trim(item);
71
- }
72
-
73
- // Throw an error when trying to add an object while the itemValue option was not set
74
- if (typeof item === "object" && !self.objectItems)
75
- throw("Can't add objects when itemValue option is not set");
76
-
77
- // Ignore strings only containg whitespace
78
- if (item.toString().match(/^\s*$/))
79
- return;
80
-
81
- // If SELECT but not multiple, remove current tag
82
- if (self.isSelect && !self.multiple && self.itemsArray.length > 0)
83
- self.remove(self.itemsArray[0]);
84
-
85
- if (typeof item === "string" && this.$element[0].tagName === 'INPUT') {
86
- var items = item.split(',');
87
- if (items.length > 1) {
88
- for (var i = 0; i < items.length; i++) {
89
- this.add(items[i], true);
90
- }
91
-
92
- if (!dontPushVal)
93
- self.pushVal();
94
- return;
95
- }
96
- }
97
-
98
- var itemValue = self.options.itemValue(item),
99
- itemText = self.options.itemText(item),
100
- tagClass = self.options.tagClass(item);
101
-
102
- // Ignore items allready added
103
- var existing = $.grep(self.itemsArray, function(item) { return self.options.itemValue(item) === itemValue; } )[0];
104
- if (existing && !self.options.allowDuplicates) {
105
- // Invoke onTagExists
106
- if (self.options.onTagExists) {
107
- var $existingTag = $(".tag", self.$container).filter(function() { return $(this).data("item") === existing; });
108
- self.options.onTagExists(item, $existingTag);
109
- }
110
- return;
111
- }
112
-
113
- // if length greater than limit
114
- if (self.items().toString().length + item.length + 1 > self.options.maxInputLength)
115
- return;
116
-
117
- // raise beforeItemAdd arg
118
- var beforeItemAddEvent = $.Event('beforeItemAdd', { item: item, cancel: false });
119
- self.$element.trigger(beforeItemAddEvent);
120
- if (beforeItemAddEvent.cancel)
121
- return;
122
-
123
- // register item in internal array and map
124
- self.itemsArray.push(item);
125
-
126
- // add a tag element
127
- var $tag = $('<span class="tag ' + htmlEncode(tagClass) + '">' + htmlEncode(itemText) + '<span data-role="remove"></span></span>');
128
- $tag.data('item', item);
129
- self.findInputWrapper().before($tag);
130
- $tag.after(' ');
131
-
132
- // add <option /> if item represents a value not present in one of the <select />'s options
133
- if (self.isSelect && !$('option[value="' + encodeURIComponent(itemValue) + '"]',self.$element)[0]) {
134
- var $option = $('<option selected>' + htmlEncode(itemText) + '</option>');
135
- $option.data('item', item);
136
- $option.attr('value', itemValue);
137
- self.$element.append($option);
138
- }
139
-
140
- if (!dontPushVal)
141
- self.pushVal();
142
-
143
- // Add class when reached maxTags
144
- if (self.options.maxTags === self.itemsArray.length || self.items().toString().length === self.options.maxInputLength)
145
- self.$container.addClass('bootstrap-tagsinput-max');
146
-
147
- self.$element.trigger($.Event('itemAdded', { item: item }));
148
- },
149
-
150
- /**
151
- * Removes the given item. Pass true to dontPushVal to prevent updating the
152
- * elements val()
153
- */
154
- remove: function(item, dontPushVal) {
155
- var self = this;
156
-
157
- if (self.objectItems) {
158
- if (typeof item === "object")
159
- item = $.grep(self.itemsArray, function(other) { return self.options.itemValue(other) == self.options.itemValue(item); } );
160
- else
161
- item = $.grep(self.itemsArray, function(other) { return self.options.itemValue(other) == item; } );
162
-
163
- item = item[item.length-1];
164
- }
165
-
166
- if (item) {
167
- var beforeItemRemoveEvent = $.Event('beforeItemRemove', { item: item, cancel: false });
168
- self.$element.trigger(beforeItemRemoveEvent);
169
- if (beforeItemRemoveEvent.cancel)
170
- return;
171
-
172
- $('.tag', self.$container).filter(function() { return $(this).data('item') === item; }).remove();
173
- $('option', self.$element).filter(function() { return $(this).data('item') === item; }).remove();
174
- if($.inArray(item, self.itemsArray) !== -1)
175
- self.itemsArray.splice($.inArray(item, self.itemsArray), 1);
176
- }
177
-
178
- if (!dontPushVal)
179
- self.pushVal();
180
-
181
- // Remove class when reached maxTags
182
- if (self.options.maxTags > self.itemsArray.length)
183
- self.$container.removeClass('bootstrap-tagsinput-max');
184
-
185
- self.$element.trigger($.Event('itemRemoved', { item: item }));
186
- },
187
-
188
- /**
189
- * Removes all items
190
- */
191
- removeAll: function() {
192
- var self = this;
193
-
194
- $('.tag', self.$container).remove();
195
- $('option', self.$element).remove();
196
-
197
- while(self.itemsArray.length > 0)
198
- self.itemsArray.pop();
199
-
200
- self.pushVal();
201
- },
202
-
203
- /**
204
- * Refreshes the tags so they match the text/value of their corresponding
205
- * item.
206
- */
207
- refresh: function() {
208
- var self = this;
209
- $('.tag', self.$container).each(function() {
210
- var $tag = $(this),
211
- item = $tag.data('item'),
212
- itemValue = self.options.itemValue(item),
213
- itemText = self.options.itemText(item),
214
- tagClass = self.options.tagClass(item);
215
-
216
- // Update tag's class and inner text
217
- $tag.attr('class', null);
218
- $tag.addClass('tag ' + htmlEncode(tagClass));
219
- $tag.contents().filter(function() {
220
- return this.nodeType == 3;
221
- })[0].nodeValue = htmlEncode(itemText);
222
-
223
- if (self.isSelect) {
224
- var option = $('option', self.$element).filter(function() { return $(this).data('item') === item; });
225
- option.attr('value', itemValue);
226
- }
227
- });
228
- },
229
-
230
- /**
231
- * Returns the items added as tags
232
- */
233
- items: function() {
234
- return this.itemsArray;
235
- },
236
-
237
- /**
238
- * Assembly value by retrieving the value of each item, and set it on the
239
- * element.
240
- */
241
- pushVal: function() {
242
- var self = this,
243
- val = $.map(self.items(), function(item) {
244
- return self.options.itemValue(item).toString();
245
- });
246
-
247
- self.$element.val(val, true).trigger('change');
248
- },
249
-
250
- /**
251
- * Initializes the tags input behaviour on the element
252
- */
253
- build: function(options) {
254
- var self = this;
255
-
256
- self.options = $.extend({}, defaultOptions, options);
257
- // When itemValue is set, freeInput should always be false
258
- if (self.objectItems)
259
- self.options.freeInput = false;
260
-
261
- makeOptionItemFunction(self.options, 'itemValue');
262
- makeOptionItemFunction(self.options, 'itemText');
263
- makeOptionFunction(self.options, 'tagClass');
264
-
265
- // Typeahead Bootstrap version 2.3.2
266
- if (self.options.typeahead) {
267
- var typeahead = self.options.typeahead || {};
268
-
269
- makeOptionFunction(typeahead, 'source');
270
-
271
- self.$input.typeahead($.extend({}, typeahead, {
272
- source: function (query, process) {
273
- function processItems(items) {
274
- var texts = [];
275
-
276
- for (var i = 0; i < items.length; i++) {
277
- var text = self.options.itemText(items[i]);
278
- map[text] = items[i];
279
- texts.push(text);
280
- }
281
- process(texts);
282
- }
283
-
284
- this.map = {};
285
- var map = this.map,
286
- data = typeahead.source(query);
287
-
288
- if ($.isFunction(data.success)) {
289
- // support for Angular callbacks
290
- data.success(processItems);
291
- } else if ($.isFunction(data.then)) {
292
- // support for Angular promises
293
- data.then(processItems);
294
- } else {
295
- // support for functions and jquery promises
296
- $.when(data)
297
- .then(processItems);
298
- }
299
- },
300
- updater: function (text) {
301
- self.add(this.map[text]);
302
- },
303
- matcher: function (text) {
304
- return (text.toLowerCase().indexOf(this.query.trim().toLowerCase()) !== -1);
305
- },
306
- sorter: function (texts) {
307
- return texts.sort();
308
- },
309
- highlighter: function (text) {
310
- var regex = new RegExp( '(' + this.query + ')', 'gi' );
311
- return text.replace( regex, "<strong>$1</strong>" );
312
- }
313
- }));
314
- }
315
-
316
- // typeahead.js
317
- if (self.options.typeaheadjs) {
318
- var typeaheadjs = self.options.typeaheadjs || {};
319
-
320
- self.$input.typeahead(null, typeaheadjs).on('typeahead:selected', $.proxy(function (obj, datum) {
321
- if (typeaheadjs.valueKey)
322
- self.add(datum[typeaheadjs.valueKey]);
323
- else
324
- self.add(datum);
325
- self.$input.typeahead('val', '');
326
- }, self));
327
- }
328
-
329
- self.$container.on('click', $.proxy(function(event) {
330
- if (! self.$element.attr('disabled')) {
331
- self.$input.removeAttr('disabled');
332
- }
333
- self.$input.focus();
334
- }, self));
335
-
336
- if (self.options.addOnBlur && self.options.freeInput) {
337
- self.$input.on('focusout', $.proxy(function(event) {
338
- // HACK: only process on focusout when no typeahead opened, to
339
- // avoid adding the typeahead text as tag
340
- if ($('.typeahead, .twitter-typeahead', self.$container).length === 0) {
341
- self.add(self.$input.val());
342
- self.$input.val('');
343
- }
344
- }, self));
345
- }
346
-
347
-
348
- self.$container.on('keydown', 'input', $.proxy(function(event) {
349
- var $input = $(event.target),
350
- $inputWrapper = self.findInputWrapper();
351
-
352
- if (self.$element.attr('disabled')) {
353
- self.$input.attr('disabled', 'disabled');
354
- return;
355
- }
356
-
357
- switch (event.which) {
358
- // BACKSPACE
359
- case 8:
360
- if (doGetCaretPosition($input[0]) === 0) {
361
- var prev = $inputWrapper.prev();
362
- if (prev) {
363
- self.remove(prev.data('item'));
364
- }
365
- }
366
- break;
367
-
368
- // DELETE
369
- case 46:
370
- if (doGetCaretPosition($input[0]) === 0) {
371
- var next = $inputWrapper.next();
372
- if (next) {
373
- self.remove(next.data('item'));
374
- }
375
- }
376
- break;
377
-
378
- // LEFT ARROW
379
- case 37:
380
- // Try to move the input before the previous tag
381
- var $prevTag = $inputWrapper.prev();
382
- if ($input.val().length === 0 && $prevTag[0]) {
383
- $prevTag.before($inputWrapper);
384
- $input.focus();
385
- }
386
- break;
387
- // RIGHT ARROW
388
- case 39:
389
- // Try to move the input after the next tag
390
- var $nextTag = $inputWrapper.next();
391
- if ($input.val().length === 0 && $nextTag[0]) {
392
- $nextTag.after($inputWrapper);
393
- $input.focus();
394
- }
395
- break;
396
- default:
397
- // ignore
398
- }
399
-
400
- // Reset internal input's size
401
- var textLength = $input.val().length,
402
- wordSpace = Math.ceil(textLength / 5),
403
- size = textLength + wordSpace + 1;
404
- $input.attr('size', Math.max(this.inputSize, $input.val().length));
405
- }, self));
406
-
407
- self.$container.on('keypress', 'input', $.proxy(function(event) {
408
- var $input = $(event.target);
409
-
410
- if (self.$element.attr('disabled')) {
411
- self.$input.attr('disabled', 'disabled');
412
- return;
413
- }
414
-
415
- var text = $input.val(),
416
- maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
417
- if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {
418
- self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);
419
- $input.val('');
420
- event.preventDefault();
421
- }
422
-
423
- // Reset internal input's size
424
- var textLength = $input.val().length,
425
- wordSpace = Math.ceil(textLength / 5),
426
- size = textLength + wordSpace + 1;
427
- $input.attr('size', Math.max(this.inputSize, $input.val().length));
428
- }, self));
429
-
430
- // Remove icon clicked
431
- self.$container.on('click', '[data-role=remove]', $.proxy(function(event) {
432
- if (self.$element.attr('disabled')) {
433
- return;
434
- }
435
- self.remove($(event.target).closest('.tag').data('item'));
436
- }, self));
437
-
438
- // Only add existing value as tags when using strings as tags
439
- if (self.options.itemValue === defaultOptions.itemValue) {
440
- if (self.$element[0].tagName === 'INPUT') {
441
- self.add(self.$element.val());
442
- } else {
443
- $('option', self.$element).each(function() {
444
- self.add($(this).attr('value'), true);
445
- });
446
- }
447
- }
448
- },
449
-
450
- /**
451
- * Removes all tagsinput behaviour and unregsiter all event handlers
452
- */
453
- destroy: function() {
454
- var self = this;
455
-
456
- // Unbind events
457
- self.$container.off('keypress', 'input');
458
- self.$container.off('click', '[role=remove]');
459
-
460
- self.$container.remove();
461
- self.$element.removeData('tagsinput');
462
- self.$element.show();
463
- },
464
-
465
- /**
466
- * Sets focus on the tagsinput
467
- */
468
- focus: function() {
469
- this.$input.focus();
470
- },
471
-
472
- /**
473
- * Returns the internal input element
474
- */
475
- input: function() {
476
- return this.$input;
477
- },
478
-
479
- /**
480
- * Returns the element which is wrapped around the internal input. This
481
- * is normally the $container, but typeahead.js moves the $input element.
482
- */
483
- findInputWrapper: function() {
484
- var elt = this.$input[0],
485
- container = this.$container[0];
486
- while(elt && elt.parentNode !== container)
487
- elt = elt.parentNode;
488
-
489
- return $(elt);
490
- }
491
- };
492
-
493
- /**
494
- * Register JQuery plugin
495
- */
496
- $.fn.tagsinput = function(arg1, arg2) {
497
- var results = [];
498
-
499
- this.each(function() {
500
- var tagsinput = $(this).data('tagsinput');
501
- // Initialize a new tags input
502
- if (!tagsinput) {
503
- tagsinput = new TagsInput(this, arg1);
504
- $(this).data('tagsinput', tagsinput);
505
- results.push(tagsinput);
506
-
507
- if (this.tagName === 'SELECT') {
508
- $('option', $(this)).attr('selected', 'selected');
509
- }
510
-
511
- // Init tags from $(this).val()
512
- $(this).val($(this).val());
513
- } else if (!arg1 && !arg2) {
514
- // tagsinput already exists
515
- // no function, trying to init
516
- results.push(tagsinput);
517
- } else if(tagsinput[arg1] !== undefined) {
518
- // Invoke function on existing tags input
519
- var retVal = tagsinput[arg1](arg2);
520
- if (retVal !== undefined)
521
- results.push(retVal);
522
- }
523
- });
524
-
525
- if ( typeof arg1 == 'string') {
526
- // Return the results from the invoked function calls
527
- return results.length > 1 ? results : results[0];
528
- } else {
529
- return results;
530
- }
531
- };
532
-
533
- $.fn.tagsinput.Constructor = TagsInput;
534
-
535
- /**
536
- * Most options support both a string or number as well as a function as
537
- * option value. This function makes sure that the option with the given
538
- * key in the given options is wrapped in a function
539
- */
540
- function makeOptionItemFunction(options, key) {
541
- if (typeof options[key] !== 'function') {
542
- var propertyName = options[key];
543
- options[key] = function(item) { return item[propertyName]; };
544
- }
545
- }
546
- function makeOptionFunction(options, key) {
547
- if (typeof options[key] !== 'function') {
548
- var value = options[key];
549
- options[key] = function() { return value; };
550
- }
551
- }
552
- /**
553
- * HtmlEncodes the given value
554
- */
555
- var htmlEncodeContainer = $('<div />');
556
- function htmlEncode(value) {
557
- if (value) {
558
- return htmlEncodeContainer.text(value).html();
559
- } else {
560
- return '';
561
- }
562
- }
563
-
564
- /**
565
- * Returns the position of the caret in the given input field
566
- * http://flightschool.acylt.com/devnotes/caret-position-woes/
567
- */
568
- function doGetCaretPosition(oField) {
569
- var iCaretPos = 0;
570
- if (document.selection) {
571
- oField.focus ();
572
- var oSel = document.selection.createRange();
573
- oSel.moveStart ('character', -oField.value.length);
574
- iCaretPos = oSel.text.length;
575
- } else if (oField.selectionStart || oField.selectionStart == '0') {
576
- iCaretPos = oField.selectionStart;
577
- }
578
- return (iCaretPos);
579
- }
580
-
581
- /**
582
- * Returns boolean indicates whether user has pressed an expected key combination.
583
- * @param object keyPressEvent: JavaScript event object, refer
584
- * http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
585
- * @param object lookupList: expected key combinations, as in:
586
- * [13, {which: 188, shiftKey: true}]
587
- */
588
- function keyCombinationInList(keyPressEvent, lookupList) {
589
- var found = false;
590
- $.each(lookupList, function (index, keyCombination) {
591
- if (typeof (keyCombination) === 'number' && keyPressEvent.which === keyCombination) {
592
- found = true;
593
- return false;
594
- }
595
-
596
- if (keyPressEvent.which === keyCombination.which) {
597
- var alt = !keyCombination.hasOwnProperty('altKey') || keyPressEvent.altKey === keyCombination.altKey,
598
- shift = !keyCombination.hasOwnProperty('shiftKey') || keyPressEvent.shiftKey === keyCombination.shiftKey,
599
- ctrl = !keyCombination.hasOwnProperty('ctrlKey') || keyPressEvent.ctrlKey === keyCombination.ctrlKey;
600
- if (alt && shift && ctrl) {
601
- found = true;
602
- return false;
603
- }
604
- }
605
- });
606
-
607
- return found;
608
- }
609
-
610
- /**
611
- * Initialize tagsinput behaviour on inputs and selects which have
612
- * data-role=tagsinput
613
- */
614
- $(function() {
615
- $("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput();
616
- });
617
- })(window.jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
javascript/jquery.cookie.js DELETED
@@ -1,117 +0,0 @@
1
- /*!
2
- * jQuery Cookie Plugin v1.4.0
3
- * https://github.com/carhartl/jquery-cookie
4
- *
5
- * Copyright 2013 Klaus Hartl
6
- * Released under the MIT license
7
- */
8
- (function (factory) {
9
- if (typeof define === 'function' && define.amd) {
10
- // AMD. Register as anonymous module.
11
- define(['jquery'], factory);
12
- } else {
13
- // Browser globals.
14
- factory(jQuery);
15
- }
16
- }(function ($) {
17
-
18
- var pluses = /\+/g;
19
-
20
- function encode(s) {
21
- return config.raw ? s : encodeURIComponent(s);
22
- }
23
-
24
- function decode(s) {
25
- return config.raw ? s : decodeURIComponent(s);
26
- }
27
-
28
- function stringifyCookieValue(value) {
29
- return encode(config.json ? JSON.stringify(value) : String(value));
30
- }
31
-
32
- function parseCookieValue(s) {
33
- if (s.indexOf('"') === 0) {
34
- // This is a quoted cookie as according to RFC2068, unescape...
35
- s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
36
- }
37
-
38
- try {
39
- // Replace server-side written pluses with spaces.
40
- // If we can't decode the cookie, ignore it, it's unusable.
41
- s = decodeURIComponent(s.replace(pluses, ' '));
42
- } catch(e) {
43
- return;
44
- }
45
-
46
- try {
47
- // If we can't parse the cookie, ignore it, it's unusable.
48
- return config.json ? JSON.parse(s) : s;
49
- } catch(e) {}
50
- }
51
-
52
- function read(s, converter) {
53
- var value = config.raw ? s : parseCookieValue(s);
54
- return $.isFunction(converter) ? converter(value) : value;
55
- }
56
-
57
- var config = $.cookie = function (key, value, options) {
58
-
59
- // Write
60
- if (value !== undefined && !$.isFunction(value)) {
61
- options = $.extend({}, config.defaults, options);
62
-
63
- if (typeof options.expires === 'number') {
64
- var days = options.expires, t = options.expires = new Date();
65
- t.setDate(t.getDate() + days);
66
- }
67
-
68
- return (document.cookie = [
69
- encode(key), '=', stringifyCookieValue(value),
70
- options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
71
- options.path ? '; path=' + options.path : '',
72
- options.domain ? '; domain=' + options.domain : '',
73
- options.secure ? '; secure' : ''
74
- ].join(''));
75
- }
76
-
77
- // Read
78
-
79
- var result = key ? undefined : {};
80
-
81
- // To prevent the for loop in the first place assign an empty array
82
- // in case there are no cookies at all. Also prevents odd result when
83
- // calling $.cookie().
84
- var cookies = document.cookie ? document.cookie.split('; ') : [];
85
-
86
- for (var i = 0, l = cookies.length; i < l; i++) {
87
- var parts = cookies[i].split('=');
88
- var name = decode(parts.shift());
89
- var cookie = parts.join('=');
90
-
91
- if (key && key === name) {
92
- // If second argument (value) is a function it's a converter...
93
- result = read(cookie, value);
94
- break;
95
- }
96
-
97
- // Prevent storing a cookie that we couldn't decode.
98
- if (!key && (cookie = read(cookie)) !== undefined) {
99
- result[name] = cookie;
100
- }
101
- }
102
-
103
- return result;
104
- };
105
-
106
- config.defaults = {};
107
-
108
- $.removeCookie = function (key, options) {
109
- if ($.cookie(key) !== undefined) {
110
- // Must not alter options, thus extending a fresh object...
111
- $.cookie(key, '', $.extend({}, options, { expires: -1 }));
112
- return true;
113
- }
114
- return false;
115
- };
116
-
117
- }));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
javascript/jquery.sgcolorbox-min.js CHANGED
@@ -459,7 +459,7 @@
459
  }
460
  /* Start to set custom class and add to html */
461
  if(typeof options === 'object') {
462
- var customClass = defaults['className'];
463
  if(typeof options['className'] !== 'undefined' && options['className']){
464
  customClass = options['className'];
465
  }
459
  }
460
  /* Start to set custom class and add to html */
461
  if(typeof options === 'object') {
462
+ var customClass = defaults['customClass'];
463
  if(typeof options['className'] !== 'undefined' && options['className']){
464
  customClass = options['className'];
465
  }
javascript/sg_datapickers.js CHANGED
@@ -10,30 +10,38 @@ SgPickers.prototype.init = function() {
10
  });
11
  }
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  SgPickers.prototype.colorPicekr = function() {
 
14
  sgColorPicker = jQuery('.sgOverlayColor').wpColorPicker({
 
 
 
 
15
  });
16
  jQuery(".wp-picker-holder").bind('click',function() {
17
  var selectedInput = jQuery(this).prev().find('.sgOverlayColor');
18
- if(selectedInput.attr("name") == 'countdownNumbersTextColor') {
19
- var textColor = selectedInput.val();
20
- jQuery("#sg-counts-text").remove();
21
- jQuery("body").append("<style id=\"sg-counts-text\">.flip-clock-wrapper ul li a div div.inn { color: "+textColor+"; }</style>");
22
- }
23
- if(selectedInput.attr("name") == 'countdownNumbersBgColor') {
24
- var bgColor = selectedInput.val();
25
- jQuery("#sg-counts-style").remove();
26
- jQuery("body").append("<style id=\"sg-counts-style\">.flip-clock-wrapper ul li a div div.inn { background-color: "+bgColor+"; }</style>");
27
- }
28
  });
29
  }
30
 
31
  SgPickers.prototype.datepicker = function() {
32
- jQuery('.sg-calndar').datepicker({
33
- dateFormat : 'yy-mm-dd',
34
- minDate: 0,
35
- onSelect: function() {
36
- }
37
  });
38
  }
39
 
10
  });
11
  }
12
 
13
+ SgPickers.prototype.changeColor = function(elemet) {
14
+ var selectedName = elemet.attr("name");
15
+ var elementVal = elemet.val();
16
+ if(selectedName == 'countdownNumbersTextColor') {
17
+ jQuery("#sg-counts-text").remove();
18
+ jQuery("body").append("<style id=\"sg-counts-text\">.flip-clock-wrapper ul li a div div.inn { color: "+elementVal+"; }</style>");
19
+ }
20
+ if(selectedName == 'countdownNumbersBgColor') {
21
+ jQuery("#sg-counts-style").remove();
22
+ jQuery("body").append("<style id=\"sg-counts-style\">.flip-clock-wrapper ul li a div div.inn { background-color: "+elementVal+"; }</style>");
23
+ }
24
+ }
25
+
26
  SgPickers.prototype.colorPicekr = function() {
27
+ var that = this;
28
  sgColorPicker = jQuery('.sgOverlayColor').wpColorPicker({
29
+ change: function() {
30
+ var sgColorpicker = jQuery(this);
31
+ that.changeColor(sgColorpicker);
32
+ }
33
  });
34
  jQuery(".wp-picker-holder").bind('click',function() {
35
  var selectedInput = jQuery(this).prev().find('.sgOverlayColor');
36
+ that.changeColor(selectedInput);
 
 
 
 
 
 
 
 
 
37
  });
38
  }
39
 
40
  SgPickers.prototype.datepicker = function() {
41
+ var that = this;
42
+ sgCalendar = jQuery('.sg-calndar').datepicker({
43
+ dateFormat : 'M dd yy',
44
+ minDate: 0
 
45
  });
46
  }
47
 
javascript/sg_popup_backend.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function($){
1
+ jQuery(document).ready(function($){
javascript/sg_popup_frontend.js CHANGED
@@ -64,9 +64,7 @@ SGPopup.prototype.showPopup = function(id, isOnLoad) {
64
  this.popupData = SG_POPUP_DATA[id];
65
  this.isOnLoad = isOnLoad;
66
  this.openOnce = this.varToBool(this.popupData['repeatPopup']);
67
- if (this.openOnce === false) {
68
- jQuery.removeCookie("sgPopupNumbers");
69
- }
70
  if (!this.canOpenPopup(this.popupData['id'], this.openOnce, isOnLoad)) {
71
  return;
72
  }
@@ -196,10 +194,11 @@ SGPopup.prototype.sgShowColorboxWithOptions = function() {
196
  else if(popupPosition == 9) { // Right Bottom
197
  that.setFixedPosition(false, false, '0%', '0%', 90, 90);
198
  }
199
- else {
200
  that.setFixedPosition(false, false, false, false, 50, 50);
201
  }
202
- var userDevice = false;
 
203
  if (popupForMobile) {
204
  userDevice = that.forMobile();
205
  }
@@ -234,6 +233,7 @@ SGPopup.prototype.sgShowColorboxWithOptions = function() {
234
  jQuery('#sgcolorbox').css('-webkit-animation-duration', popupEffectDuration+"s");
235
  jQuery("#sgcolorbox").addClass('sg-animated '+popupEffect+'');
236
  jQuery("#sgcboxOverlay").addClass("sgcboxOverlayBg");
 
237
  if (popupOverlayColor) {
238
  jQuery("#sgcboxOverlay").css({'background' : 'none', 'background-color' : popupOverlayColor});
239
  }
@@ -248,7 +248,6 @@ SGPopup.prototype.sgShowColorboxWithOptions = function() {
248
  jQuery('.sg-popup-close').on('click', function() {
249
  jQuery.sgcolorbox.close();
250
  });
251
-
252
  //Facebook reInit
253
  if(jQuery('#sg-facebook-like').length && typeof FB !== 'undefined') {
254
  FB.XFBML.parse();
64
  this.popupData = SG_POPUP_DATA[id];
65
  this.isOnLoad = isOnLoad;
66
  this.openOnce = this.varToBool(this.popupData['repeatPopup']);
67
+
 
 
68
  if (!this.canOpenPopup(this.popupData['id'], this.openOnce, isOnLoad)) {
69
  return;
70
  }
194
  else if(popupPosition == 9) { // Right Bottom
195
  that.setFixedPosition(false, false, '0%', '0%', 90, 90);
196
  }
197
+ if(!sgPopupFixed) {
198
  that.setFixedPosition(false, false, false, false, 50, 50);
199
  }
200
+
201
+ var userDevice = false;
202
  if (popupForMobile) {
203
  userDevice = that.forMobile();
204
  }
233
  jQuery('#sgcolorbox').css('-webkit-animation-duration', popupEffectDuration+"s");
234
  jQuery("#sgcolorbox").addClass('sg-animated '+popupEffect+'');
235
  jQuery("#sgcboxOverlay").addClass("sgcboxOverlayBg");
236
+ jQuery("#sgcboxOverlay").removeAttr('style');
237
  if (popupOverlayColor) {
238
  jQuery("#sgcboxOverlay").css({'background' : 'none', 'background-color' : popupOverlayColor});
239
  }
248
  jQuery('.sg-popup-close').on('click', function() {
249
  jQuery.sgcolorbox.close();
250
  });
 
251
  //Facebook reInit
252
  if(jQuery('#sg-facebook-like').length && typeof FB !== 'undefined') {
253
  FB.XFBML.parse();
javascript/sg_popup_javascript.php CHANGED
@@ -7,8 +7,7 @@ function sg_set_admin_url($hook) {
7
  }
8
 
9
  function sg_popup_admin_scripts($hook) {
10
-
11
- if ( 'popup-builder_page_edit-popup' == $hook || 'popup-builder_page_create-popup' == $hook ) {
12
 
13
  wp_enqueue_media();
14
  wp_register_script('javascript', SG_APP_POPUP_URL . '/javascript/sg_popup_backend.js', array('jquery'));
@@ -28,6 +27,8 @@ function sg_popup_admin_scripts($hook) {
28
 
29
  wp_enqueue_script('jquery-ui-datepicker');
30
 
 
 
31
  }
32
  }
33
 
7
  }
8
 
9
  function sg_popup_admin_scripts($hook) {
10
+ if ( 'popup-builder_page_edit-popup' == $hook || 'popup-builder_page_create-popup' == $hook || 'popup-builder_page_subscribers' == $hook) {
 
11
 
12
  wp_enqueue_media();
13
  wp_register_script('javascript', SG_APP_POPUP_URL . '/javascript/sg_popup_backend.js', array('jquery'));
27
 
28
  wp_enqueue_script('jquery-ui-datepicker');
29
 
30
+ wp_enqueue_style( 'wp-color-picker' );
31
+ wp_enqueue_script( 'sg_libs_handle', plugins_url('javascript/sg_datapickers.js',dirname(__FILE__)), array('wp-color-picker'));
32
  }
33
  }
34
 
javascript/sg_popup_rangeslider.js CHANGED
File without changes
javascript/sg_popup_support_plugins.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+ jQuery('#sgcolorbox').bind("sgColorboxOnCompleate", function() {
3
+
4
+ if(jQuery('div.wpcf7 > form').length) { /* Contact form 7 */
5
+ jQuery('div.wpcf7 > form').wpcf7InitForm();
6
+ }
7
+
8
+ if(jQuery('.myStat').length) { /* Percent to Infograph */
9
+ jQuery('.myStat').circliful();
10
+ }
11
+
12
+ if(jQuery("form[name ^= 'form']").length > 0) { /* for Form Maker plugin */
13
+ formMakerId = jQuery("form[name ^= 'form']").attr('name').match(/\d/g);
14
+ if(jQuery(".captcha_refresh").length > 0) {
15
+ jQuery(".captcha_refresh").bind('click', function() {
16
+ captcha_refresh("wd_captcha", formMakerId);
17
+ });
18
+ captcha_refresh("wd_captcha", formMakerId);
19
+ }
20
+ }
21
+
22
+ if(typeof wpcr3 != "undefined") { /* WP Customer Reviews */
23
+ wpcr3.init();
24
+ }
25
+ });
26
+ });
popup-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: http://sygnoos.com
5
  * Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
6
- * Version: 2.1.3
7
  * Author: Sygnoos
8
  * Author URI: http://www.sygnoos.com
9
  * License: GPLv2
@@ -18,7 +18,7 @@ define('SG_APP_POPUP_FILES', SG_APP_POPUP_PATH . '/files');
18
  define('SG_APP_POPUP_CLASSES', SG_APP_POPUP_PATH . '/classes');
19
  define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
20
  define('SG_APP_POPUP_TABLE_LIMIT', 15);
21
- define('SG_POPUP_VERSION', 2.12);
22
  define('SG_POPUP_PRO', 0);
23
  define('SG_POPUP_PRO_URL', 'http://sygnoos.com/wordpress-popup/');
24
 
@@ -26,24 +26,18 @@ $POPUP_TITLES = array(
26
  'image' => 'Image',
27
  'html' => 'HTML',
28
  'fblike' => 'Facebook',
29
- 'iframe' => 'Iframe',
30
- 'video' => 'Video',
31
- 'shortcode' => 'Shortcode',
32
- 'ageRestriction' => 'Age Restriction',
33
- 'countdown' => 'Countdown',
34
- 'social' => 'Social',
35
- 'exitIntent' => 'Exit Intent'
36
  );
37
 
38
- require_once( SG_APP_POPUP_CLASSES .'/SGPopup.php');
39
  require_once(SG_APP_POPUP_FILES .'/sg_functions.php');
40
- require_once( SG_APP_POPUP_CLASSES .'/PopupInstaller.php'); //cretae tables
41
  if (SG_POPUP_PRO) {
42
  require_once( SG_APP_POPUP_CLASSES .'/PopupProInstaller.php'); //uninstall tables
43
  }
44
- require_once( SG_APP_POPUP_PATH .'/style/sg_popup_style.php' ); //include our css file
45
- require_once( SG_APP_POPUP_JS .'/sg_popup_javascript.php' ); //include our js file
46
- require_once( SG_APP_POPUP_FILES .'/sg_popup_page_selection.php' ); // include here in page button for select popup every page
47
 
48
  register_activation_hook(__FILE__, 'sgPopupActivate');
49
  register_uninstall_hook(__FILE__, 'sgPopupDeactivate');
@@ -86,6 +80,9 @@ function sgAddMenu()
86
  add_submenu_page("PopupBuilder", "All Popups", "All Popups", 'manage_options', "PopupBuilder", "sgPopupMenu");
87
  add_submenu_page("PopupBuilder", "Add New", "Add New", 'manage_options', "create-popup", "sgCreatePopup");
88
  add_submenu_page("PopupBuilder", "Edit Popup", "Edit Popup", 'manage_options', "edit-popup", "sgEditPopup");
 
 
 
89
  }
90
 
91
  function sgPopupMenu()
@@ -103,6 +100,11 @@ function sgEditPopup()
103
  require_once( SG_APP_POPUP_FILES . '/sg_popup_create_new.php');
104
  }
105
 
 
 
 
 
 
106
  function sgRegisterScripts()
107
  {
108
  SGPopup::$registeredScripts = true;
@@ -111,14 +113,15 @@ function sgRegisterScripts()
111
  wp_register_script('sg_popup_frontend', SG_APP_POPUP_URL . '/javascript/sg_popup_frontend.js', array('jquery'));
112
  wp_enqueue_script('sg_popup_frontend');
113
  wp_enqueue_script('jquery');
114
- wp_register_script('sg_cookie', SG_APP_POPUP_URL . '/javascript/jquery.cookie.js', array('jquery'));
115
- wp_enqueue_script('sg_cookie');
116
  wp_register_script('sg_colorbox', SG_APP_POPUP_URL . '/javascript/jquery.sgcolorbox-min.js', array('jquery'), '5.0');
117
  wp_enqueue_script('sg_colorbox');
 
 
118
  if (SG_POPUP_PRO) {
 
 
119
  wp_register_script('sgPopupPro', SG_APP_POPUP_URL . '/javascript/sg_popup_pro.js?ver=4.2.3');
120
  wp_enqueue_script('sgPopupPro');
121
- //echo "<script type='text/javascript' src = ".SG_APP_POPUP_URL."/javascript/sg_popup_pro.js?ver=4.2.3'></script>";
122
  }
123
  echo "<script type='text/javascript'>SG_POPUP_DATA = [];SG_APP_POPUP_URL = '".SG_APP_POPUP_URL."';</script>";
124
  }
@@ -197,17 +200,40 @@ function sgRenderPopupOpen($popupId)
197
 
198
  function sgOnloadPopup()
199
  {
 
 
 
 
 
200
  $sgOnloadPopupId = get_option('SG_POPUP_ONLOAD_ID');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  if($sgOnloadPopupId) {
 
 
 
 
 
 
 
 
 
 
202
  sgRenderPopupOpen($sgOnloadPopupId);
203
  }
204
- $page = get_queried_object_id ();
205
- $popup = "sg_promotional_popup";
206
- $popupId = SGPopup::getPagePopupId($page,$popup);
207
- if (!$popupId) {
208
- return;
209
- }
210
- sgRenderPopupOpen($popupId);
211
  }
212
 
213
  add_action('wp_head','sgOnloadPopup');
@@ -215,7 +241,6 @@ require_once( SG_APP_POPUP_FILES . '/sg_popup_media_button.php');
215
  require_once( SG_APP_POPUP_FILES . '/sg_popup_save.php'); // saving form data
216
  require_once( SG_APP_POPUP_FILES . '/sg_popup_ajax.php');
217
 
218
-
219
  function sgPopupPluginLoaded()
220
  {
221
  $versionPopup = get_option('SG_POPUP_VERSION');
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.1.4
7
  * Author: Sygnoos
8
  * Author URI: http://www.sygnoos.com
9
  * License: GPLv2
18
  define('SG_APP_POPUP_CLASSES', SG_APP_POPUP_PATH . '/classes');
19
  define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
20
  define('SG_APP_POPUP_TABLE_LIMIT', 15);
21
+ define('SG_POPUP_VERSION', 2.14);
22
  define('SG_POPUP_PRO', 0);
23
  define('SG_POPUP_PRO_URL', 'http://sygnoos.com/wordpress-popup/');
24
 
26
  'image' => 'Image',
27
  'html' => 'HTML',
28
  'fblike' => 'Facebook',
29
+ 'shortcode' => 'Shortcode'
 
 
 
 
 
 
30
  );
31
 
32
+ require_once(SG_APP_POPUP_CLASSES .'/SGPopup.php');
33
  require_once(SG_APP_POPUP_FILES .'/sg_functions.php');
34
+ require_once(SG_APP_POPUP_CLASSES .'/PopupInstaller.php'); //cretae tables
35
  if (SG_POPUP_PRO) {
36
  require_once( SG_APP_POPUP_CLASSES .'/PopupProInstaller.php'); //uninstall tables
37
  }
38
+ require_once(SG_APP_POPUP_PATH .'/style/sg_popup_style.php' ); //include our css file
39
+ require_once(SG_APP_POPUP_JS .'/sg_popup_javascript.php' ); //include our js file
40
+ require_once(SG_APP_POPUP_FILES .'/sg_popup_page_selection.php' ); // include here in page button for select popup every page
41
 
42
  register_activation_hook(__FILE__, 'sgPopupActivate');
43
  register_uninstall_hook(__FILE__, 'sgPopupDeactivate');
80
  add_submenu_page("PopupBuilder", "All Popups", "All Popups", 'manage_options', "PopupBuilder", "sgPopupMenu");
81
  add_submenu_page("PopupBuilder", "Add New", "Add New", 'manage_options', "create-popup", "sgCreatePopup");
82
  add_submenu_page("PopupBuilder", "Edit Popup", "Edit Popup", 'manage_options', "edit-popup", "sgEditPopup");
83
+ if (SG_POPUP_PRO) {
84
+ add_submenu_page("PopupBuilder", "Subscribers", "Subscribers", 'manage_options', "subscribers", "sgSubscribers");
85
+ }
86
  }
87
 
88
  function sgPopupMenu()
100
  require_once( SG_APP_POPUP_FILES . '/sg_popup_create_new.php');
101
  }
102
 
103
+ function sgSubscribers()
104
+ {
105
+ require_once( SG_APP_POPUP_FILES . '/sg_subscribers.php');
106
+ }
107
+
108
  function sgRegisterScripts()
109
  {
110
  SGPopup::$registeredScripts = true;
113
  wp_register_script('sg_popup_frontend', SG_APP_POPUP_URL . '/javascript/sg_popup_frontend.js', array('jquery'));
114
  wp_enqueue_script('sg_popup_frontend');
115
  wp_enqueue_script('jquery');
 
 
116
  wp_register_script('sg_colorbox', SG_APP_POPUP_URL . '/javascript/jquery.sgcolorbox-min.js', array('jquery'), '5.0');
117
  wp_enqueue_script('sg_colorbox');
118
+ wp_register_script('sg_popup_support_plugins', SG_APP_POPUP_URL . '/javascript/sg_popup_support_plugins.js', array('jquery'));
119
+ wp_enqueue_script('sg_popup_support_plugins');
120
  if (SG_POPUP_PRO) {
121
+ wp_register_script('sg_cookie', SG_APP_POPUP_URL . '/javascript/jquery_cookie.js', array('jquery'));
122
+ wp_enqueue_script('sg_cookie');
123
  wp_register_script('sgPopupPro', SG_APP_POPUP_URL . '/javascript/sg_popup_pro.js?ver=4.2.3');
124
  wp_enqueue_script('sgPopupPro');
 
125
  }
126
  echo "<script type='text/javascript'>SG_POPUP_DATA = [];SG_APP_POPUP_URL = '".SG_APP_POPUP_URL."';</script>";
127
  }
200
 
201
  function sgOnloadPopup()
202
  {
203
+ $page = get_queried_object_id();
204
+ $popup = "sg_promotional_popup";
205
+ //If popup is set on page load
206
+ $popupId = SGPopup::getPagePopupId($page, $popup);
207
+ //If popup is set for all pages
208
  $sgOnloadPopupId = get_option('SG_POPUP_ONLOAD_ID');
209
+
210
+ if($popupId) {
211
+ //If popup is exit intent
212
+ $exitIntentType = get_option('SG_POPUP_EXITINTENT_'.$popupId);
213
+
214
+ if(isset($exitIntentType) && $exitIntentType == $popupId) {
215
+ sgRenderPopupScript($popupId);
216
+ require_once(SG_APP_POPUP_CLASSES.'/SGExitintentPopup.php');
217
+ $exitObj = new SGExitintentPopup();
218
+ echo $exitObj->getExitIntentInitScript($popupId);
219
+ return;
220
+ }
221
+ sgRenderPopupOpen($popupId);
222
+ }
223
+
224
  if($sgOnloadPopupId) {
225
+ //If popup is exit intent
226
+ $exitIntentType = get_option('SG_POPUP_EXITINTENT_'.$sgOnloadPopupId);
227
+
228
+ if(isset($exitIntentType) && $exitIntentType == $sgOnloadPopupId) {
229
+ sgRenderPopupScript($sgOnloadPopupId);
230
+ require_once(SG_APP_POPUP_CLASSES.'/SGExitintentPopup.php');
231
+ $exitObj = new SGExitintentPopup();
232
+ echo $exitObj->getExitIntentInitScript($sgOnloadPopupId);
233
+ return;
234
+ }
235
  sgRenderPopupOpen($sgOnloadPopupId);
236
  }
 
 
 
 
 
 
 
237
  }
238
 
239
  add_action('wp_head','sgOnloadPopup');
241
  require_once( SG_APP_POPUP_FILES . '/sg_popup_save.php'); // saving form data
242
  require_once( SG_APP_POPUP_FILES . '/sg_popup_ajax.php');
243
 
 
244
  function sgPopupPluginLoaded()
245
  {
246
  $versionPopup = get_option('SG_POPUP_VERSION');
readme.txt CHANGED
@@ -3,14 +3,14 @@ Plugin Name: Popup Builder
3
  Contributors: Popup By Sygnoos
4
  Author: Sygnoos
5
  Donate link: http://sygnoos.com/wordpress-popup/
6
- Tags: popup,popup promote,promotional popup,popup ads, popup advertising, popup box, popup form, popup message, popup window, popups, wordpress popup, simple popup, modal window, responsive popup, fancybox, fancy popup, lightbox, automatic popup, custom popup,popup message, youtube popup, video popup, iframe popup, vimeo popup, popup contact form, dialog box, fancy box popup, wordpress popup plugin, andlightbox popup, popup builder, wordpress popup builder, html popup, onclick popup, media, shortcode popup, colorbox popup, social popup, age restriction popup, countdown popup, facebook popup, facebook like popup, age restriction
7
  Requires at least: 3.8
8
- Tested up to: 4.4
9
  Stable tag: trunk
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
13
- The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
14
 
15
  == Description ==
16
 
@@ -40,17 +40,19 @@ With popup builder plugin you can insert any type of content, right into your Po
40
  * Html popup - Popup Builder
41
  * Image popup - Popup Builder
42
  * Facebook popup - Popup Builder
 
43
 
44
 
45
  **Popup Builder - PRO features:**
46
 
47
- * Create iframe popup - you can set the URL you want to load within an iframe and the popup will load that iframe
48
- * Create popup from shortcodes of other plugins - very useful when you want to load another plugin inside your popup
49
- * Create video popup - embed YouTube and Vimeo videos inside your popup.
50
- * Create social popup - this is a great type of a popup if you need to share/like your site. In social popup we have added all popular social networks like Facebook, Linkedin, Twitter, Google Plus etc.
51
- * Create age restriction popup - sometimes the site content may not be appropriate for all audiences. In these cases, users may not be able to view the content until they pass age confirmation popup.
52
  * Create countdown popup - your site is under construction and you are planing to open it in some amount of time, in this case countdown popup exactly for you. Comming soon.
53
- * Create Exit Intent popup - catch your users attention when they decides to leave your site without doing any of the things you want them to do. Exit Intent popup can briefly interrupt them with a popup message, steering them towards a singular call to action.
 
 
54
  * Show popup only when user is scrolling - sometimes you don't want to show the popup right away, it's a good idea to set this option so the popup will be shown to the visitor only when he scrolls.
55
  * Show popup once per visitor - useful when you don't want to show the popup to the same visitor more than once.
56
  * Don't show popup on mobile devices - after activating this option, popup won't be shown in mobile devices.
@@ -68,8 +70,6 @@ Popup Builder team constantly works on upgrades and improvements. With our upcom
68
 
69
  > + Targetting popup - This popup allows you to show popup depending user location. This kind of popup is useful if your product or service is created for a specifig region.
70
 
71
- > + Contact form popup - Contact form popup will allows your clients to write you a message right from the popup.
72
-
73
  Thank you for using our popup plugin.
74
 
75
  <div>
@@ -110,6 +110,10 @@ Go to the Popup Builder settings and set your desired options.
110
 
111
  == Changelog ==
112
 
 
 
 
 
113
  = Version 2.1.3 =
114
  * Bug fixed.
115
 
@@ -230,7 +234,7 @@ Contact us! Depending on your server configuration something may go wrong, pleas
230
 
231
  == Other Notes ==
232
 
233
- Current Version of Popup Builder is 2.1.3
234
 
235
  = HTML Popup =
236
 
@@ -245,6 +249,14 @@ You are writing about an awesome topic and want your ideas to stand out in the c
245
  The installed image popup allows to determine the image dimensions, which, in its turn, are resized/repositioned automatically when the window is being resized. This popup provides options for choosing the image frame theme and effects that vary in the duration of the popup animation as well. There is also the possibility to specify how long the ready-made popup appearance should be delayed after loading the page (in sec).
246
  With the help of both basic and advanced options, you are able to freely regulate the dismissal, display, colour and location of the image popup. It can appear at the top right/left corner, at the bottom or in the centre. You can choose to show the popup whenever the user scrolls the page or ensure its permanent occurrence by disabling popup closing in any possible way. On the other hand, the popup can be chosen to close automatically, be dismissed when the user clicks inside or beyond of the popup area. Also, it's up to you to decide on your popup accessibility on different devices ( PC, mobile, etc.).
247
 
 
 
 
 
 
 
 
 
248
  = Iframe Popup =
249
 
250
  Here is another useful popup to make your content or website more sociable and vibrant. It is a great addition to your social toolkit, since Iframe enables you to include and remind of another website with the help of a simple popup.
3
  Contributors: Popup By Sygnoos
4
  Author: Sygnoos
5
  Donate link: http://sygnoos.com/wordpress-popup/
6
+ Tags: popup,popup promote,promotional popup,popup ads, popup advertising, popup box, popup form, popup message, popup window, popups, wordpress popup, simple popup, modal window, responsive popup, fancybox, fancy popup, lightbox, automatic popup, custom popup,popup message, youtube popup, video popup, iframe popup, vimeo popup, popup contact form, dialog box, fancy box popup, wordpress popup plugin, andlightbox popup, popup builder, wordpress popup builder, html popup, onclick popup, media, shortcode popup, colorbox popup, social popup, age restriction popup, countdown popup, facebook popup, facebook like popup, age restriction, subsription popup
7
  Requires at least: 3.8
8
+ Tested up to: 4.4.1
9
  Stable tag: trunk
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
13
+ The most complete popup plugin. Html popup, image popup, shortcode popup and many other popup types. Manage popup dimensions,effects,themes and more.
14
 
15
  == Description ==
16
 
40
  * Html popup - Popup Builder
41
  * Image popup - Popup Builder
42
  * Facebook popup - Popup Builder
43
+ * Shortcode popup - Popup Builder
44
 
45
 
46
  **Popup Builder - PRO features:**
47
 
48
+ * Iframe popup - you can set the URL you want to load within an iframe and the popup will load that iframe
49
+ * Video popup - embed YouTube and Vimeo videos inside your popup.
50
+ * Social popup - this is a great type of a popup if you need to share/like your site. In social popup we have added all popular social networks like Facebook, Linkedin, Twitter, Google Plus etc.
51
+ * Age restriction popup - sometimes the site content may not be appropriate for all audiences. In these cases, users may not be able to view the content until they pass age confirmation popup.
 
52
  * Create countdown popup - your site is under construction and you are planing to open it in some amount of time, in this case countdown popup exactly for you. Comming soon.
53
+ * Exit Intent popup - catch your users attention when they decides to leave your site without doing any of the things you want them to do. Exit Intent popup can briefly interrupt them with a popup message, steering them towards a singular call to action.
54
+ * Subsription popup - this kind of popup provides the easiest way to create an efficient connection between users and your website through subscription popup. With this simple popup solution you can quickly collect subscribers in a very pleasant and elegant way.
55
+ * Create contact form popup - contact popup will allows your clients to write you a message right from the popup.
56
  * Show popup only when user is scrolling - sometimes you don't want to show the popup right away, it's a good idea to set this option so the popup will be shown to the visitor only when he scrolls.
57
  * Show popup once per visitor - useful when you don't want to show the popup to the same visitor more than once.
58
  * Don't show popup on mobile devices - after activating this option, popup won't be shown in mobile devices.
70
 
71
  > + Targetting popup - This popup allows you to show popup depending user location. This kind of popup is useful if your product or service is created for a specifig region.
72
 
 
 
73
  Thank you for using our popup plugin.
74
 
75
  <div>
110
 
111
  == Changelog ==
112
 
113
+ = Version 2.1.4 =
114
+ * Short code popup added
115
+ * Bug fixed.
116
+
117
  = Version 2.1.3 =
118
  * Bug fixed.
119
 
234
 
235
  == Other Notes ==
236
 
237
+ Current Version of Popup Builder is 2.1.4
238
 
239
  = HTML Popup =
240
 
249
  The installed image popup allows to determine the image dimensions, which, in its turn, are resized/repositioned automatically when the window is being resized. This popup provides options for choosing the image frame theme and effects that vary in the duration of the popup animation as well. There is also the possibility to specify how long the ready-made popup appearance should be delayed after loading the page (in sec).
250
  With the help of both basic and advanced options, you are able to freely regulate the dismissal, display, colour and location of the image popup. It can appear at the top right/left corner, at the bottom or in the centre. You can choose to show the popup whenever the user scrolls the page or ensure its permanent occurrence by disabling popup closing in any possible way. On the other hand, the popup can be chosen to close automatically, be dismissed when the user clicks inside or beyond of the popup area. Also, it's up to you to decide on your popup accessibility on different devices ( PC, mobile, etc.).
251
 
252
+
253
+ = ShortCode Popup =
254
+
255
+ It is so wonderful and advantageous that more and more people take up the business of Internet content creation, as each of them tries to enrich us with marvelous tools to make use of in different spheres. Some are the authors of tooltips, column layouts, galleries, others of buttons, blockquotes, social media buttons, etc.. All of the latter can be inserted into any of your content, page or post in the form of a short code which will be opened in a popup window.
256
+ Besides having the ability to add a short code into the popup, it is also possible to manage the popup development with the help of different options available. First, you can apply a certain theme and/or effect to it, decide how long its appearance should be delayed after loading the page. Then, you will be able to configure the display and dismissal of the popup by choosing it to be closed automatically or by hand, be opened while scrolling or be a permanent one. Also, you are to decide where the popup will be located.
257
+ As far as the popup accessibility on different devices is freely manageable too, the popup is quite responsive and is resized accordingly.
258
+
259
+
260
  = Iframe Popup =
261
 
262
  Here is another useful popup to make your content or website more sociable and vibrant. It is a great addition to your social toolkit, since Iframe enables you to include and remind of another website with the help of a simple popup.
style/animate.css CHANGED
File without changes
style/sg_popup_rangeslider.css CHANGED
File without changes
style/sg_popup_style.css CHANGED
@@ -3,6 +3,16 @@
3
  margin-right: 1px;
4
  }
5
 
 
 
 
 
 
 
 
 
 
 
6
  #sg-general .postbox-container,
7
  #effect .postbox-container,
8
  #dimentions .postbox-container,
@@ -58,7 +68,8 @@ h3.hndle .ui-sortable-handle .generalTitle {
58
  margin-left: 0px;
59
  }
60
 
61
- .advanced-options-content .same-image-style {
 
62
  margin-left: 3%;
63
  }
64
 
@@ -235,6 +246,16 @@ div.sg-hide {
235
  padding: 6px;
236
  }
237
 
 
 
 
 
 
 
 
 
 
 
238
  #disine tr:nth-child(even) {
239
  background-color: #F9F9F9;
240
  }
@@ -322,6 +343,10 @@ span.phpErrorStyle {
322
  background-image: url("../img/ExitIntent.png");
323
  }
324
 
 
 
 
 
325
  .iframe-popup-pro {
326
  background-image: url("../img/iframePopupPro.png");
327
  }
@@ -354,6 +379,10 @@ span.phpErrorStyle {
354
  background-image: url("../img/SubscriptionButtonPro.png");
355
  }
356
 
 
 
 
 
357
  .generalMenu {
358
  width: 98%;
359
  height: 39px;
@@ -962,13 +991,12 @@ input[name="theme"] {
962
  }
963
 
964
  @media(max-width: 1042px) {
965
- #left-main-div #poststuff {
966
- width: 97.5%;
967
  margin: 0px auto;
968
- background-color: red;
969
  }
970
- #right-main-div #poststuff {
971
- width: 97.5%;
972
  margin: 0px auto;
973
  }
974
  }
3
  margin-right: 1px;
4
  }
5
 
6
+ .sg-text-align {
7
+ text-align: center;
8
+ }
9
+
10
+ .shortcode-use-info {
11
+ display: inline-block;
12
+ margin-bottom: 8px;
13
+ font-style: italic;
14
+ }
15
+
16
  #sg-general .postbox-container,
17
  #effect .postbox-container,
18
  #dimentions .postbox-container,
68
  margin-left: 0px;
69
  }
70
 
71
+ .advanced-options-content .same-image-style,
72
+ .special-options-content .same-image-style {
73
  margin-left: 3%;
74
  }
75
 
246
  padding: 6px;
247
  }
248
 
249
+ .js-subs-text-inputs {
250
+ margin-bottom: 9px !important;
251
+ display: block;
252
+ margin: 3px auto !important;
253
+ }
254
+
255
+ .js-subs-submit-btn {
256
+ border-width: 0px;
257
+ }
258
+
259
  #disine tr:nth-child(even) {
260
  background-color: #F9F9F9;
261
  }
343
  background-image: url("../img/ExitIntent.png");
344
  }
345
 
346
+ .sg-subscription {
347
+ background-image: url("../img/SubscriptionButton.png");
348
+ }
349
+
350
  .iframe-popup-pro {
351
  background-image: url("../img/iframePopupPro.png");
352
  }
379
  background-image: url("../img/SubscriptionButtonPro.png");
380
  }
381
 
382
+ .contact-pro {
383
+ background-image: url("../img/ContactFormButtonPro.png");
384
+ }
385
+
386
  .generalMenu {
387
  width: 98%;
388
  height: 39px;
991
  }
992
 
993
  @media(max-width: 1042px) {
994
+ #left-main-div {
995
+ width: 100%;
996
  margin: 0px auto;
 
997
  }
998
+ #right-main-div {
999
+ width: 100%;
1000
  margin: 0px auto;
1001
  }
1002
  }
style/sg_popup_style.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  function sg_popup_admin_style($hook) {
3
- if ('toplevel_page_PopupBuilder' != $hook && 'popup-builder_page_create-popup' != $hook && 'popup-builder_page_edit-popup' != $hook && 'popup-builder_page_sgPopupMenu' != $hook) {
4
  return;
5
  }
6
- wp_register_style('sg_popup_style', SG_APP_POPUP_URL . '/style/sg_popup_style.css', false, '1.0.0');
7
  wp_enqueue_style('sg_popup_style');
8
  wp_register_style('sg_popup_animate', SG_APP_POPUP_URL . '/style/animate.css');
9
  wp_enqueue_style('sg_popup_animate');
@@ -34,11 +34,3 @@ function sg_popup_style($hook) {
34
  }
35
 
36
  add_action('admin_enqueue_scripts', 'sg_popup_style');
37
- add_action( 'admin_enqueue_scripts', 'mw_enqueue_color_picker' );
38
- function mw_enqueue_color_picker( $hook_suffix ) {
39
- if('popup-builder_page_edit-popup' != $hook_suffix) {
40
- return;
41
- }
42
- wp_enqueue_style( 'wp-color-picker' );
43
- wp_enqueue_script( 'sg_libs_handle', plugins_url('javascript/sg_datapickers.js',dirname(__FILE__)), array( 'wp-color-picker' ));
44
- }
1
  <?php
2
  function sg_popup_admin_style($hook) {
3
+ if ('toplevel_page_PopupBuilder' != $hook && 'popup-builder_page_create-popup' != $hook && 'popup-builder_page_edit-popup' != $hook && 'popup-builder_page_sgPopupMenu' != $hook && 'popup-builder_page_subscribers' != $hook) {
4
  return;
5
  }
6
+ wp_register_style('sg_popup_style', SG_APP_POPUP_URL . '/style/sg_popup_style.css', false, SG_POPUP_VERSION);
7
  wp_enqueue_style('sg_popup_style');
8
  wp_register_style('sg_popup_animate', SG_APP_POPUP_URL . '/style/animate.css');
9
  wp_enqueue_style('sg_popup_animate');
34
  }
35
 
36
  add_action('admin_enqueue_scripts', 'sg_popup_style');
 
 
 
 
 
 
 
 
style/sgcolorbox/colorbox1.css CHANGED
File without changes
style/sgcolorbox/colorbox2.css CHANGED
File without changes
style/sgcolorbox/colorbox3.css CHANGED
File without changes
style/sgcolorbox/colorbox4.css CHANGED
File without changes
style/sgcolorbox/colorbox5.css CHANGED
File without changes