Version Description
Current Version of Popup Builder is 2.3.9
Download this release
Release Info
Developer | Sygnoos |
Plugin | Popup Builder – Responsive WordPress Pop up |
Version | 2.3.9.1 |
Comparing to | |
See all releases |
Code changes from version 2.3.8 to 2.3.9.1
- classes/PopupInstaller.php +1 -1
- classes/SGFblikePopup.php +5 -4
- classes/SGHtmlPopup.php +5 -5
- classes/SGPopupBuilderMain.php +6 -0
- classes/SGShortcodePopup.php +3 -4
- classes/sgDataTable/SGPopupTable.php +7 -0
- classes/sgDataTable/Table.php +1 -1
- config.php +3 -1
- files/sg_admin_post.php +34 -16
- files/sg_functions.php +13 -0
- files/sg_popup_actions.php +98 -0
- files/sg_popup_ajax.php +74 -1
- files/sg_popup_create.php +16 -6
- files/sg_popup_create_new.php +24 -13
- files/sg_popup_filetrs.php +10 -0
- files/sg_popup_main.php +1 -1
- files/sg_popup_media_button.php +6 -1
- files/sg_popup_page_selection.php +3 -0
- files/sg_popup_save.php +13 -78
- helpers/Integrate_external_settings.php +20 -8
- helpers/SgPopupGetData.php +28 -0
- img/colorbox6/border1.png +0 -0
- img/colorbox6/border2.png +0 -0
- img/colorbox6/colorbox_overlay.png +0 -0
- img/colorbox6/colorbox_sprite.png +0 -0
- img/colorbox6/loading.gif +0 -0
- img/theme6.jpg +0 -0
- javascript/sg_popup_backend.js +1 -1
- javascript/sg_popup_frontend.js +40 -13
- javascript/sg_popup_init.js +19 -4
- javascript/sg_popup_javascript.php +5 -1
- popup-builder.php +57 -44
- readme.txt +16 -3
- style/sg_popup_style.css +266 -34
- style/sg_popup_style.php +3 -2
- style/sgcolorbox/colorbox6.css +123 -0
classes/PopupInstaller.php
CHANGED
@@ -43,7 +43,7 @@ class PopupInstaller
|
|
43 |
$sgPopupAddon = "CREATE TABLE IF NOT EXISTS ". $wpdb->prefix.$blogsId."sg_popup_addons (
|
44 |
`id` int(11) NOT NULL AUTO_INCREMENT,
|
45 |
`name` varchar(255) NOT NULL UNIQUE,
|
46 |
-
`paths`
|
47 |
`type` varchar(255) NOT NULL,
|
48 |
`options` TEXT NOT NULL,
|
49 |
PRIMARY KEY (id)
|
43 |
$sgPopupAddon = "CREATE TABLE IF NOT EXISTS ". $wpdb->prefix.$blogsId."sg_popup_addons (
|
44 |
`id` int(11) NOT NULL AUTO_INCREMENT,
|
45 |
`name` varchar(255) NOT NULL UNIQUE,
|
46 |
+
`paths` TEXT NOT NULL,
|
47 |
`type` varchar(255) NOT NULL,
|
48 |
`options` TEXT NOT NULL,
|
49 |
PRIMARY KEY (id)
|
classes/SGFblikePopup.php
CHANGED
@@ -104,12 +104,10 @@ class SGFblikePopup extends SGPopup
|
|
104 |
if($hasShortcode) {
|
105 |
|
106 |
$content = $this->improveContent($content);
|
|
|
107 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
108 |
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">".$content."</div></div>";
|
109 |
-
|
110 |
-
$currentPopupContent = trim(preg_replace('/\s+/', ' ', $currentPopupContent));
|
111 |
-
$currentPopupContent = preg_replace('/<\/script>/', '<\/script>', addslashes($currentPopupContent));
|
112 |
-
/*Append to body for shortcode break to new line*/
|
113 |
echo "<script type=\"text/javascript\">
|
114 |
jQuery(document).ready(function() {
|
115 |
jQuery('body').append(jQuery('".$currentPopupContent."'));
|
@@ -117,6 +115,9 @@ class SGFblikePopup extends SGPopup
|
|
117 |
</script>";
|
118 |
$content = ' ';
|
119 |
}
|
|
|
|
|
|
|
120 |
|
121 |
return array('html'=>$content);
|
122 |
}
|
104 |
if($hasShortcode) {
|
105 |
|
106 |
$content = $this->improveContent($content);
|
107 |
+
$content = base64_encode($content);
|
108 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
109 |
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">".$content."</div></div>";
|
110 |
+
|
|
|
|
|
|
|
111 |
echo "<script type=\"text/javascript\">
|
112 |
jQuery(document).ready(function() {
|
113 |
jQuery('body').append(jQuery('".$currentPopupContent."'));
|
115 |
</script>";
|
116 |
$content = ' ';
|
117 |
}
|
118 |
+
else {
|
119 |
+
$content = base64_encode($content);
|
120 |
+
}
|
121 |
|
122 |
return array('html'=>$content);
|
123 |
}
|
classes/SGHtmlPopup.php
CHANGED
@@ -55,11 +55,8 @@ class SGHtmlPopup extends SGPopup {
|
|
55 |
|
56 |
$content = $this->improveContent($content);
|
57 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
58 |
-
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">"
|
59 |
-
|
60 |
-
$currentPopupContent = trim(preg_replace('/\s+/', ' ', $currentPopupContent));
|
61 |
-
$currentPopupContent = preg_replace('/<\/script>/', '<\/script>', addslashes($currentPopupContent));
|
62 |
-
/*Append to body for shortcode break to new line*/
|
63 |
echo "<script type=\"text/javascript\">
|
64 |
jQuery(document).ready(function() {
|
65 |
jQuery('body').append(jQuery('".$currentPopupContent."'));
|
@@ -67,6 +64,9 @@ class SGHtmlPopup extends SGPopup {
|
|
67 |
</script>";
|
68 |
$content = ' ';
|
69 |
}
|
|
|
|
|
|
|
70 |
|
71 |
return array('html' => $content);
|
72 |
}
|
55 |
|
56 |
$content = $this->improveContent($content);
|
57 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
58 |
+
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">".base64_encode($content)."</div></div>";
|
59 |
+
|
|
|
|
|
|
|
60 |
echo "<script type=\"text/javascript\">
|
61 |
jQuery(document).ready(function() {
|
62 |
jQuery('body').append(jQuery('".$currentPopupContent."'));
|
64 |
</script>";
|
65 |
$content = ' ';
|
66 |
}
|
67 |
+
else {
|
68 |
+
$content = base64_encode($content);
|
69 |
+
}
|
70 |
|
71 |
return array('html' => $content);
|
72 |
}
|
classes/SGPopupBuilderMain.php
CHANGED
@@ -24,6 +24,7 @@ class SGPopupBuilderMain {
|
|
24 |
add_submenu_page("PopupBuilder", "Settings", "Settings", 'read', "popup-settings", array($this,"sgPopupSettings"));
|
25 |
if (POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_SILVER) {
|
26 |
add_submenu_page("PopupBuilder", "Subscribers", "Subscribers", 'read', "subscribers", array($this,"sgSubscribers"));
|
|
|
27 |
}
|
28 |
add_submenu_page("PopupBuilder", "More plugins", "More plugins", 'read', "more-plugins", array($this,"showMorePlugins"));
|
29 |
}
|
@@ -53,6 +54,11 @@ class SGPopupBuilderMain {
|
|
53 |
require_once( SG_APP_POPUP_FILES . '/sg_subscribers.php');
|
54 |
}
|
55 |
|
|
|
|
|
|
|
|
|
|
|
56 |
public function showMorePlugins() {
|
57 |
|
58 |
require_once( SG_APP_POPUP_FILES . '/sg_more_plugins.php');
|
24 |
add_submenu_page("PopupBuilder", "Settings", "Settings", 'read', "popup-settings", array($this,"sgPopupSettings"));
|
25 |
if (POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_SILVER) {
|
26 |
add_submenu_page("PopupBuilder", "Subscribers", "Subscribers", 'read', "subscribers", array($this,"sgSubscribers"));
|
27 |
+
add_submenu_page("PopupBuilder", "Newsletter", "Newsletter", 'read', "newsletter", array($this,"sgNewsletter"));
|
28 |
}
|
29 |
add_submenu_page("PopupBuilder", "More plugins", "More plugins", 'read', "more-plugins", array($this,"showMorePlugins"));
|
30 |
}
|
54 |
require_once( SG_APP_POPUP_FILES . '/sg_subscribers.php');
|
55 |
}
|
56 |
|
57 |
+
public function sgNewsletter() {
|
58 |
+
|
59 |
+
require_once( SG_APP_POPUP_FILES . '/sg_newsletter.php');
|
60 |
+
}
|
61 |
+
|
62 |
public function showMorePlugins() {
|
63 |
|
64 |
require_once( SG_APP_POPUP_FILES . '/sg_more_plugins.php');
|
classes/SGShortcodePopup.php
CHANGED
@@ -45,12 +45,11 @@ class SGShortcodePopup extends SGPopup {
|
|
45 |
}
|
46 |
protected function getExtraRenderOptions() {
|
47 |
$content = do_shortcode($this->getShortcode());
|
48 |
-
|
|
|
49 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
50 |
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">".$content."</div></div>";
|
51 |
-
|
52 |
-
$currentPopupContent = trim(preg_replace('/\s+/', ' ', $currentPopupContent));
|
53 |
-
$currentPopupContent = preg_replace('/<\/script>/', '<\/script>', addslashes($currentPopupContent));
|
54 |
/*Append to body for shortcode break to new line*/
|
55 |
echo "<script type=\"text/javascript\">
|
56 |
jQuery(document).ready(function() {
|
45 |
}
|
46 |
protected function getExtraRenderOptions() {
|
47 |
$content = do_shortcode($this->getShortcode());
|
48 |
+
|
49 |
+
$content = base64_encode($content);
|
50 |
/*Add this part of code right into the page to escape conflicts with shortcodes init functionlity*/
|
51 |
$currentPopupContent = "<div id=\"sg-popup-content-".$this->getId()."\" style=\"display: none;\"> <div id=\"sgpb-all-content-".$this->getId()."\">".$content."</div></div>";
|
52 |
+
|
|
|
|
|
53 |
/*Append to body for shortcode break to new line*/
|
54 |
echo "<script type=\"text/javascript\">
|
55 |
jQuery(document).ready(function() {
|
classes/sgDataTable/SGPopupTable.php
CHANGED
@@ -17,6 +17,7 @@ class SGPB_PopupsView extends SGPB_Table
|
|
17 |
));
|
18 |
$this->setDisplayColumns(array(
|
19 |
'id' => 'ID',
|
|
|
20 |
'title' => 'Title',
|
21 |
'type' => 'Type',
|
22 |
'shortcode' => 'Auto shortcode',
|
@@ -34,11 +35,17 @@ class SGPB_PopupsView extends SGPB_Table
|
|
34 |
public function customizeRow(&$row)
|
35 |
{
|
36 |
$id = $row[0];
|
|
|
|
|
|
|
|
|
|
|
37 |
$type = $row[2];
|
38 |
$editUrl = admin_url()."admin.php?page=edit-popup&id=".$id."&type=".$type."";
|
39 |
$row[3] = "<input type='text' onfocus='this.select();' readonly value='[sg_popup id=".$id."]' class='large-text code'>";
|
40 |
$row[4] = '<a href="'.@$editUrl.'">'.__('Edit', 'sgpt').'</a> <a href="#" data-sg-popup-id="'.$id.'" class="sg-js-delete-link">'.__('Delete', 'sgpt').'</a>
|
41 |
<a href="'.admin_url().'admin-post.php?action=popup_clone&id='.$id.'" data-sg-popup-id="'.$id.'" class="sg-js-popup-clone">Clone</a>';
|
|
|
42 |
}
|
43 |
|
44 |
public function customizeQuery(&$query)
|
17 |
));
|
18 |
$this->setDisplayColumns(array(
|
19 |
'id' => 'ID',
|
20 |
+
'onOff' => 'Enabled (show popup)',
|
21 |
'title' => 'Title',
|
22 |
'type' => 'Type',
|
23 |
'shortcode' => 'Auto shortcode',
|
35 |
public function customizeRow(&$row)
|
36 |
{
|
37 |
$id = $row[0];
|
38 |
+
$isActivePopup = SgPopupGetData::isActivePopup($id);
|
39 |
+
$switchButton = '<label class="sg-switch">
|
40 |
+
<input class="sg-switch-checkbox" data-switch-id="'.$id.'" type="checkbox" '.$isActivePopup.'>
|
41 |
+
<div class="sg-slider sg-round"></div>
|
42 |
+
</label>';
|
43 |
$type = $row[2];
|
44 |
$editUrl = admin_url()."admin.php?page=edit-popup&id=".$id."&type=".$type."";
|
45 |
$row[3] = "<input type='text' onfocus='this.select();' readonly value='[sg_popup id=".$id."]' class='large-text code'>";
|
46 |
$row[4] = '<a href="'.@$editUrl.'">'.__('Edit', 'sgpt').'</a> <a href="#" data-sg-popup-id="'.$id.'" class="sg-js-delete-link">'.__('Delete', 'sgpt').'</a>
|
47 |
<a href="'.admin_url().'admin-post.php?action=popup_clone&id='.$id.'" data-sg-popup-id="'.$id.'" class="sg-js-popup-clone">Clone</a>';
|
48 |
+
array_splice( $row, 1, 0, $switchButton);
|
49 |
}
|
50 |
|
51 |
public function customizeQuery(&$query)
|
classes/sgDataTable/Table.php
CHANGED
@@ -129,7 +129,7 @@ class SGPB_Table extends SGPB_ListTable
|
|
129 |
{
|
130 |
//get the records registered in the prepare_items method
|
131 |
$records = $this->items;
|
132 |
-
|
133 |
//get the columns registered in the get_columns and get_sortable_columns methods
|
134 |
list($columns, $hidden) = $this->get_column_info();
|
135 |
|
129 |
{
|
130 |
//get the records registered in the prepare_items method
|
131 |
$records = $this->items;
|
132 |
+
|
133 |
//get the columns registered in the get_columns and get_sortable_columns methods
|
134 |
list($columns, $hidden) = $this->get_column_info();
|
135 |
|
config.php
CHANGED
@@ -9,7 +9,7 @@ define('SG_APP_POPUP_CLASSES', SG_APP_POPUP_PATH . '/classes');
|
|
9 |
define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
|
10 |
define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
|
11 |
define('SG_APP_POPUP_TABLE_LIMIT', 15);
|
12 |
-
define('SG_POPUP_VERSION', 2.
|
13 |
define('SG_POPUP_PRO_URL', 'http://popup-builder.com/');
|
14 |
define('SG_POPUP_EXTENTIONS_URL', 'http://popup-builder.com/extensions');
|
15 |
define('SG_MAILCHIMP_EXTENTION_URL', 'http://popup-builder.com/mailchimp/');
|
@@ -18,6 +18,8 @@ define('SG_IP_TO_COUNTRY_SERVICE_URL', 'http://sygnoos.in/ip2data/?ip=');
|
|
18 |
define('SG_IP_TO_COUNTRY_SERVICE_TOKEN', 'd=b32e509a0c6da4147e7903f4bc0b60aa');
|
19 |
define("SG_SHOW_POPUP_REVIEW", get_option("SG_COLOSE_REVIEW_BLOCK"));
|
20 |
define("SG_POSTS_PER_PAGE", 1000);
|
|
|
|
|
21 |
define("SG_POST_TYPE_PAGE", "allPages");
|
22 |
define("SG_POST_TYPE_POST", "allPosts");
|
23 |
|
9 |
define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
|
10 |
define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
|
11 |
define('SG_APP_POPUP_TABLE_LIMIT', 15);
|
12 |
+
define('SG_POPUP_VERSION', 2.391);
|
13 |
define('SG_POPUP_PRO_URL', 'http://popup-builder.com/');
|
14 |
define('SG_POPUP_EXTENTIONS_URL', 'http://popup-builder.com/extensions');
|
15 |
define('SG_MAILCHIMP_EXTENTION_URL', 'http://popup-builder.com/mailchimp/');
|
18 |
define('SG_IP_TO_COUNTRY_SERVICE_TOKEN', 'd=b32e509a0c6da4147e7903f4bc0b60aa');
|
19 |
define("SG_SHOW_POPUP_REVIEW", get_option("SG_COLOSE_REVIEW_BLOCK"));
|
20 |
define("SG_POSTS_PER_PAGE", 1000);
|
21 |
+
/*Example 1 minute*/
|
22 |
+
define("SG_FILTER_REPEAT_INTERVAL", 1);
|
23 |
define("SG_POST_TYPE_PAGE", "allPages");
|
24 |
define("SG_POST_TYPE_POST", "allPosts");
|
25 |
|
files/sg_admin_post.php
CHANGED
@@ -31,20 +31,6 @@ function sgGetCsvFile() {
|
|
31 |
|
32 |
add_action('admin_post_csv_file', 'sgGetCsvFile');
|
33 |
|
34 |
-
function sgDeleteSubscribe() {
|
35 |
-
global $wpdb;
|
36 |
-
$id = $_GET['id'];
|
37 |
-
$wpdb->query(
|
38 |
-
$wpdb->prepare(
|
39 |
-
"DELETE FROM ". $wpdb->prefix ."sg_subscribers WHERE id = %d"
|
40 |
-
,$id
|
41 |
-
)
|
42 |
-
);
|
43 |
-
wp_redirect(SG_APP_POPUP_ADMIN_URL."admin.php?page=subscribers");
|
44 |
-
}
|
45 |
-
|
46 |
-
add_action('admin_post_subscribe_delete', 'sgDeleteSubscribe');
|
47 |
-
|
48 |
function sgPopupClone() {
|
49 |
$id = $_GET['id'];
|
50 |
$obj = SGPopup::findById($id);
|
@@ -62,7 +48,7 @@ function sgPopupClone() {
|
|
62 |
if($options['allPagesStatus']) {
|
63 |
if(!empty($options['showAllPages']) && $options['showAllPages'] != 'all') {
|
64 |
update_option("SG_ALL_PAGES", false);
|
65 |
-
SGPopup::addPopupForAllPages($cloneId, $options['allSelectedPages']);
|
66 |
}
|
67 |
else {
|
68 |
update_option("SG_ALL_PAGES", $cloneId);
|
@@ -71,7 +57,7 @@ function sgPopupClone() {
|
|
71 |
if($options['allPostsStatus']) {
|
72 |
if(!empty($options['showAllPosts']) && $options['showAllPosts'] != "all") {
|
73 |
update_option("SG_ALL_POSTS", false);
|
74 |
-
SGPopup::addPopupForAllPages($cloneId, $options['allSelectedPosts']);
|
75 |
}
|
76 |
else {
|
77 |
update_option("SG_ALL_POSTS", $cloneId);
|
@@ -210,3 +196,35 @@ function sgPopupSaveSettings() {
|
|
210 |
|
211 |
add_action('admin_post_save_settings', 'sgPopupSaveSettings');
|
212 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
add_action('admin_post_csv_file', 'sgGetCsvFile');
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
function sgPopupClone() {
|
35 |
$id = $_GET['id'];
|
36 |
$obj = SGPopup::findById($id);
|
48 |
if($options['allPagesStatus']) {
|
49 |
if(!empty($options['showAllPages']) && $options['showAllPages'] != 'all') {
|
50 |
update_option("SG_ALL_PAGES", false);
|
51 |
+
SGPopup::addPopupForAllPages($cloneId, $options['allSelectedPages'], 'page');
|
52 |
}
|
53 |
else {
|
54 |
update_option("SG_ALL_PAGES", $cloneId);
|
57 |
if($options['allPostsStatus']) {
|
58 |
if(!empty($options['showAllPosts']) && $options['showAllPosts'] != "all") {
|
59 |
update_option("SG_ALL_POSTS", false);
|
60 |
+
SGPopup::addPopupForAllPages($cloneId, $options['allSelectedPosts'], 'page');
|
61 |
}
|
62 |
else {
|
63 |
update_option("SG_ALL_POSTS", $cloneId);
|
196 |
|
197 |
add_action('admin_post_save_settings', 'sgPopupSaveSettings');
|
198 |
|
199 |
+
function sgSubsErrorList() {
|
200 |
+
global $wpdb;
|
201 |
+
$content = '';
|
202 |
+
$sql = "SHOW COLUMNS FROM ". $wpdb->prefix ."sg_subscription_error_log";
|
203 |
+
$rows = $wpdb->get_results($sql, ARRAY_A);
|
204 |
+
foreach ($rows as $value) {
|
205 |
+
$content .= $value['Field'].",";
|
206 |
+
}
|
207 |
+
$content .= "\n";
|
208 |
+
|
209 |
+
$sql = "Select * from ". $wpdb->prefix ."sg_subscription_error_log";
|
210 |
+
$subscribers = $wpdb->get_results($sql, ARRAY_A);
|
211 |
+
|
212 |
+
foreach($subscribers as $values) {
|
213 |
+
foreach ($values as $value) {
|
214 |
+
$content .= $value.',';
|
215 |
+
}
|
216 |
+
$content .= "\n";
|
217 |
+
}
|
218 |
+
|
219 |
+
header("Pragma: public");
|
220 |
+
header("Expires: 0");
|
221 |
+
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
222 |
+
header("Cache-Control: private", false);
|
223 |
+
header("Content-Type: application/octet-stream");
|
224 |
+
header("Content-Disposition: attachment; filename=\"MailErrorLog.csv\";" );
|
225 |
+
header("Content-Transfer-Encoding: binary");
|
226 |
+
echo $content;
|
227 |
+
}
|
228 |
+
|
229 |
+
add_action('admin_post_subs_error_csv', 'sgSubsErrorList');
|
230 |
+
|
files/sg_functions.php
CHANGED
@@ -11,6 +11,19 @@ class SGFunctions
|
|
11 |
echo $sgInfo;
|
12 |
}
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
public static function popupTablesDeleteSatus() {
|
15 |
|
16 |
global $wpdb;
|
11 |
echo $sgInfo;
|
12 |
}
|
13 |
|
14 |
+
public static function sgPopupDataSanitize($sgPopupData)
|
15 |
+
{
|
16 |
+
|
17 |
+
$allowedHtmltags = wp_kses_allowed_html('post');
|
18 |
+
$allowedHtmltags['input'] = array('name'=>true, 'class'=>true, 'id'=>true, 'placeholder'=>true, 'title'=>true, 'value'=>true, 'type'=>true, 'src'=>true);
|
19 |
+
$allowedHtmltags['select'] = array('name'=>true, 'class'=>true, 'id'=>true, 'placeholder'=>true, 'title'=>true, 'size'=>true, 'multiple'=>true, 'disabled'=>true,'autofocus'=>true);
|
20 |
+
$allowedHtmltags['option'] = array('value'=>true, 'class'=>true, 'id'=>true, 'placeholder'=>true, 'selected'=>true, 'label'=>true, 'disabled'=>true);
|
21 |
+
$allowedHtmltags['link'] = array('href'=>true, 'charset'=>true, 'hreflang'=>true, 'media'=>true, 'rel'=>true, 'rev'=>true, 'sizes'=>true,'type'=>true);
|
22 |
+
$allowedHtmltags['script'] = array('src'=>true, 'type'=>true, 'async'=>true, 'charset'=>true);
|
23 |
+
$allowedHtmltags['style'] = array('type'=>true, 'media'=>true, 'scoped'=>true);
|
24 |
+
return wp_kses($sgPopupData, $allowedHtmltags);
|
25 |
+
}
|
26 |
+
|
27 |
public static function popupTablesDeleteSatus() {
|
28 |
|
29 |
global $wpdb;
|
files/sg_popup_actions.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function sgPopupPluginLoaded() {
|
3 |
+
|
4 |
+
$versionPopup = get_option('SG_POPUP_VERSION');
|
5 |
+
if (!$versionPopup || $versionPopup < SG_POPUP_VERSION ) {
|
6 |
+
update_option('SG_POPUP_VERSION', SG_POPUP_VERSION);
|
7 |
+
PopupInstaller::install();
|
8 |
+
}
|
9 |
+
}
|
10 |
+
|
11 |
+
add_action('plugins_loaded', 'sgPopupPluginLoaded');
|
12 |
+
|
13 |
+
function sgnewslatter_repeat_function($args) {
|
14 |
+
|
15 |
+
global $wpdb;
|
16 |
+
/*Args is json from newsletter form parameters*/
|
17 |
+
$params= json_decode($args, true);
|
18 |
+
|
19 |
+
$subscriptionType = $params['subsFormType'];
|
20 |
+
$sendingLimit = $params['emailsOneTime'];
|
21 |
+
$emailMessage = $params['messageBody'];
|
22 |
+
$mailSubject = $params['newsletterSubject'];
|
23 |
+
$successMails = 0;
|
24 |
+
$allData = array();
|
25 |
+
$adminEmail = get_option('admin_email');
|
26 |
+
|
27 |
+
$sql = $wpdb->prepare("select id from ".$wpdb->prefix."sg_subscribers where status=0 and subscriptionType = %s limit 1",$subscriptionType);
|
28 |
+
$result = $wpdb->get_row($sql, ARRAY_A);
|
29 |
+
$id = (int)$result['id'];
|
30 |
+
$getTotalSql = $wpdb->prepare("select count(*) from ".$wpdb->prefix."sg_subscribers where subscriptionType = %s ", $subscriptionType);
|
31 |
+
$totalSubscribers = $wpdb->get_var($getTotalSql);
|
32 |
+
|
33 |
+
/*Id = 0 when all emails status = 1*/
|
34 |
+
if($id == 0) {
|
35 |
+
/*Clear schedule hook*/
|
36 |
+
$headers = 'MIME-Version: 1.0'."\r\n";
|
37 |
+
$headers .= 'From: '.$adminEmail.''."\r\n";
|
38 |
+
$headers .= 'Content-type: text/html; charset=UTF-8'."\r\n";
|
39 |
+
$successTotal = get_option("SG_NEWSLETTER_".$subscriptionType);
|
40 |
+
$faildTotal = $totalSubscribers - $successTotal;
|
41 |
+
|
42 |
+
$emailMessageCustom = 'Your mail list '.$subscriptionType.' delivered successfully!
|
43 |
+
'.$successTotal.' of the '.$totalSubscribers.' emails succeeded, '.$faildTotal.' failed
|
44 |
+
For more details, please download log files inside the plugin.
|
45 |
+
|
46 |
+
This email was generated via Popup Builder plugin.';
|
47 |
+
|
48 |
+
$mailStatus = wp_mail($adminEmail, $subscriptionType.' list has been successfully delivered!', $emailMessageCustom, $headers);
|
49 |
+
delete_option("SG_NEWSLETTER_".$subscriptionType);
|
50 |
+
wp_clear_scheduled_hook("sgnewsletter_send_messages", array(json_encode($params)));
|
51 |
+
return;
|
52 |
+
}
|
53 |
+
else {
|
54 |
+
$getAllDataSql = $wpdb->prepare("select firstName,lastName,email from ".$wpdb->prefix."sg_subscribers where id>=$id and subscriptionType = %s limit $sendingLimit",$subscriptionType);
|
55 |
+
$allData = $wpdb->get_results($getAllDataSql, ARRAY_A);
|
56 |
+
}
|
57 |
+
|
58 |
+
foreach ($allData as $data) {
|
59 |
+
|
60 |
+
$patternFirstName = '/\[First name]/';
|
61 |
+
$patternLastName = '/\[Last name]/';
|
62 |
+
$patternBlogName = '/\[Blog name]/';
|
63 |
+
$patternUserName = '/\[User name]/';
|
64 |
+
$replacementFirstName = $data['firstName'];
|
65 |
+
$replacementLastName = $data['lastName'];
|
66 |
+
$replacementBlogName = get_bloginfo("name");
|
67 |
+
$replacementUserName = wp_get_current_user()->user_login;
|
68 |
+
/*Replace First name and Last name form email message*/
|
69 |
+
$emailMessageCustom = preg_replace($patternFirstName, $replacementFirstName, $emailMessage);
|
70 |
+
$emailMessageCustom = preg_replace($patternLastName, $replacementLastName, $emailMessageCustom);
|
71 |
+
$emailMessageCustom = preg_replace($patternBlogName, $replacementBlogName, $emailMessageCustom);
|
72 |
+
$emailMessageCustom = preg_replace($patternUserName, $replacementUserName, $emailMessageCustom);
|
73 |
+
|
74 |
+
/*Mail Headers*/
|
75 |
+
$headers = 'MIME-Version: 1.0'."\r\n";
|
76 |
+
$headers .= 'From: '.$adminEmail.''."\r\n";
|
77 |
+
$headers .= 'Content-type: text/html; charset=UTF-8'."\r\n";
|
78 |
+
|
79 |
+
$mailStatus = wp_mail($data['email'], $mailSubject, $emailMessageCustom, $headers);
|
80 |
+
if(!$mailStatus) {
|
81 |
+
$errorLogSql = $wpdb->prepare("INSERT INTO ". $wpdb->prefix ."sg_subscription_error_log(popupType,email,date) VALUES (%s,%s,%s)",$subscriptionType,$data['email'],Date('Y-m-d H:i'));
|
82 |
+
$wpdb->query($errorLogSql);
|
83 |
+
}
|
84 |
+
/*Sending status*/
|
85 |
+
$successCount = get_option("SG_NEWSLETTER_".$subscriptionType);
|
86 |
+
if(!$successCount) {
|
87 |
+
update_option("SG_NEWSLETTER_".$subscriptionType, 1);
|
88 |
+
}
|
89 |
+
else {
|
90 |
+
update_option("SG_NEWSLETTER_".$subscriptionType, ++$successCount);
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
94 |
+
/*Update all mails status which has been sent*/
|
95 |
+
$updateStatusQuery = $wpdb->prepare("UPDATE ". $wpdb->prefix ."sg_subscribers SET status=1 where id>=$id and subscriptionType = %s limit $sendingLimit",$subscriptionType);
|
96 |
+
$wpdb->query($updateStatusQuery);
|
97 |
+
}
|
98 |
+
add_action ('sgnewsletter_send_messages', 'sgnewslatter_repeat_function', 10, 1);
|
files/sg_popup_ajax.php
CHANGED
@@ -25,7 +25,7 @@ function sgFrontend()
|
|
25 |
$query = $wpdb->prepare("SELECT id FROM ". $wpdb->prefix ."sg_subscribers WHERE email = %s AND subscriptionType = %s", $email, $title);
|
26 |
$list = $wpdb->get_row($query, ARRAY_A);
|
27 |
if(!isset($list['id'])) {
|
28 |
-
$sql = $wpdb->prepare("INSERT INTO ".$wpdb->prefix."sg_subscribers (firstName, lastName, email, subscriptionType) VALUES (%s, %s, %s, %s)", $firstName, $lastName, $email, $title);
|
29 |
$res = $wpdb->query($sql);
|
30 |
}
|
31 |
die();
|
@@ -208,3 +208,76 @@ function sgLazyLoading() {
|
|
208 |
die();
|
209 |
}
|
210 |
add_action('wp_ajax_lazy_loading', 'sgLazyLoading');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$query = $wpdb->prepare("SELECT id FROM ". $wpdb->prefix ."sg_subscribers WHERE email = %s AND subscriptionType = %s", $email, $title);
|
26 |
$list = $wpdb->get_row($query, ARRAY_A);
|
27 |
if(!isset($list['id'])) {
|
28 |
+
$sql = $wpdb->prepare("INSERT INTO ".$wpdb->prefix."sg_subscribers (firstName, lastName, email, subscriptionType, status) VALUES (%s, %s, %s, %s,%d)", $firstName, $lastName, $email, $title, 0);
|
29 |
$res = $wpdb->query($sql);
|
30 |
}
|
31 |
die();
|
208 |
die();
|
209 |
}
|
210 |
add_action('wp_ajax_lazy_loading', 'sgLazyLoading');
|
211 |
+
|
212 |
+
function addToSubscribers() {
|
213 |
+
|
214 |
+
global $wpdb;
|
215 |
+
$firstName = $_POST['firstName'];
|
216 |
+
$lastName = $_POST['lastName'];
|
217 |
+
$email = $_POST['email'];
|
218 |
+
$subsType = $_POST['subsType'];
|
219 |
+
|
220 |
+
foreach ($subsType as $subType) {
|
221 |
+
$sql = $wpdb->prepare("INSERT INTO ".$wpdb->prefix."sg_subscribers (firstName, lastName, email, subscriptionType) VALUES (%s, %s, %s, %s)", $firstName, $lastName, $email, $subType);
|
222 |
+
$res = $wpdb->query($sql);
|
223 |
+
}
|
224 |
+
|
225 |
+
die();
|
226 |
+
}
|
227 |
+
add_action('wp_ajax_add_to_subsribers', 'addToSubscribers');
|
228 |
+
|
229 |
+
function sgDeleteSubscribers() {
|
230 |
+
|
231 |
+
global $wpdb;
|
232 |
+
|
233 |
+
$subsribersId = $_POST['subsribersId'];
|
234 |
+
foreach ($subsribersId as $subsriberId) {
|
235 |
+
$prepareSql = $wpdb->prepare("DELETE FROM ". $wpdb->prefix ."sg_subscribers WHERE id = %d",$subsriberId);
|
236 |
+
$wpdb->query($prepareSql);
|
237 |
+
}
|
238 |
+
die();
|
239 |
+
}
|
240 |
+
|
241 |
+
add_action('wp_ajax_subsribers_delete', 'sgDeleteSubscribers');
|
242 |
+
|
243 |
+
function sgSendNewsletter() {
|
244 |
+
|
245 |
+
global $wpdb;
|
246 |
+
$newslatterData = $_POST['NewsLatterData'];
|
247 |
+
|
248 |
+
/*Change to default status*/
|
249 |
+
$updateStatusQuery = $wpdb->prepare("UPDATE ". $wpdb->prefix ."sg_subscribers SET status=0 where subscriptionType = %s",$newslatterData['subsFormType']);
|
250 |
+
$wpdb->query($updateStatusQuery);
|
251 |
+
$deleteFromErrorLog = $wpdb->prepare("DELETE FROM ". $wpdb->prefix ."sg_subscription_error_log WHERE popupType=%s",$newslatterData['subsFormType']);
|
252 |
+
$wpdb->query($deleteFromErrorLog);
|
253 |
+
|
254 |
+
wp_schedule_event( time(), 'newsLetterSendEveryMinute', 'sgnewsletter_send_messages', array(json_encode($newslatterData)));
|
255 |
+
|
256 |
+
die();
|
257 |
+
}
|
258 |
+
add_action('wp_ajax_send_newsletter', 'sgSendNewsletter');
|
259 |
+
|
260 |
+
function sgIsHaveErrorLog() {
|
261 |
+
|
262 |
+
global $wpdb;
|
263 |
+
$countRows = '';
|
264 |
+
$popupType = $_POST['subsType'];
|
265 |
+
|
266 |
+
$getErrorCounteSql = $wpdb->prepare("SELECT count(*) FROM ". $wpdb->prefix ."sg_subscription_error_log WHERE popupType=%s",$popupType);
|
267 |
+
$countRows = $wpdb->get_var($getErrorCounteSql);
|
268 |
+
echo $countRows;
|
269 |
+
die();
|
270 |
+
}
|
271 |
+
|
272 |
+
add_action('wp_ajax_subs_error_log_count', 'sgIsHaveErrorLog');
|
273 |
+
|
274 |
+
function sgChangePopupStatus() {
|
275 |
+
$popupId = (int)$_POST['popupId'];
|
276 |
+
$obj = SGPopup::findById($popupId);
|
277 |
+
$options = json_decode($obj->getOptions(), true);
|
278 |
+
$options['isActiveStatus'] = $_POST['popupStatus'];
|
279 |
+
$obj->setOptions(json_encode($options));
|
280 |
+
$obj->save();
|
281 |
+
}
|
282 |
+
add_action('wp_ajax_change_popup_status', 'sgChangePopupStatus');
|
283 |
+
|
files/sg_popup_create.php
CHANGED
@@ -5,6 +5,7 @@ if(!SG_SHOW_POPUP_REVIEW) {
|
|
5 |
|
6 |
$externalPlugins = IntegrateExternalSettings::getAllExternalPlugins();
|
7 |
$mailchimpExist = IntegrateExternalSettings::isExtensionExists('mailchimp');
|
|
|
8 |
?>
|
9 |
<h2>Add New Popup</h2>
|
10 |
<div class="popups-wrapper">
|
@@ -103,12 +104,21 @@ $mailchimpExist = IntegrateExternalSettings::isExtensionExists('mailchimp');
|
|
103 |
<div class="popups-div contact-pro">
|
104 |
</div>
|
105 |
</a>
|
106 |
-
|
107 |
-
<a class="create-popup-link" href="<?php echo SG_MAILCHIMP_EXTENTION_URL;?>" target="_blank">
|
108 |
-
<div class="popups-div mailchimp-pro">
|
109 |
-
</div>
|
110 |
-
</a>
|
111 |
-
<?php endif;?>
|
112 |
<?php endif; ?>
|
113 |
|
114 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
$externalPlugins = IntegrateExternalSettings::getAllExternalPlugins();
|
7 |
$mailchimpExist = IntegrateExternalSettings::isExtensionExists('mailchimp');
|
8 |
+
$analyticsExist = IntegrateExternalSettings::isExtensionExists('analyitics');
|
9 |
?>
|
10 |
<h2>Add New Popup</h2>
|
11 |
<div class="popups-wrapper">
|
104 |
<div class="popups-div contact-pro">
|
105 |
</div>
|
106 |
</a>
|
107 |
+
|
|
|
|
|
|
|
|
|
|
|
108 |
<?php endif; ?>
|
109 |
|
110 |
</div>
|
111 |
+
|
112 |
+
<?php if (POPUP_BUILDER_PKG == POPUP_BUILDER_PKG_FREE && !$mailchimpExist): ?>
|
113 |
+
<div class="add-new-extentions-wrapper">
|
114 |
+
<span class="add-new-extentions">
|
115 |
+
Extensions
|
116 |
+
</span>
|
117 |
+
</div>
|
118 |
+
<?php if(!$mailchimpExist): ?>
|
119 |
+
<a class="create-popup-link" href="<?php echo SG_MAILCHIMP_EXTENTION_URL;?>" target="_blank">
|
120 |
+
<div class="popups-div mailchimp-pro">
|
121 |
+
</div>
|
122 |
+
</a>
|
123 |
+
<?php endif;?>
|
124 |
+
<?php endif;?>
|
files/sg_popup_create_new.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
$paths = IntegrateExternalSettings::getCurrentPopupAppPaths($popupType);
|
8 |
//Get current form action, for addons it different
|
9 |
$currentActionName = IntegrateExternalSettings::getCurrentPopupAdminPostActionName($popupType);
|
10 |
-
|
11 |
$popupAppPath = $paths['app-path'];
|
12 |
$popupFilesPath = $paths['files-path'];
|
13 |
|
@@ -123,6 +123,7 @@
|
|
123 |
$sgPostsAllCategories = @$jsonData['posts-all-categories'];
|
124 |
$sgRepeatPopup = @$jsonData['repeatPopup'];
|
125 |
$sgPopupAppearNumberLimit = @$jsonData['popup-appear-number-limit'];
|
|
|
126 |
$sgDisablePopup = @$jsonData['disablePopup'];
|
127 |
$sgDisablePopupOverlay = @$jsonData['disablePopupOverlay'];
|
128 |
$sgPopupClosingTimer = @$jsonData['popupClosingTimer'];
|
@@ -145,7 +146,6 @@
|
|
145 |
$sgPopupScheduleEndTime = @$jsonData['schedule-end-time'];
|
146 |
$sgPopupFinishTimer = @$jsonData['popup-finish-timer'];
|
147 |
$sgPopupStartTimer = @$jsonData['popup-start-timer'];
|
148 |
-
$sgTimeRangeTimezone = @$jsonData['time-range-time-zone'];
|
149 |
$sgColorboxTheme = @$jsonData['theme'];
|
150 |
$sgOverlayCustomClasss = @$jsonData['sgOverlayCustomClasss'];
|
151 |
$sgContentCustomClasss = @$jsonData['sgContentCustomClasss'];
|
@@ -210,6 +210,7 @@
|
|
210 |
$sgSuccessMessage = @$subscriptionOptions['subs-success-message'];
|
211 |
$sgSubsBtnProgressTitle = @$subscriptionOptions['subs-btn-progress-title'];
|
212 |
$sgSubsTextBorderWidth = @$subscriptionOptions['subs-text-border-width'];
|
|
|
213 |
$contactFormOptions = json_decode(@$params, true);
|
214 |
$sgContactNameLabel = @$contactFormOptions['contact-name'];
|
215 |
$sgContactNameStatus = @$contactFormOptions['contact-name-status'];
|
@@ -303,6 +304,7 @@
|
|
303 |
'allPostsStatus' => false,
|
304 |
'onceExpiresTime' => 7,
|
305 |
'popup-appear-number-limit' => 1,
|
|
|
306 |
'overlay-custom-classs' => 'sg-popup-overlay',
|
307 |
'content-custom-classs' => 'sg-popup-content',
|
308 |
'countryStatus' => false,
|
@@ -317,7 +319,6 @@
|
|
317 |
'countdown-position' => true,
|
318 |
'countdown-autoclose' => true,
|
319 |
'time-zone' => 'Etc/GMT',
|
320 |
-
'time-range-time-zone' => 'Etc/GMT',
|
321 |
'due-date' => date('M d y H:i', strtotime(' +1 day')),
|
322 |
'popup-start-timer' => date('M d y H:i'),
|
323 |
'schedule-start-time' => date("H:i"),
|
@@ -339,6 +340,7 @@
|
|
339 |
'subs-btn-height' => '30px',
|
340 |
'subs-text-width' => '200px',
|
341 |
'subs-btn-width' => '200px',
|
|
|
342 |
'subs-text-border-width' => '2px',
|
343 |
'subs-success-message' =>'You have successfully subscribed to the newsletter',
|
344 |
'subs-validation-message' => 'This field is required.',
|
@@ -400,6 +402,7 @@
|
|
400 |
$contactNameRequired = sgBoolToChecked($popupProDefaultValues['contact-name-required']);
|
401 |
$contactSubjectStatus = sgBoolToChecked($popupProDefaultValues['contact-subject-status']);
|
402 |
$contactSubjectRequired = sgBoolToChecked($popupProDefaultValues['contact-subject-required']);
|
|
|
403 |
$onceExpiresTime = $popupProDefaultValues['onceExpiresTime'];
|
404 |
$popupAppearNumberLimit = $popupProDefaultValues['popup-appear-number-limit'];
|
405 |
$countryStatus = sgBoolToChecked($popupProDefaultValues['countryStatus']);
|
@@ -410,7 +413,6 @@
|
|
410 |
$countdownLang = $popupProDefaultValues['countDownLang'];
|
411 |
$countdownPosition = $popupProDefaultValues['countdown-position'];
|
412 |
$timeZone = $popupProDefaultValues['time-zone'];
|
413 |
-
$timeRangeTimeZone = $popupProDefaultValues['time-range-time-zone'];
|
414 |
$dueDate = $popupProDefaultValues['due-date'];
|
415 |
$popupStartTimer = $popupProDefaultValues['popup-start-timer'];
|
416 |
$scheduleStartTime = $popupProDefaultValues['schedule-start-time'];
|
@@ -433,6 +435,7 @@
|
|
433 |
$subsValidationMessage = $popupProDefaultValues['subs-validation-message'];
|
434 |
$subsTextWidth = $popupProDefaultValues['subs-text-width'];
|
435 |
$subsBtnWidth = $popupProDefaultValues['subs-btn-width'];
|
|
|
436 |
$subsBtnProgressTitle = $popupProDefaultValues['subs-btn-progress-title'];
|
437 |
$subsTextBorderWidth = $popupProDefaultValues['subs-text-border-width'];
|
438 |
$subsTextBordercolor = $popupProDefaultValues['subs-text-bordercolor'];
|
@@ -490,6 +493,7 @@
|
|
490 |
$sgInActivityStatus = @sgSetChecked($sgInActivityStatus, $inActivityStatus);
|
491 |
$sgForMobile = @sgSetChecked($sgForMobile, $forMobile);
|
492 |
$sgOpenOnMobile = @sgSetChecked($sgOpenOnMobile, $openMobile);
|
|
|
493 |
$sgUserSeperate = @sgSetChecked($sgUserSeperate, $userSeperate);
|
494 |
$sgPopupTimerStatus = @sgSetChecked($sgPopupTimerStatus, $popupTimerStatus);
|
495 |
$sgPopupScheduleStatus = @sgSetChecked($sgPopupScheduleStatus, $popupScheduleStatus);
|
@@ -507,13 +511,14 @@
|
|
507 |
$sgSocialLabel = @sgSetChecked($sgSocialLabel, $socialLabel);
|
508 |
$sgPopupFixed = @sgSetChecked($sgPopupFixed, $deafultFixed);
|
509 |
$sgPushToBottom = @sgSetChecked($sgPushToBottom, $pushToBottom);
|
510 |
-
|
511 |
$sgAllPagesStatus = @sgSetChecked($sgAllPagesStatus, $allPagesStatus);
|
512 |
$sgAllPostsStatus = @sgSetChecked($sgAllPostsStatus, $allPostsStatus);
|
513 |
$sgCountdownPosition = @sgSetChecked($sgCountdownPosition, $countdownPosition);
|
514 |
$sgVideoAutoplay = @sgSetChecked($sgVideoAutoplay, $videoAutoplay);
|
515 |
$sgSubsLastNameStatus = @sgSetChecked($sgSubsLastNameStatus, $subsLastNameStatus);
|
516 |
$sgSubsFirstNameStatus = @sgSetChecked($sgSubsFirstNameStatus, $subsFirstNameStatus);
|
|
|
517 |
$sgCountryStatus = @sgSetChecked($sgCountryStatus, $countryStatus);
|
518 |
/* Contact popup otions */
|
519 |
$sgContactNameStatus = @sgSetChecked($sgContactNameStatus, $contactNameStatus);
|
@@ -566,7 +571,6 @@
|
|
566 |
$sgCountdownNumbersBgColor = @sgGetValue($sgCountdownNumbersBgColor, $countdownNumbersBgColor);
|
567 |
$sgCountdownLang = @sgGetValue($sgCountdownLang, $countdownLang);
|
568 |
$sgSelectedTimeZone = @sgGetValue($sgSelectedTimeZone, $timeZone);
|
569 |
-
$sgTimeRangeTimezone = @sgGetValue($sgTimeRangeTimezone, $timeRangeTimeZone);
|
570 |
$sgDueDate = @sgGetValue($sgDueDate, $dueDate);
|
571 |
$sgExitIntentTpype = @sgGetValue($sgExitIntentTpype, $exitIntentType);
|
572 |
$sgExitIntntExpire = @sgGetValue($sgExitIntntExpire, $exitIntentExpireTime);
|
@@ -614,7 +618,7 @@
|
|
614 |
$sgContactFailMessage = @sgGetValue($sgContactFailMessage, $contactFailMessage);
|
615 |
$sgOverlayCustomClasss = @sgGetValue($sgOverlayCustomClasss, $overlayCustomClasss);
|
616 |
$sgContentCustomClasss = @sgGetValue($sgContentCustomClasss, $contentCustomClasss);
|
617 |
-
|
618 |
function sgGetValue($getedVal,$defValue)
|
619 |
{
|
620 |
if (!isset($getedVal)) {
|
@@ -736,7 +740,7 @@
|
|
736 |
"data-loading-number" => 0,
|
737 |
"data-selectbox-role" => "js-all-posts"
|
738 |
)
|
739 |
-
|
740 |
),
|
741 |
array(
|
742 |
"title" => "Show on selected categories",
|
@@ -789,7 +793,7 @@
|
|
789 |
function createRadiobuttons($elements, $name, $newLine, $selectedInput, $class)
|
790 |
{
|
791 |
$str = "";
|
792 |
-
|
793 |
foreach ($elements as $key => $element) {
|
794 |
$breakLine = "";
|
795 |
$infoIcon = "";
|
@@ -849,7 +853,8 @@
|
|
849 |
'colorbox2.css',
|
850 |
'colorbox3.css',
|
851 |
'colorbox4.css',
|
852 |
-
'colorbox5.css'
|
|
|
853 |
);
|
854 |
|
855 |
$sgFbLikeButtons = array(
|
@@ -1033,6 +1038,7 @@
|
|
1033 |
<div class="theme3 sg-hide"></div>
|
1034 |
<div class="theme4 sg-hide"></div>
|
1035 |
<div class="theme5 sg-hide"></div>
|
|
|
1036 |
<div class="sg-popup-theme-3 themes-suboptions sg-hide">
|
1037 |
<span class="liquid-width">Border color:</span>
|
1038 |
<div id="color-picker"><input class="sgOverlayColor" id="sgOverlayColor" type="text" name="sgTheme3BorderColor" value="<?php echo esc_attr(@$sgTheme3BorderColor); ?>" /></div>
|
@@ -1138,12 +1144,12 @@
|
|
1138 |
<div class="sg-hide sg-full-width js-content-click-wrraper">
|
1139 |
<?php echo createRadiobuttons($contentClickOptions, "content-click-behavior", true, esc_html($sgContentClickBehavior), "liquid-width"); ?>
|
1140 |
<div class="sg-hide js-readio-buttons-acordion-content sg-full-width">
|
1141 |
-
<span class="liquid-width">Url:</span><input class="input-width-static" type="text" name='click-redirect-to-url' value="<?php echo esc_attr(@$sgClickRedirectToUrl); ?>">
|
1142 |
</div>
|
1143 |
</div>
|
1144 |
|
1145 |
<span class="liquid-width">Change overlay color:</span><div id="color-picker"><input class="sgOverlayColor" id="sgOverlayColor" type="text" name="sgOverlayColor" value="<?php echo esc_attr(@$sgOverlayColor); ?>" /></div><br>
|
1146 |
-
|
1147 |
<span class="liquid-width">Change background color:</span><div id="color-picker"><input class="sgOverlayColor" id="sgOverlayColor" type="text" name="sg-content-background-color" value="<?php echo esc_attr(@$sgContentBackgroundColor); ?>" /></div><br>
|
1148 |
|
1149 |
<span class="liquid-width" id="createDescribeOpacitcy">Background overlay opacity:</span><div class="slider-wrapper">
|
@@ -1187,9 +1193,14 @@
|
|
1187 |
</div>
|
1188 |
</div>
|
1189 |
<div class="clear"></div>
|
|
|
|
|
|
|
|
|
|
|
1190 |
<input type="hidden" class="button-primary" value="<?php echo esc_attr(@$id);?>" name="hidden_popup_number" />
|
1191 |
</div>
|
1192 |
</div>
|
1193 |
</form>
|
1194 |
<?php
|
1195 |
-
SGFunctions::showInfo();
|
7 |
$paths = IntegrateExternalSettings::getCurrentPopupAppPaths($popupType);
|
8 |
//Get current form action, for addons it different
|
9 |
$currentActionName = IntegrateExternalSettings::getCurrentPopupAdminPostActionName($popupType);
|
10 |
+
|
11 |
$popupAppPath = $paths['app-path'];
|
12 |
$popupFilesPath = $paths['files-path'];
|
13 |
|
123 |
$sgPostsAllCategories = @$jsonData['posts-all-categories'];
|
124 |
$sgRepeatPopup = @$jsonData['repeatPopup'];
|
125 |
$sgPopupAppearNumberLimit = @$jsonData['popup-appear-number-limit'];
|
126 |
+
$sgPopupCookiePageLevel = @$jsonData['save-cookie-page-level'];
|
127 |
$sgDisablePopup = @$jsonData['disablePopup'];
|
128 |
$sgDisablePopupOverlay = @$jsonData['disablePopupOverlay'];
|
129 |
$sgPopupClosingTimer = @$jsonData['popupClosingTimer'];
|
146 |
$sgPopupScheduleEndTime = @$jsonData['schedule-end-time'];
|
147 |
$sgPopupFinishTimer = @$jsonData['popup-finish-timer'];
|
148 |
$sgPopupStartTimer = @$jsonData['popup-start-timer'];
|
|
|
149 |
$sgColorboxTheme = @$jsonData['theme'];
|
150 |
$sgOverlayCustomClasss = @$jsonData['sgOverlayCustomClasss'];
|
151 |
$sgContentCustomClasss = @$jsonData['sgContentCustomClasss'];
|
210 |
$sgSuccessMessage = @$subscriptionOptions['subs-success-message'];
|
211 |
$sgSubsBtnProgressTitle = @$subscriptionOptions['subs-btn-progress-title'];
|
212 |
$sgSubsTextBorderWidth = @$subscriptionOptions['subs-text-border-width'];
|
213 |
+
$sgSubsDontShowAfterSubmitting = @$subscriptionOptions['subs-dont-show-after-submitting'];
|
214 |
$contactFormOptions = json_decode(@$params, true);
|
215 |
$sgContactNameLabel = @$contactFormOptions['contact-name'];
|
216 |
$sgContactNameStatus = @$contactFormOptions['contact-name-status'];
|
304 |
'allPostsStatus' => false,
|
305 |
'onceExpiresTime' => 7,
|
306 |
'popup-appear-number-limit' => 1,
|
307 |
+
'save-cookie-page-level' => false,
|
308 |
'overlay-custom-classs' => 'sg-popup-overlay',
|
309 |
'content-custom-classs' => 'sg-popup-content',
|
310 |
'countryStatus' => false,
|
319 |
'countdown-position' => true,
|
320 |
'countdown-autoclose' => true,
|
321 |
'time-zone' => 'Etc/GMT',
|
|
|
322 |
'due-date' => date('M d y H:i', strtotime(' +1 day')),
|
323 |
'popup-start-timer' => date('M d y H:i'),
|
324 |
'schedule-start-time' => date("H:i"),
|
340 |
'subs-btn-height' => '30px',
|
341 |
'subs-text-width' => '200px',
|
342 |
'subs-btn-width' => '200px',
|
343 |
+
'subs-dont-show-after-submitting' => false,
|
344 |
'subs-text-border-width' => '2px',
|
345 |
'subs-success-message' =>'You have successfully subscribed to the newsletter',
|
346 |
'subs-validation-message' => 'This field is required.',
|
402 |
$contactNameRequired = sgBoolToChecked($popupProDefaultValues['contact-name-required']);
|
403 |
$contactSubjectStatus = sgBoolToChecked($popupProDefaultValues['contact-subject-status']);
|
404 |
$contactSubjectRequired = sgBoolToChecked($popupProDefaultValues['contact-subject-required']);
|
405 |
+
$saveCookiePageLevel = sgBoolToChecked($popupProDefaultValues['save-cookie-page-level']);
|
406 |
$onceExpiresTime = $popupProDefaultValues['onceExpiresTime'];
|
407 |
$popupAppearNumberLimit = $popupProDefaultValues['popup-appear-number-limit'];
|
408 |
$countryStatus = sgBoolToChecked($popupProDefaultValues['countryStatus']);
|
413 |
$countdownLang = $popupProDefaultValues['countDownLang'];
|
414 |
$countdownPosition = $popupProDefaultValues['countdown-position'];
|
415 |
$timeZone = $popupProDefaultValues['time-zone'];
|
|
|
416 |
$dueDate = $popupProDefaultValues['due-date'];
|
417 |
$popupStartTimer = $popupProDefaultValues['popup-start-timer'];
|
418 |
$scheduleStartTime = $popupProDefaultValues['schedule-start-time'];
|
435 |
$subsValidationMessage = $popupProDefaultValues['subs-validation-message'];
|
436 |
$subsTextWidth = $popupProDefaultValues['subs-text-width'];
|
437 |
$subsBtnWidth = $popupProDefaultValues['subs-btn-width'];
|
438 |
+
$subsDontShowAfterSubmitting = $popupProDefaultValues['subs-dont-show-after-submitting'];
|
439 |
$subsBtnProgressTitle = $popupProDefaultValues['subs-btn-progress-title'];
|
440 |
$subsTextBorderWidth = $popupProDefaultValues['subs-text-border-width'];
|
441 |
$subsTextBordercolor = $popupProDefaultValues['subs-text-bordercolor'];
|
493 |
$sgInActivityStatus = @sgSetChecked($sgInActivityStatus, $inActivityStatus);
|
494 |
$sgForMobile = @sgSetChecked($sgForMobile, $forMobile);
|
495 |
$sgOpenOnMobile = @sgSetChecked($sgOpenOnMobile, $openMobile);
|
496 |
+
$sgPopupCookiePageLevel = @sgSetChecked($sgPopupCookiePageLevel, $saveCookiePageLevel);
|
497 |
$sgUserSeperate = @sgSetChecked($sgUserSeperate, $userSeperate);
|
498 |
$sgPopupTimerStatus = @sgSetChecked($sgPopupTimerStatus, $popupTimerStatus);
|
499 |
$sgPopupScheduleStatus = @sgSetChecked($sgPopupScheduleStatus, $popupScheduleStatus);
|
511 |
$sgSocialLabel = @sgSetChecked($sgSocialLabel, $socialLabel);
|
512 |
$sgPopupFixed = @sgSetChecked($sgPopupFixed, $deafultFixed);
|
513 |
$sgPushToBottom = @sgSetChecked($sgPushToBottom, $pushToBottom);
|
514 |
+
|
515 |
$sgAllPagesStatus = @sgSetChecked($sgAllPagesStatus, $allPagesStatus);
|
516 |
$sgAllPostsStatus = @sgSetChecked($sgAllPostsStatus, $allPostsStatus);
|
517 |
$sgCountdownPosition = @sgSetChecked($sgCountdownPosition, $countdownPosition);
|
518 |
$sgVideoAutoplay = @sgSetChecked($sgVideoAutoplay, $videoAutoplay);
|
519 |
$sgSubsLastNameStatus = @sgSetChecked($sgSubsLastNameStatus, $subsLastNameStatus);
|
520 |
$sgSubsFirstNameStatus = @sgSetChecked($sgSubsFirstNameStatus, $subsFirstNameStatus);
|
521 |
+
$sgSubsDontShowAfterSubmitting = @sgSetChecked($sgSubsDontShowAfterSubmitting, $subsDontShowAfterSubmitting);
|
522 |
$sgCountryStatus = @sgSetChecked($sgCountryStatus, $countryStatus);
|
523 |
/* Contact popup otions */
|
524 |
$sgContactNameStatus = @sgSetChecked($sgContactNameStatus, $contactNameStatus);
|
571 |
$sgCountdownNumbersBgColor = @sgGetValue($sgCountdownNumbersBgColor, $countdownNumbersBgColor);
|
572 |
$sgCountdownLang = @sgGetValue($sgCountdownLang, $countdownLang);
|
573 |
$sgSelectedTimeZone = @sgGetValue($sgSelectedTimeZone, $timeZone);
|
|
|
574 |
$sgDueDate = @sgGetValue($sgDueDate, $dueDate);
|
575 |
$sgExitIntentTpype = @sgGetValue($sgExitIntentTpype, $exitIntentType);
|
576 |
$sgExitIntntExpire = @sgGetValue($sgExitIntntExpire, $exitIntentExpireTime);
|
618 |
$sgContactFailMessage = @sgGetValue($sgContactFailMessage, $contactFailMessage);
|
619 |
$sgOverlayCustomClasss = @sgGetValue($sgOverlayCustomClasss, $overlayCustomClasss);
|
620 |
$sgContentCustomClasss = @sgGetValue($sgContentCustomClasss, $contentCustomClasss);
|
621 |
+
|
622 |
function sgGetValue($getedVal,$defValue)
|
623 |
{
|
624 |
if (!isset($getedVal)) {
|
740 |
"data-loading-number" => 0,
|
741 |
"data-selectbox-role" => "js-all-posts"
|
742 |
)
|
743 |
+
|
744 |
),
|
745 |
array(
|
746 |
"title" => "Show on selected categories",
|
793 |
function createRadiobuttons($elements, $name, $newLine, $selectedInput, $class)
|
794 |
{
|
795 |
$str = "";
|
796 |
+
|
797 |
foreach ($elements as $key => $element) {
|
798 |
$breakLine = "";
|
799 |
$infoIcon = "";
|
853 |
'colorbox2.css',
|
854 |
'colorbox3.css',
|
855 |
'colorbox4.css',
|
856 |
+
'colorbox5.css',
|
857 |
+
'colorbox6.css'
|
858 |
);
|
859 |
|
860 |
$sgFbLikeButtons = array(
|
1038 |
<div class="theme3 sg-hide"></div>
|
1039 |
<div class="theme4 sg-hide"></div>
|
1040 |
<div class="theme5 sg-hide"></div>
|
1041 |
+
<div class="theme6 sg-hide"></div>
|
1042 |
<div class="sg-popup-theme-3 themes-suboptions sg-hide">
|
1043 |
<span class="liquid-width">Border color:</span>
|
1044 |
<div id="color-picker"><input class="sgOverlayColor" id="sgOverlayColor" type="text" name="sgTheme3BorderColor" value="<?php echo esc_attr(@$sgTheme3BorderColor); ?>" /></div>
|
1144 |
<div class="sg-hide sg-full-width js-content-click-wrraper">
|
1145 |
<?php echo createRadiobuttons($contentClickOptions, "content-click-behavior", true, esc_html($sgContentClickBehavior), "liquid-width"); ?>
|
1146 |
<div class="sg-hide js-readio-buttons-acordion-content sg-full-width">
|
1147 |
+
<span class="liquid-width">Url:</span><input class="input-width-static" type="text" name='click-redirect-to-url' value="<?php echo esc_attr(@$sgClickRedirectToUrl); ?>">
|
1148 |
</div>
|
1149 |
</div>
|
1150 |
|
1151 |
<span class="liquid-width">Change overlay color:</span><div id="color-picker"><input class="sgOverlayColor" id="sgOverlayColor" type="text" name="sgOverlayColor" value="<?php echo esc_attr(@$sgOverlayColor); ?>" /></div><br>
|
1152 |
+
|
1153 |
<span class="liquid-width">Change background color:</span><div id="color-picker"><input class="sgOverlayColor" id="sgOverlayColor" type="text" name="sg-content-background-color" value="<?php echo esc_attr(@$sgContentBackgroundColor); ?>" /></div><br>
|
1154 |
|
1155 |
<span class="liquid-width" id="createDescribeOpacitcy">Background overlay opacity:</span><div class="slider-wrapper">
|
1193 |
</div>
|
1194 |
</div>
|
1195 |
<div class="clear"></div>
|
1196 |
+
<?php
|
1197 |
+
$isActivePopup = SgPopupGetData::isActivePopup(@$id);
|
1198 |
+
if(!@$id) $isActivePopup = 'checked';
|
1199 |
+
?>
|
1200 |
+
<input class="sg-hide-element" name="isActiveStatus" data-switch-id="'.$id.'" type="checkbox" <?php echo $isActivePopup; ?> >
|
1201 |
<input type="hidden" class="button-primary" value="<?php echo esc_attr(@$id);?>" name="hidden_popup_number" />
|
1202 |
</div>
|
1203 |
</div>
|
1204 |
</form>
|
1205 |
<?php
|
1206 |
+
SGFunctions::showInfo();
|
files/sg_popup_filetrs.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function cron_add_minute( $schedules ) {
|
3 |
+
// Adds once every minute to the existing schedules.
|
4 |
+
$schedules['newsLetterSendEveryMinute'] = array(
|
5 |
+
'interval' => SG_FILTER_REPEAT_INTERVAL*60,
|
6 |
+
'display' => __('Once Every Minute')
|
7 |
+
);
|
8 |
+
return $schedules;
|
9 |
+
}
|
10 |
+
add_filter('cron_schedules', 'cron_add_minute');
|
files/sg_popup_main.php
CHANGED
@@ -28,4 +28,4 @@ if(!SG_SHOW_POPUP_REVIEW) {
|
|
28 |
echo $table;
|
29 |
SGFunctions::showInfo();
|
30 |
?>
|
31 |
-
</div>
|
28 |
echo $table;
|
29 |
SGFunctions::showInfo();
|
30 |
?>
|
31 |
+
</div>
|
files/sg_popup_media_button.php
CHANGED
@@ -2,7 +2,9 @@
|
|
2 |
function sgPopupMediaButton()
|
3 |
{
|
4 |
global $pagenow, $typenow;
|
5 |
-
|
|
|
|
|
6 |
$buttonTitle = 'Insert popup';
|
7 |
$output = '';
|
8 |
|
@@ -43,6 +45,9 @@ function sgPopupMediaButtonThickboxs()
|
|
43 |
global $pagenow, $typenow;
|
44 |
$currentPageParams = get_object_vars(get_current_screen());
|
45 |
|
|
|
|
|
|
|
46 |
$pages = array(
|
47 |
'post.php',
|
48 |
'page.php',
|
2 |
function sgPopupMediaButton()
|
3 |
{
|
4 |
global $pagenow, $typenow;
|
5 |
+
|
6 |
+
$showCurrentUser = SGFunctions::isShowMenuForCurrentUser();
|
7 |
+
if(!$showCurrentUser) {return;}
|
8 |
$buttonTitle = 'Insert popup';
|
9 |
$output = '';
|
10 |
|
45 |
global $pagenow, $typenow;
|
46 |
$currentPageParams = get_object_vars(get_current_screen());
|
47 |
|
48 |
+
$showCurrentUser = SGFunctions::isShowMenuForCurrentUser();
|
49 |
+
if(!$showCurrentUser) {return;}
|
50 |
+
|
51 |
$pages = array(
|
52 |
'post.php',
|
53 |
'page.php',
|
files/sg_popup_page_selection.php
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
<?php
|
2 |
function sgPopupMeta()
|
3 |
{
|
|
|
|
|
|
|
4 |
$screens = array('post', 'page');
|
5 |
foreach ( $screens as $screen ) {
|
6 |
add_meta_box( 'prfx_meta', __('Select popup on page load', 'prfx-textdomain'), 'sgPopupCallback', $screen, 'normal');
|
1 |
<?php
|
2 |
function sgPopupMeta()
|
3 |
{
|
4 |
+
$showCurrentUser = SGFunctions::isShowMenuForCurrentUser();
|
5 |
+
if(!$showCurrentUser) {return;}
|
6 |
+
|
7 |
$screens = array('post', 'page');
|
8 |
foreach ( $screens as $screen ) {
|
9 |
add_meta_box( 'prfx_meta', __('Select popup on page load', 'prfx-textdomain'), 'sgPopupCallback', $screen, 'normal');
|
files/sg_popup_save.php
CHANGED
@@ -22,7 +22,7 @@ function sgSanitize($optionsKey, $isTextField = false)
|
|
22 |
/*require_once(SG_APP_POPUP_FILES ."/sg_popup_pro.php");
|
23 |
return SgPopupPro::sgPopupDataSanitize($sgPopupData);*/
|
24 |
}
|
25 |
-
return
|
26 |
}
|
27 |
return sanitize_text_field($_POST[$optionsKey]);
|
28 |
}
|
@@ -127,6 +127,7 @@ function sgPopupSave()
|
|
127 |
'subs-success-message' => sgSanitize('subs-success-message'),
|
128 |
'subs-btn-progress-title' => sgSanitize('subs-btn-progress-title'),
|
129 |
'subs-text-border-width' => sgSanitize('subs-text-border-width'),
|
|
|
130 |
);
|
131 |
|
132 |
$contactFormOptions = array(
|
@@ -167,88 +168,22 @@ function sgPopupSave()
|
|
167 |
'fblike-layout' => sgSanitize('fblike-layout')
|
168 |
);
|
169 |
|
170 |
-
$
|
171 |
-
'width' => sgSanitize('width'),
|
172 |
-
'height' => sgSanitize('height'),
|
173 |
-
'delay' => (int)sgSanitize('delay'),
|
174 |
-
'duration' => (int)sgSanitize('duration'),
|
175 |
-
'effect' => sgSanitize('effect'),
|
176 |
-
'escKey' => sgSanitize('escKey'),
|
177 |
-
'scrolling' => sgSanitize('scrolling'),
|
178 |
-
'scaling' => sgSanitize('scaling'),
|
179 |
-
'reposition' => sgSanitize('reposition'),
|
180 |
-
'overlayClose' => sgSanitize('overlayClose'),
|
181 |
-
'contentClick' => sgSanitize('contentClick'),
|
182 |
-
'content-click-behavior' => sgSanitize('content-click-behavior'),
|
183 |
-
'click-redirect-to-url' => sgSanitize('click-redirect-to-url'),
|
184 |
-
'opacity' => sgSanitize('opacity'),
|
185 |
-
'sgOverlayColor' => sgSanitize('sgOverlayColor'),
|
186 |
-
'sg-content-background-color' => sgSanitize('sg-content-background-color'),
|
187 |
-
'popupFixed' => sgSanitize('popupFixed'),
|
188 |
-
'fixedPostion' => sgSanitize('fixedPostion'),
|
189 |
-
'maxWidth' => sgSanitize('maxWidth'),
|
190 |
-
'maxHeight' => sgSanitize('maxHeight'),
|
191 |
-
'initialWidth' => sgSanitize('initialWidth'),
|
192 |
-
'initialHeight' => sgSanitize('initialHeight'),
|
193 |
-
'closeButton' => sgSanitize('closeButton'),
|
194 |
-
'theme' => sgSanitize('theme'),
|
195 |
-
'sgTheme3BorderColor'=> sgSanitize("sgTheme3BorderColor"),
|
196 |
-
'sgTheme3BorderRadius'=> sgSanitize("sgTheme3BorderRadius"),
|
197 |
-
'onScrolling' => sgSanitize('onScrolling'),
|
198 |
-
'inActivityStatus' => sgSanitize('inActivityStatus'),
|
199 |
-
'inactivity-timout' => sgSanitize('inactivity-timout'),
|
200 |
-
'beforeScrolingPrsent' => (int)sgSanitize('beforeScrolingPrsent'),
|
201 |
-
'forMobile' => sgSanitize('forMobile'),
|
202 |
-
'openMobile' => sgSanitize('openMobile'), // open only for mobile
|
203 |
-
'repeatPopup' => sgSanitize('repeatPopup'),
|
204 |
-
'popup-appear-number-limit' => sgSanitize('popup-appear-number-limit'),
|
205 |
-
'autoClosePopup' => sgSanitize('autoClosePopup'),
|
206 |
-
'countryStatus' => sgSanitize('countryStatus'),
|
207 |
'showAllPages' => $showAllPages,
|
208 |
-
"allPagesStatus" => sgSanitize("allPagesStatus"),
|
209 |
-
"allPostsStatus" => sgSanitize("allPostsStatus"),
|
210 |
-
'allSelectedPages' => $allSelectedPages,
|
211 |
'showAllPosts' => $showAllPosts,
|
|
|
212 |
'allSelectedPosts' => $allSelectedPosts,
|
213 |
-
'
|
214 |
-
'
|
215 |
-
'
|
216 |
-
'
|
217 |
-
'
|
218 |
-
'
|
219 |
-
'
|
220 |
-
'time-range-time-zone' => sgSanitize('time-range-time-zone'),
|
221 |
-
'schedule-start-weeks' => sgSanitize('schedule-start-weeks', true),
|
222 |
-
'schedule-start-time' => sgSanitize('schedule-start-time'),
|
223 |
-
'schedule-end-time' => sgSanitize('schedule-end-time'),
|
224 |
-
'allowCountries' => sgSanitize('allowCountries'),
|
225 |
-
'countryName' => sgSanitize('countryName'),
|
226 |
-
'countryIso' => sgSanitize('countryIso'),
|
227 |
-
'disablePopup' => sgSanitize('disablePopup'),
|
228 |
-
'disablePopupOverlay' => sgSanitize('disablePopupOverlay'),
|
229 |
-
'popupClosingTimer' => sgSanitize('popupClosingTimer'),
|
230 |
-
'yesButtonLabel' => sgSanitize('yesButtonLabel'),
|
231 |
-
'noButtonLabel' => sgSanitize('noButtonLabel'),
|
232 |
-
'restrictionUrl' => sgSanitize('restrictionUrl'),
|
233 |
-
'yesButtonBackgroundColor' => sgSanitize('yesButtonBackgroundColor'),
|
234 |
-
'noButtonBackgroundColor' => sgSanitize('noButtonBackgroundColor'),
|
235 |
-
'yesButtonTextColor' => sgSanitize('yesButtonTextColor'),
|
236 |
-
'noButtonTextColor' => sgSanitize('noButtonTextColor'),
|
237 |
-
'yesButtonRadius' => (int)sgSanitize('yesButtonRadius'),
|
238 |
-
'noButtonRadius' => (int)sgSanitize('noButtonRadius'),
|
239 |
-
'pushToBottom' => sgSanitize('pushToBottom'),
|
240 |
-
'onceExpiresTime' => sgSanitize('onceExpiresTime'),
|
241 |
-
'sgOverlayCustomClasss' => sgSanitize('sgOverlayCustomClasss'),
|
242 |
-
'sgContentCustomClasss' => sgSanitize('sgContentCustomClasss'),
|
243 |
-
'theme-close-text' => sgSanitize('theme-close-text'),
|
244 |
-
'socialButtons' => json_encode($socialButtons),
|
245 |
-
'socialOptions' => json_encode($socialOptions),
|
246 |
-
'countdownOptions' => json_encode($countdownOptions),
|
247 |
-
'exitIntentOptions' => json_encode($exitIntentOptions),
|
248 |
-
'videoOptions' => json_encode($videoOptions),
|
249 |
-
'fblikeOptions' => json_encode($fblikeOptions)
|
250 |
);
|
251 |
|
|
|
|
|
252 |
$html = stripslashes(sgSanitize("sg_popup_html"));
|
253 |
$fblike = stripslashes(sgSanitize("sg_popup_fblike"));
|
254 |
$ageRestriction = stripslashes(sgSanitize('sg_ageRestriction'));
|
22 |
/*require_once(SG_APP_POPUP_FILES ."/sg_popup_pro.php");
|
23 |
return SgPopupPro::sgPopupDataSanitize($sgPopupData);*/
|
24 |
}
|
25 |
+
return SGFunctions::sgPopupDataSanitize($_POST[$optionsKey]);
|
26 |
}
|
27 |
return sanitize_text_field($_POST[$optionsKey]);
|
28 |
}
|
127 |
'subs-success-message' => sgSanitize('subs-success-message'),
|
128 |
'subs-btn-progress-title' => sgSanitize('subs-btn-progress-title'),
|
129 |
'subs-text-border-width' => sgSanitize('subs-text-border-width'),
|
130 |
+
'subs-dont-show-after-submitting' => sgSanitize('subs-dont-show-after-submitting')
|
131 |
);
|
132 |
|
133 |
$contactFormOptions = array(
|
168 |
'fblike-layout' => sgSanitize('fblike-layout')
|
169 |
);
|
170 |
|
171 |
+
$addToGeneralOptions = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
'showAllPages' => $showAllPages,
|
|
|
|
|
|
|
173 |
'showAllPosts' => $showAllPosts,
|
174 |
+
'allSelectedPages' => $allSelectedPages,
|
175 |
'allSelectedPosts' => $allSelectedPosts,
|
176 |
+
'allSelectedCategories'=>$allSelectedCategories,
|
177 |
+
'fblikeOptions'=>$fblikeOptions,
|
178 |
+
'videoOptions'=>$videoOptions,
|
179 |
+
'exitIntentOptions'=>$exitIntentOptions,
|
180 |
+
'countdownOptions'=>$countdownOptions,
|
181 |
+
'socialOptions'=>$socialOptions,
|
182 |
+
'socialButtons'=>$socialButtons
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
);
|
184 |
|
185 |
+
$options = IntegrateExternalSettings::getPopupGeneralOptions($addToGeneralOptions);
|
186 |
+
|
187 |
$html = stripslashes(sgSanitize("sg_popup_html"));
|
188 |
$fblike = stripslashes(sgSanitize("sg_popup_fblike"));
|
189 |
$ageRestriction = stripslashes(sgSanitize('sg_ageRestriction'));
|
helpers/Integrate_external_settings.php
CHANGED
@@ -15,10 +15,10 @@ Class IntegrateExternalSettings {
|
|
15 |
return $addons;
|
16 |
}
|
17 |
|
18 |
-
public static function isExtensionExists($
|
19 |
|
20 |
global $wpdb;
|
21 |
-
$sql = $wpdb->prepare("SELECT * FROM ". $wpdb->prefix ."sg_popup_addons WHERE
|
22 |
$ressults = $wpdb->get_results($sql, ARRAY_A);
|
23 |
|
24 |
if(empty($ressults)) {
|
@@ -68,7 +68,9 @@ Class IntegrateExternalSettings {
|
|
68 |
'duration' => (int)sgSanitize('duration'),
|
69 |
'effect' => sgSanitize('effect'),
|
70 |
'escKey' => sgSanitize('escKey'),
|
|
|
71 |
'scrolling' => sgSanitize('scrolling'),
|
|
|
72 |
'reposition' => sgSanitize('reposition'),
|
73 |
'overlayClose' => sgSanitize('overlayClose'),
|
74 |
'contentClick' => sgSanitize('contentClick'),
|
@@ -85,12 +87,17 @@ Class IntegrateExternalSettings {
|
|
85 |
'initialHeight' => sgSanitize('initialHeight'),
|
86 |
'closeButton' => sgSanitize('closeButton'),
|
87 |
'theme' => sgSanitize('theme'),
|
|
|
|
|
88 |
'onScrolling' => sgSanitize('onScrolling'),
|
|
|
|
|
89 |
'beforeScrolingPrsent' => (int)sgSanitize('beforeScrolingPrsent'),
|
90 |
'forMobile' => sgSanitize('forMobile'),
|
91 |
'openMobile' => sgSanitize('openMobile'), // open only for mobile
|
92 |
'repeatPopup' => sgSanitize('repeatPopup'),
|
93 |
'popup-appear-number-limit' => sgSanitize('popup-appear-number-limit'),
|
|
|
94 |
'autoClosePopup' => sgSanitize('autoClosePopup'),
|
95 |
'countryStatus' => sgSanitize('countryStatus'),
|
96 |
'showAllPages' => $params['showAllPages'],
|
@@ -99,11 +106,16 @@ Class IntegrateExternalSettings {
|
|
99 |
'allSelectedPages' => $params['allSelectedPages'],
|
100 |
'showAllPosts' => $params['showAllPosts'],
|
101 |
'allSelectedPosts' => $params['allSelectedPosts'],
|
|
|
102 |
'sg-user-status' => sgSanitize('sg-user-status'),
|
103 |
'loggedin-user' => sgSanitize('loggedin-user'),
|
104 |
'popup-timer-status' => sgSanitize('popup-timer-status'),
|
|
|
105 |
'popup-start-timer' => sgSanitize('popup-start-timer'),
|
106 |
'popup-finish-timer' => sgSanitize('popup-finish-timer'),
|
|
|
|
|
|
|
107 |
'allowCountries' => sgSanitize('allowCountries'),
|
108 |
'countryName' => sgSanitize('countryName'),
|
109 |
'countryIso' => sgSanitize('countryIso'),
|
@@ -124,12 +136,12 @@ Class IntegrateExternalSettings {
|
|
124 |
'sgOverlayCustomClasss' => sgSanitize('sgOverlayCustomClasss'),
|
125 |
'sgContentCustomClasss' => sgSanitize('sgContentCustomClasss'),
|
126 |
'theme-close-text' => sgSanitize('theme-close-text'),
|
127 |
-
'socialButtons' => json_encode($socialButtons),
|
128 |
-
'socialOptions' => json_encode($socialOptions),
|
129 |
-
'countdownOptions' => json_encode($countdownOptions),
|
130 |
-
'exitIntentOptions' => json_encode($exitIntentOptions),
|
131 |
-
'videoOptions' => json_encode($videoOptions),
|
132 |
-
'fblikeOptions' => json_encode($fblikeOptions)
|
133 |
);
|
134 |
|
135 |
return $options;
|
15 |
return $addons;
|
16 |
}
|
17 |
|
18 |
+
public static function isExtensionExists($extensionName) {
|
19 |
|
20 |
global $wpdb;
|
21 |
+
$sql = $wpdb->prepare("SELECT * FROM ". $wpdb->prefix ."sg_popup_addons WHERE name=%s", $extensionName);
|
22 |
$ressults = $wpdb->get_results($sql, ARRAY_A);
|
23 |
|
24 |
if(empty($ressults)) {
|
68 |
'duration' => (int)sgSanitize('duration'),
|
69 |
'effect' => sgSanitize('effect'),
|
70 |
'escKey' => sgSanitize('escKey'),
|
71 |
+
'isActiveStatus' => sgSanitize('isActiveStatus'),
|
72 |
'scrolling' => sgSanitize('scrolling'),
|
73 |
+
'scaling' => sgSanitize('scaling'),
|
74 |
'reposition' => sgSanitize('reposition'),
|
75 |
'overlayClose' => sgSanitize('overlayClose'),
|
76 |
'contentClick' => sgSanitize('contentClick'),
|
87 |
'initialHeight' => sgSanitize('initialHeight'),
|
88 |
'closeButton' => sgSanitize('closeButton'),
|
89 |
'theme' => sgSanitize('theme'),
|
90 |
+
'sgTheme3BorderColor'=> sgSanitize("sgTheme3BorderColor"),
|
91 |
+
'sgTheme3BorderRadius'=> sgSanitize("sgTheme3BorderRadius"),
|
92 |
'onScrolling' => sgSanitize('onScrolling'),
|
93 |
+
'inActivityStatus' => sgSanitize('inActivityStatus'),
|
94 |
+
'inactivity-timout' => sgSanitize('inactivity-timout'),
|
95 |
'beforeScrolingPrsent' => (int)sgSanitize('beforeScrolingPrsent'),
|
96 |
'forMobile' => sgSanitize('forMobile'),
|
97 |
'openMobile' => sgSanitize('openMobile'), // open only for mobile
|
98 |
'repeatPopup' => sgSanitize('repeatPopup'),
|
99 |
'popup-appear-number-limit' => sgSanitize('popup-appear-number-limit'),
|
100 |
+
'save-cookie-page-level' => sgSanitize('save-cookie-page-level'),
|
101 |
'autoClosePopup' => sgSanitize('autoClosePopup'),
|
102 |
'countryStatus' => sgSanitize('countryStatus'),
|
103 |
'showAllPages' => $params['showAllPages'],
|
106 |
'allSelectedPages' => $params['allSelectedPages'],
|
107 |
'showAllPosts' => $params['showAllPosts'],
|
108 |
'allSelectedPosts' => $params['allSelectedPosts'],
|
109 |
+
'posts-all-categories'=> $params['allSelectedCategories'],
|
110 |
'sg-user-status' => sgSanitize('sg-user-status'),
|
111 |
'loggedin-user' => sgSanitize('loggedin-user'),
|
112 |
'popup-timer-status' => sgSanitize('popup-timer-status'),
|
113 |
+
'popup-schedule-status' => sgSanitize('popup-schedule-status'),
|
114 |
'popup-start-timer' => sgSanitize('popup-start-timer'),
|
115 |
'popup-finish-timer' => sgSanitize('popup-finish-timer'),
|
116 |
+
'schedule-start-weeks' => sgSanitize('schedule-start-weeks', true),
|
117 |
+
'schedule-start-time' => sgSanitize('schedule-start-time'),
|
118 |
+
'schedule-end-time' => sgSanitize('schedule-end-time'),
|
119 |
'allowCountries' => sgSanitize('allowCountries'),
|
120 |
'countryName' => sgSanitize('countryName'),
|
121 |
'countryIso' => sgSanitize('countryIso'),
|
136 |
'sgOverlayCustomClasss' => sgSanitize('sgOverlayCustomClasss'),
|
137 |
'sgContentCustomClasss' => sgSanitize('sgContentCustomClasss'),
|
138 |
'theme-close-text' => sgSanitize('theme-close-text'),
|
139 |
+
'socialButtons' => json_encode($params['socialButtons']),
|
140 |
+
'socialOptions' => json_encode($params['socialOptions']),
|
141 |
+
'countdownOptions' => json_encode($params['countdownOptions']),
|
142 |
+
'exitIntentOptions' => json_encode($params['exitIntentOptions']),
|
143 |
+
'videoOptions' => json_encode($params['videoOptions']),
|
144 |
+
'fblikeOptions' => json_encode($params['fblikeOptions'])
|
145 |
);
|
146 |
|
147 |
return $options;
|
helpers/SgPopupGetData.php
CHANGED
@@ -115,4 +115,32 @@ class SgPopupGetData {
|
|
115 |
$role = $current_user->role[0];
|
116 |
return "sgpb_".$role;
|
117 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
115 |
$role = $current_user->role[0];
|
116 |
return "sgpb_".$role;
|
117 |
}
|
118 |
+
|
119 |
+
public static function getAllSubscriptionForms() {
|
120 |
+
global $wpdb;
|
121 |
+
$st = "SELECT title FROM ". $wpdb->prefix ."sg_popup WHERE type='subscription'";
|
122 |
+
$subsriptionForms = $wpdb->get_results($st, ARRAY_A);
|
123 |
+
$subsFormList = array();
|
124 |
+
|
125 |
+
foreach ($subsriptionForms as $subsriptionForm) {
|
126 |
+
$value = $subsriptionForm['title'];
|
127 |
+
$subsFormList[$value] = $value;
|
128 |
+
}
|
129 |
+
return $subsFormList;
|
130 |
+
}
|
131 |
+
|
132 |
+
public static function isActivePopup($id) {
|
133 |
+
|
134 |
+
$obj = SGPopup::findById($id);
|
135 |
+
if(empty($obj)) {
|
136 |
+
return '';
|
137 |
+
}
|
138 |
+
$options = $obj->getOptions();
|
139 |
+
$options = json_decode($options, true);
|
140 |
+
|
141 |
+
if(!isset($options['isActiveStatus']) || $options['isActiveStatus'] == 'on') {
|
142 |
+
return "checked";
|
143 |
+
}
|
144 |
+
return "";
|
145 |
+
}
|
146 |
}
|
img/colorbox6/border1.png
ADDED
Binary file
|
img/colorbox6/border2.png
ADDED
Binary file
|
img/colorbox6/colorbox_overlay.png
ADDED
Binary file
|
img/colorbox6/colorbox_sprite.png
ADDED
Binary file
|
img/colorbox6/loading.gif
ADDED
Binary file
|
img/theme6.jpg
ADDED
Binary file
|
javascript/sg_popup_backend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function($){
|
2 |
this.titleNotEmpty(); /* Check title is Empty */
|
3 |
this.showThemePicture(); /* Show themes pictures */
|
4 |
this.showEffects(); /* Show effect type */
|
5 |
this.pageAcordion(); /* For page acordion divs */
|
6 |
this.fixedPostionSelection(); /* Fuctionality for selected postion */
|
7 |
this.showInfo(); /* Show description options */
|
8 |
this.opasictyRange(); /* Opcity range */
|
9 |
this.subOptionContents();
|
10 |
this.addCountries();
|
11 |
this.showCloseTextFieldForTheme();
|
12 |
this.popupReview();
|
13 |
this.popupTimer();
|
14 |
this.colorPicekr(); /* Color picker */
|
15 |
});
|
|
|
16 |
this.titleNotEmpty(); /* Check title is Empty */
|
17 |
this.showThemePicture(); /* Show themes pictures */
|
18 |
this.showEffects(); /* Show effect type */
|
19 |
this.pageAcordion(); /* For page acordion divs */
|
20 |
this.fixedPostionSelection(); /* Fuctionality for selected postion */
|
21 |
this.showInfo(); /* Show description options */
|
22 |
this.opasictyRange(); /* Opcity range */
|
23 |
this.subOptionContents();
|
24 |
this.addCountries();
|
25 |
this.showCloseTextFieldForTheme();
|
26 |
this.popupReview();
|
27 |
this.popupTimer();
|
28 |
this.colorPicekr(); /* Color picker */
|
29 |
this.switchPopupActive();
|
30 |
});
|
|
|
1 |
this.titleNotEmpty(); /* Check title is Empty */
|
2 |
this.showThemePicture(); /* Show themes pictures */
|
3 |
this.showEffects(); /* Show effect type */
|
4 |
this.pageAcordion(); /* For page acordion divs */
|
5 |
this.fixedPostionSelection(); /* Fuctionality for selected postion */
|
6 |
this.showInfo(); /* Show description options */
|
7 |
this.opasictyRange(); /* Opcity range */
|
8 |
this.subOptionContents();
|
9 |
this.addCountries();
|
10 |
this.showCloseTextFieldForTheme();
|
11 |
this.popupReview();
|
12 |
this.popupTimer();
|
13 |
this.colorPicekr(); /* Color picker */
|
14 |
});
|
15 |
+
jQuery(document).ready(function($){
|
16 |
this.titleNotEmpty(); /* Check title is Empty */
|
17 |
this.showThemePicture(); /* Show themes pictures */
|
18 |
this.showEffects(); /* Show effect type */
|
19 |
this.pageAcordion(); /* For page acordion divs */
|
20 |
this.fixedPostionSelection(); /* Fuctionality for selected postion */
|
21 |
this.showInfo(); /* Show description options */
|
22 |
this.opasictyRange(); /* Opcity range */
|
23 |
this.subOptionContents();
|
24 |
this.addCountries();
|
25 |
this.showCloseTextFieldForTheme();
|
26 |
this.popupReview();
|
27 |
this.popupTimer();
|
28 |
this.colorPicekr(); /* Color picker */
|
29 |
this.switchPopupActive();
|
30 |
});
|
javascript/sg_popup_frontend.js
CHANGED
@@ -23,7 +23,7 @@ SGPopup.prototype.popupOpenById = function(popupId) {
|
|
23 |
autoClosePopup = (SG_POPUP_DATA [popupId]['autoClosePopup']) ? SG_POPUP_DATA [popupId]['autoClosePopup']: '';
|
24 |
popupClosingTimer = (SG_POPUP_DATA [popupId]['popupClosingTimer']) ? SG_POPUP_DATA [popupId]['popupClosingTimer']: '';
|
25 |
sgPoupFrontendObj = new SGPopup();
|
26 |
-
|
27 |
if(sgOnScrolling) {
|
28 |
sgPoupFrontendObj.onScrolling(popupId);
|
29 |
}
|
@@ -50,7 +50,7 @@ SGPopup.prototype.init = function() {
|
|
50 |
++sgEventExecuteCount;
|
51 |
if(sgEventExecuteCount > 1) {
|
52 |
return;
|
53 |
-
}
|
54 |
var sgPopupID = jQuery(this).attr("data-sgpopupid");
|
55 |
that.showPopup(sgPopupID,false);
|
56 |
});
|
@@ -83,7 +83,7 @@ SGPopup.prototype.sgCustomizeThemes = function(popupId) {
|
|
83 |
SGPopup.prototype.onCompleate = function() {
|
84 |
|
85 |
jQuery("#sgcolorbox").bind("sgColorboxOnCompleate", function() {
|
86 |
-
|
87 |
/* Scroll only inside popup */
|
88 |
jQuery('#sgcboxLoadedContent').isolatedScroll();
|
89 |
});
|
@@ -145,6 +145,10 @@ SGPopup.prototype.canOpenPopup = function(id, openOnce, isOnLoad) {
|
|
145 |
if (!isOnLoad) {
|
146 |
return true;
|
147 |
}
|
|
|
|
|
|
|
|
|
148 |
if(openOnce && typeof jQuery.cookie('sgPopupDetails'+id) != 'undefined') {
|
149 |
return this.canOpenOnce(id);
|
150 |
}
|
@@ -171,6 +175,21 @@ SGPopup.prototype.getPositionPercent = function(needPercent, screenDimension, di
|
|
171 |
return sgPosition;
|
172 |
}
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
SGPopup.prototype.showPopup = function(id, isOnLoad) {
|
175 |
var that = this;
|
176 |
|
@@ -224,8 +243,9 @@ SGPopup.prototype.sgShowColorboxWithOptions = function() {
|
|
224 |
var popupCantClose = that.varToBool(that.popupData['disablePopup']);
|
225 |
var disablePopupOverlay = that.varToBool(that.popupData['disablePopupOverlay']);
|
226 |
var popupAutoClosePopup = that.varToBool(that.popupData['autoClosePopup']);
|
|
|
227 |
popupClosingTimer = that.popupData['popupClosingTimer'];
|
228 |
-
|
229 |
if(popupScaling) {
|
230 |
that.sgPopupScaling();
|
231 |
}
|
@@ -270,9 +290,13 @@ SGPopup.prototype.sgShowColorboxWithOptions = function() {
|
|
270 |
if (popupShortCode && popupHtml == false) {
|
271 |
popupHtml = popupShortCode;
|
272 |
}
|
273 |
-
|
|
|
|
|
|
|
|
|
274 |
if(popupHtml && popupWidth == '' && popupHeight == '' && popupMaxWidth =='' && popupMaxHeight == '') {
|
275 |
-
|
276 |
jQuery(popupHtml).find('img:first').attr('onload', 'jQuery.sgcolorbox.resize();');
|
277 |
}
|
278 |
if (popupIframeUrl) {
|
@@ -390,7 +414,7 @@ SGPopup.prototype.sgShowColorboxWithOptions = function() {
|
|
390 |
|
391 |
jQuery('#sgcolorbox').trigger("sgColorboxOnOpen", []);
|
392 |
that.sgCustomizeThemes(that.popupData['id']);
|
393 |
-
|
394 |
},
|
395 |
onLoad: function(){
|
396 |
},
|
@@ -403,13 +427,13 @@ SGPopup.prototype.sgShowColorboxWithOptions = function() {
|
|
403 |
if(popupWidth == '' && popupHeight == '') {
|
404 |
jQuery.sgcolorbox.resize();
|
405 |
}
|
406 |
-
|
407 |
var sgpopupInit = new SgPopupInit(that.popupData);
|
408 |
sgpopupInit.overallInit();
|
409 |
/* For specific popup Like Countdown AgeRestcion popups */
|
410 |
sgpopupInit.initByPopupType();
|
411 |
that.sgCustomizeThemes(that.popupData['id']);
|
412 |
-
|
413 |
},
|
414 |
onCleanup: function() {
|
415 |
jQuery('#sgcolorbox').trigger("sgPopupCleanup", []);
|
@@ -442,16 +466,19 @@ SGPopup.prototype.sgShowColorboxWithOptions = function() {
|
|
442 |
|
443 |
jQuery.sgcolorbox(SG_POPUP_SETTINGS);
|
444 |
|
445 |
-
|
446 |
if(countryStatus == true && typeof SgUserData != "undefined") {
|
447 |
jQuery.cookie("SG_POPUP_USER_COUNTRY_NAME", SgUserData.countryIsoName, { expires: 365});
|
448 |
}
|
449 |
/* Cookie can't be set here as it's set in Age Restriction popup when the user clicks "yes" */
|
450 |
if (that.popupData['id'] && that.isOnLoad==true && that.openOnce != '' && that.popupData['type'] != "ageRestriction") {
|
451 |
sgCookieData = '';
|
452 |
-
|
|
|
|
|
|
|
453 |
var currentCookie = jQuery.cookie('sgPopupDetails'+that.popupData['id']);
|
454 |
-
|
455 |
if(typeof currentCookie == 'undefined') {
|
456 |
openCounter = 1;
|
457 |
}
|
@@ -483,7 +510,7 @@ SGPopup.prototype.sgShowColorboxWithOptions = function() {
|
|
483 |
else {
|
484 |
window.location = clickRedirectToUrl;
|
485 |
}
|
486 |
-
|
487 |
});
|
488 |
});
|
489 |
}
|
23 |
autoClosePopup = (SG_POPUP_DATA [popupId]['autoClosePopup']) ? SG_POPUP_DATA [popupId]['autoClosePopup']: '';
|
24 |
popupClosingTimer = (SG_POPUP_DATA [popupId]['popupClosingTimer']) ? SG_POPUP_DATA [popupId]['popupClosingTimer']: '';
|
25 |
sgPoupFrontendObj = new SGPopup();
|
26 |
+
|
27 |
if(sgOnScrolling) {
|
28 |
sgPoupFrontendObj.onScrolling(popupId);
|
29 |
}
|
50 |
++sgEventExecuteCount;
|
51 |
if(sgEventExecuteCount > 1) {
|
52 |
return;
|
53 |
+
}
|
54 |
var sgPopupID = jQuery(this).attr("data-sgpopupid");
|
55 |
that.showPopup(sgPopupID,false);
|
56 |
});
|
83 |
SGPopup.prototype.onCompleate = function() {
|
84 |
|
85 |
jQuery("#sgcolorbox").bind("sgColorboxOnCompleate", function() {
|
86 |
+
|
87 |
/* Scroll only inside popup */
|
88 |
jQuery('#sgcboxLoadedContent').isolatedScroll();
|
89 |
});
|
145 |
if (!isOnLoad) {
|
146 |
return true;
|
147 |
}
|
148 |
+
/*If user already subscribed don't show popup for that user*/
|
149 |
+
if(typeof jQuery.cookie != 'undefined' && typeof jQuery.cookie("subscription"+id) != "undefined") {
|
150 |
+
return false;
|
151 |
+
}
|
152 |
if(openOnce && typeof jQuery.cookie('sgPopupDetails'+id) != 'undefined') {
|
153 |
return this.canOpenOnce(id);
|
154 |
}
|
175 |
return sgPosition;
|
176 |
}
|
177 |
|
178 |
+
SGPopup.prototype.decodeBase64 = function(s) {
|
179 |
+
if(typeof window.atob == 'function') {
|
180 |
+
return decodeURIComponent(escape(window.atob(s)));
|
181 |
+
}
|
182 |
+
|
183 |
+
var e={},i,b=0,c,x,l=0,a,r='',w=String.fromCharCode,L=s.length;
|
184 |
+
var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
185 |
+
for(i=0;i<64;i++){e[A.charAt(i)]=i;}
|
186 |
+
for(x=0;x<L;x++){
|
187 |
+
c=e[s.charAt(x)];b=(b<<6)+c;l+=6;
|
188 |
+
while(l>=8){((a=(b>>>(l-=8))&0xff)||(x<(L-2)))&&(r+=w(a));}
|
189 |
+
}
|
190 |
+
return r;
|
191 |
+
}
|
192 |
+
|
193 |
SGPopup.prototype.showPopup = function(id, isOnLoad) {
|
194 |
var that = this;
|
195 |
|
243 |
var popupCantClose = that.varToBool(that.popupData['disablePopup']);
|
244 |
var disablePopupOverlay = that.varToBool(that.popupData['disablePopupOverlay']);
|
245 |
var popupAutoClosePopup = that.varToBool(that.popupData['autoClosePopup']);
|
246 |
+
var saveCookiePageLevel = that.varToBool(that.popupData['save-cookie-page-level']);
|
247 |
popupClosingTimer = that.popupData['popupClosingTimer'];
|
248 |
+
|
249 |
if(popupScaling) {
|
250 |
that.sgPopupScaling();
|
251 |
}
|
290 |
if (popupShortCode && popupHtml == false) {
|
291 |
popupHtml = popupShortCode;
|
292 |
}
|
293 |
+
|
294 |
+
if(popupHtml != ' ') {
|
295 |
+
popupHtml = that.decodeBase64(popupHtml);
|
296 |
+
}
|
297 |
+
|
298 |
if(popupHtml && popupWidth == '' && popupHeight == '' && popupMaxWidth =='' && popupMaxHeight == '') {
|
299 |
+
|
300 |
jQuery(popupHtml).find('img:first').attr('onload', 'jQuery.sgcolorbox.resize();');
|
301 |
}
|
302 |
if (popupIframeUrl) {
|
414 |
|
415 |
jQuery('#sgcolorbox').trigger("sgColorboxOnOpen", []);
|
416 |
that.sgCustomizeThemes(that.popupData['id']);
|
417 |
+
|
418 |
},
|
419 |
onLoad: function(){
|
420 |
},
|
427 |
if(popupWidth == '' && popupHeight == '') {
|
428 |
jQuery.sgcolorbox.resize();
|
429 |
}
|
430 |
+
|
431 |
var sgpopupInit = new SgPopupInit(that.popupData);
|
432 |
sgpopupInit.overallInit();
|
433 |
/* For specific popup Like Countdown AgeRestcion popups */
|
434 |
sgpopupInit.initByPopupType();
|
435 |
that.sgCustomizeThemes(that.popupData['id']);
|
436 |
+
|
437 |
},
|
438 |
onCleanup: function() {
|
439 |
jQuery('#sgcolorbox').trigger("sgPopupCleanup", []);
|
466 |
|
467 |
jQuery.sgcolorbox(SG_POPUP_SETTINGS);
|
468 |
|
469 |
+
|
470 |
if(countryStatus == true && typeof SgUserData != "undefined") {
|
471 |
jQuery.cookie("SG_POPUP_USER_COUNTRY_NAME", SgUserData.countryIsoName, { expires: 365});
|
472 |
}
|
473 |
/* Cookie can't be set here as it's set in Age Restriction popup when the user clicks "yes" */
|
474 |
if (that.popupData['id'] && that.isOnLoad==true && that.openOnce != '' && that.popupData['type'] != "ageRestriction") {
|
475 |
sgCookieData = '';
|
476 |
+
if(!saveCookiePageLevel) {
|
477 |
+
jQuery.cookie.defaults = {path:'/'};
|
478 |
+
}
|
479 |
+
|
480 |
var currentCookie = jQuery.cookie('sgPopupDetails'+that.popupData['id']);
|
481 |
+
|
482 |
if(typeof currentCookie == 'undefined') {
|
483 |
openCounter = 1;
|
484 |
}
|
510 |
else {
|
511 |
window.location = clickRedirectToUrl;
|
512 |
}
|
513 |
+
|
514 |
});
|
515 |
});
|
516 |
}
|
javascript/sg_popup_init.js
CHANGED
@@ -12,7 +12,7 @@ SgPopupInit.prototype.cloneToHtmlPopup = function() {
|
|
12 |
return;
|
13 |
}
|
14 |
|
15 |
-
jQuery(
|
16 |
|
17 |
this.popupResizing(currentPopupId);
|
18 |
jQuery('#sgcolorbox').bind('sgPopupCleanup', function() {
|
@@ -20,6 +20,21 @@ SgPopupInit.prototype.cloneToHtmlPopup = function() {
|
|
20 |
});
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
SgPopupInit.prototype.popupResizing = function(currentPopupId) {
|
24 |
|
25 |
var width = this.popupData['width'];
|
@@ -41,9 +56,9 @@ SgPopupInit.prototype.shortcodeInPopupContent = function() {
|
|
41 |
if(typeof sgInsidePopup == 'undefined' || sgInsidePopup != 'on') {
|
42 |
return false;
|
43 |
}
|
44 |
-
|
45 |
jQuery.sgcolorbox.close();
|
46 |
-
|
47 |
jQuery('#sgcolorbox').bind("sgPopupClose", function() {
|
48 |
if(sgPopupID == '') {
|
49 |
return;
|
@@ -95,4 +110,4 @@ SgPopupInit.prototype.initByPopupType = function() {
|
|
95 |
}
|
96 |
|
97 |
return popupObj;
|
98 |
-
}
|
12 |
return;
|
13 |
}
|
14 |
|
15 |
+
jQuery('.sg-current-popup-'+currentPopupId).append(this.decodeBase64(jQuery("#sgpb-all-content-"+currentPopupId).html()));
|
16 |
|
17 |
this.popupResizing(currentPopupId);
|
18 |
jQuery('#sgcolorbox').bind('sgPopupCleanup', function() {
|
20 |
});
|
21 |
}
|
22 |
|
23 |
+
SgPopupInit.prototype.decodeBase64 = function(s) {
|
24 |
+
if(typeof window.atob == 'function') {
|
25 |
+
return decodeURIComponent(escape(window.atob(s)));
|
26 |
+
}
|
27 |
+
|
28 |
+
var e={},i,b=0,c,x,l=0,a,r='',w=String.fromCharCode,L=s.length;
|
29 |
+
var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
30 |
+
for(i=0;i<64;i++){e[A.charAt(i)]=i;}
|
31 |
+
for(x=0;x<L;x++){
|
32 |
+
c=e[s.charAt(x)];b=(b<<6)+c;l+=6;
|
33 |
+
while(l>=8){((a=(b>>>(l-=8))&0xff)||(x<(L-2)))&&(r+=w(a));}
|
34 |
+
}
|
35 |
+
return r;
|
36 |
+
}
|
37 |
+
|
38 |
SgPopupInit.prototype.popupResizing = function(currentPopupId) {
|
39 |
|
40 |
var width = this.popupData['width'];
|
56 |
if(typeof sgInsidePopup == 'undefined' || sgInsidePopup != 'on') {
|
57 |
return false;
|
58 |
}
|
59 |
+
|
60 |
jQuery.sgcolorbox.close();
|
61 |
+
|
62 |
jQuery('#sgcolorbox').bind("sgPopupClose", function() {
|
63 |
if(sgPopupID == '') {
|
64 |
return;
|
110 |
}
|
111 |
|
112 |
return popupObj;
|
113 |
+
}
|
javascript/sg_popup_javascript.php
CHANGED
@@ -14,7 +14,11 @@ function sg_popup_admin_scripts($hook) {
|
|
14 |
wp_register_script('javascript', SG_APP_POPUP_URL . '/javascript/sg_popup_backend.js', array('jquery', 'wp-color-picker'));
|
15 |
wp_enqueue_script('jquery');
|
16 |
wp_enqueue_script('javascript');
|
17 |
-
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
else if('toplevel_page_PopupBuilder' == $hook || 'toplevel_page_popup-settings'){
|
20 |
wp_register_script('javascript', SG_APP_POPUP_URL . '/javascript/sg_popup_backend.js', array('jquery', 'wp-color-picker'));
|
14 |
wp_register_script('javascript', SG_APP_POPUP_URL . '/javascript/sg_popup_backend.js', array('jquery', 'wp-color-picker'));
|
15 |
wp_enqueue_script('jquery');
|
16 |
wp_enqueue_script('javascript');
|
17 |
+
|
18 |
+
if(POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
19 |
+
wp_register_script('sg_popup_pro', SG_APP_POPUP_URL . '/javascript/sg_popup_backend_pro.js');
|
20 |
+
wp_enqueue_script('sg_popup_pro');
|
21 |
+
}
|
22 |
}
|
23 |
else if('toplevel_page_PopupBuilder' == $hook || 'toplevel_page_popup-settings'){
|
24 |
wp_register_script('javascript', SG_APP_POPUP_URL . '/javascript/sg_popup_backend.js', array('jquery', 'wp-color-picker'));
|
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.3.
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: http://www.sygnoos.com
|
9 |
* License: GPLv2
|
@@ -70,23 +70,23 @@ function sgRegisterScripts()
|
|
70 |
SGPopup::$registeredScripts = true;
|
71 |
wp_register_style('sg_animate', SG_APP_POPUP_URL . '/style/animate.css');
|
72 |
wp_enqueue_style('sg_animate');
|
73 |
-
wp_register_script('sg_popup_init', SG_APP_POPUP_URL . '/javascript/sg_popup_init.js', array('jquery'));
|
74 |
wp_enqueue_script('sg_popup_init');
|
75 |
-
wp_register_script('sg_popup_frontend', SG_APP_POPUP_URL . '/javascript/sg_popup_frontend.js', array('jquery'));
|
76 |
wp_enqueue_script('sg_popup_frontend');
|
77 |
wp_enqueue_script('jquery');
|
78 |
-
wp_register_script('sg_colorbox', SG_APP_POPUP_URL . '/javascript/jquery.sgcolorbox-min.js', array('jquery'),
|
79 |
wp_enqueue_script('sg_colorbox');
|
80 |
if (POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
81 |
-
wp_register_script('sgPopupPro', SG_APP_POPUP_URL . '/javascript/sg_popup_pro.js
|
82 |
wp_enqueue_script('sgPopupPro');
|
83 |
-
wp_register_script('sg_cookie', SG_APP_POPUP_URL . '/javascript/jquery_cookie.js', array('jquery'));
|
84 |
wp_enqueue_script('sg_cookie');
|
85 |
-
wp_register_script('sg_popup_queue', SG_APP_POPUP_URL . '/javascript/sg_popup_queue.js');
|
86 |
wp_enqueue_script('sg_popup_queue');
|
87 |
}
|
88 |
/* For ajax case */
|
89 |
-
if (defined( 'DOING_AJAX' ) && DOING_AJAX) {
|
90 |
wp_print_scripts('sg_popup_frontend');
|
91 |
wp_print_scripts('sg_colorbox');
|
92 |
wp_print_scripts('sg_popup_support_plugins');
|
@@ -103,16 +103,18 @@ function sgRenderPopupScript($id)
|
|
103 |
if (SGPopup::$registeredScripts==false) {
|
104 |
sgRegisterScripts();
|
105 |
}
|
106 |
-
wp_register_style('sg_colorbox_theme', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox1.css");
|
107 |
-
wp_register_style('sg_colorbox_theme2', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox2.css");
|
108 |
-
wp_register_style('sg_colorbox_theme3', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox3.css");
|
109 |
-
wp_register_style('sg_colorbox_theme4', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox4.css");
|
110 |
-
wp_register_style('sg_colorbox_theme5', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox5.css", array(),
|
|
|
111 |
wp_enqueue_style('sg_colorbox_theme');
|
112 |
wp_enqueue_style('sg_colorbox_theme2');
|
113 |
wp_enqueue_style('sg_colorbox_theme3');
|
114 |
wp_enqueue_style('sg_colorbox_theme4');
|
115 |
wp_enqueue_style('sg_colorbox_theme5');
|
|
|
116 |
sgFindPopupData($id);
|
117 |
}
|
118 |
|
@@ -180,11 +182,11 @@ function sgShowShortCode($args, $content)
|
|
180 |
sgRenderPopupScript($args['id']);
|
181 |
}
|
182 |
else {
|
183 |
-
echo
|
184 |
}
|
185 |
}
|
186 |
else {
|
187 |
-
echo
|
188 |
}
|
189 |
|
190 |
}
|
@@ -209,12 +211,17 @@ function sgRenderPopupOpen($popupId)
|
|
209 |
|
210 |
function showPopupInPage($popupId) {
|
211 |
|
|
|
|
|
|
|
|
|
|
|
212 |
|
213 |
if(POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
214 |
|
215 |
-
$
|
216 |
|
217 |
-
if(!$
|
218 |
return false;
|
219 |
}
|
220 |
|
@@ -231,7 +238,6 @@ function showPopupInPage($popupId) {
|
|
231 |
return;
|
232 |
}
|
233 |
}
|
234 |
-
|
235 |
redenderScriptMode($popupId);
|
236 |
}
|
237 |
|
@@ -261,23 +267,28 @@ function redenderScriptMode($popupId)
|
|
261 |
sgRenderPopupOpen($popupId);
|
262 |
}
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
function getPopupIdInPageByClass($pageId) {
|
265 |
$content = get_post($pageId)->post_content;
|
266 |
-
|
267 |
-
|
268 |
-
preg_match_all("/sg-popup-id-+[0-9]+/i", $content, $matchers);
|
269 |
-
/* when popup doesn't exist */
|
270 |
-
if(empty($matchers['0'])) {
|
271 |
-
return $popupsID;
|
272 |
-
}
|
273 |
-
foreach ($matchers['0'] as $value) {
|
274 |
-
$ids = explode("sg-popup-id-", $value);
|
275 |
-
$id = @$ids[1];
|
276 |
-
if(!empty($id)) {
|
277 |
-
array_push($popupsID, $id);
|
278 |
-
}
|
279 |
-
}
|
280 |
-
return $popupsID;
|
281 |
}
|
282 |
|
283 |
function sgOnloadPopup()
|
@@ -343,19 +354,21 @@ function sgOnloadPopup()
|
|
343 |
return false;
|
344 |
}
|
345 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
add_action('wp_head','sgOnloadPopup');
|
347 |
require_once( SG_APP_POPUP_FILES . '/sg_popup_media_button.php');
|
348 |
require_once( SG_APP_POPUP_FILES . '/sg_popup_save.php'); // saving form data
|
349 |
require_once( SG_APP_POPUP_FILES . '/sg_popup_ajax.php');
|
350 |
require_once( SG_APP_POPUP_FILES . '/sg_admin_post.php');
|
351 |
-
|
352 |
-
|
353 |
-
{
|
354 |
-
$versionPopup = get_option('SG_POPUP_VERSION');
|
355 |
-
if (!$versionPopup || $versionPopup < SG_POPUP_VERSION ) {
|
356 |
-
update_option('SG_POPUP_VERSION', SG_POPUP_VERSION);
|
357 |
-
PopupInstaller::install();
|
358 |
-
}
|
359 |
-
}
|
360 |
-
|
361 |
-
add_action('plugins_loaded', 'sgPopupPluginLoaded');
|
3 |
* Plugin Name: Popup Builder
|
4 |
* Plugin URI: http://sygnoos.com
|
5 |
* Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
|
6 |
+
* Version: 2.3.9.1
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: http://www.sygnoos.com
|
9 |
* License: GPLv2
|
70 |
SGPopup::$registeredScripts = true;
|
71 |
wp_register_style('sg_animate', SG_APP_POPUP_URL . '/style/animate.css');
|
72 |
wp_enqueue_style('sg_animate');
|
73 |
+
wp_register_script('sg_popup_init', SG_APP_POPUP_URL . '/javascript/sg_popup_init.js', array('jquery'), SG_POPUP_VERSION);
|
74 |
wp_enqueue_script('sg_popup_init');
|
75 |
+
wp_register_script('sg_popup_frontend', SG_APP_POPUP_URL . '/javascript/sg_popup_frontend.js', array('jquery'), SG_POPUP_VERSION);
|
76 |
wp_enqueue_script('sg_popup_frontend');
|
77 |
wp_enqueue_script('jquery');
|
78 |
+
wp_register_script('sg_colorbox', SG_APP_POPUP_URL . '/javascript/jquery.sgcolorbox-min.js', array('jquery'), SG_POPUP_VERSION);
|
79 |
wp_enqueue_script('sg_colorbox');
|
80 |
if (POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
81 |
+
wp_register_script('sgPopupPro', SG_APP_POPUP_URL . '/javascript/sg_popup_pro.js', array(), SG_POPUP_VERSION);
|
82 |
wp_enqueue_script('sgPopupPro');
|
83 |
+
wp_register_script('sg_cookie', SG_APP_POPUP_URL . '/javascript/jquery_cookie.js', array('jquery'), SG_POPUP_VERSION);
|
84 |
wp_enqueue_script('sg_cookie');
|
85 |
+
wp_register_script('sg_popup_queue', SG_APP_POPUP_URL . '/javascript/sg_popup_queue.js', array(), SG_POPUP_VERSION);
|
86 |
wp_enqueue_script('sg_popup_queue');
|
87 |
}
|
88 |
/* For ajax case */
|
89 |
+
if (defined( 'DOING_AJAX' ) && DOING_AJAX && !is_admin()) {
|
90 |
wp_print_scripts('sg_popup_frontend');
|
91 |
wp_print_scripts('sg_colorbox');
|
92 |
wp_print_scripts('sg_popup_support_plugins');
|
103 |
if (SGPopup::$registeredScripts==false) {
|
104 |
sgRegisterScripts();
|
105 |
}
|
106 |
+
wp_register_style('sg_colorbox_theme', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox1.css", array(), SG_POPUP_VERSION);
|
107 |
+
wp_register_style('sg_colorbox_theme2', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox2.css", array(), SG_POPUP_VERSION);
|
108 |
+
wp_register_style('sg_colorbox_theme3', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox3.css", array(), SG_POPUP_VERSION);
|
109 |
+
wp_register_style('sg_colorbox_theme4', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox4.css", array(), SG_POPUP_VERSION);
|
110 |
+
wp_register_style('sg_colorbox_theme5', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox5.css", array(), SG_POPUP_VERSION);
|
111 |
+
wp_register_style('sg_colorbox_theme6', SG_APP_POPUP_URL . "/style/sgcolorbox/colorbox6.css", array(), SG_POPUP_VERSION);
|
112 |
wp_enqueue_style('sg_colorbox_theme');
|
113 |
wp_enqueue_style('sg_colorbox_theme2');
|
114 |
wp_enqueue_style('sg_colorbox_theme3');
|
115 |
wp_enqueue_style('sg_colorbox_theme4');
|
116 |
wp_enqueue_style('sg_colorbox_theme5');
|
117 |
+
wp_enqueue_style('sg_colorbox_theme6');
|
118 |
sgFindPopupData($id);
|
119 |
}
|
120 |
|
182 |
sgRenderPopupScript($args['id']);
|
183 |
}
|
184 |
else {
|
185 |
+
echo showPopupInPage($args['id']);
|
186 |
}
|
187 |
}
|
188 |
else {
|
189 |
+
echo showPopupInPage($args['id']);
|
190 |
}
|
191 |
|
192 |
}
|
211 |
|
212 |
function showPopupInPage($popupId) {
|
213 |
|
214 |
+
$isActivePopup = SgPopupGetData::isActivePopup($popupId);
|
215 |
+
|
216 |
+
if(!$isActivePopup) {
|
217 |
+
return false;
|
218 |
+
}
|
219 |
|
220 |
if(POPUP_BUILDER_PKG > POPUP_BUILDER_PKG_FREE) {
|
221 |
|
222 |
+
$popupInTimeRange = SgPopupPro::popupInTimeRange($popupId);
|
223 |
|
224 |
+
if(!$popupInTimeRange) {
|
225 |
return false;
|
226 |
}
|
227 |
|
238 |
return;
|
239 |
}
|
240 |
}
|
|
|
241 |
redenderScriptMode($popupId);
|
242 |
}
|
243 |
|
267 |
sgRenderPopupOpen($popupId);
|
268 |
}
|
269 |
|
270 |
+
function getPopupIdFromContentByClass($content) {
|
271 |
+
|
272 |
+
$popupsID = array();
|
273 |
+
|
274 |
+
preg_match_all("/sg-popup-id-+[0-9]+/i", $content, $matchers);
|
275 |
+
/* when popup doesn't exist */
|
276 |
+
if(empty($matchers['0'])) {
|
277 |
+
return $popupsID;
|
278 |
+
}
|
279 |
+
foreach ($matchers['0'] as $value) {
|
280 |
+
$ids = explode("sg-popup-id-", $value);
|
281 |
+
$id = @$ids[1];
|
282 |
+
if(!empty($id)) {
|
283 |
+
array_push($popupsID, $id);
|
284 |
+
}
|
285 |
+
}
|
286 |
+
return $popupsID;
|
287 |
+
}
|
288 |
+
|
289 |
function getPopupIdInPageByClass($pageId) {
|
290 |
$content = get_post($pageId)->post_content;
|
291 |
+
return getPopupIdFromContentByClass($content);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
}
|
293 |
|
294 |
function sgOnloadPopup()
|
354 |
return false;
|
355 |
}
|
356 |
|
357 |
+
add_filter('wp_nav_menu_items', 'getPopupIdByClassFromMenu');
|
358 |
+
function getPopupIdByClassFromMenu ($items) {
|
359 |
+
$popupsID = getPopupIdFromContentByClass($items);
|
360 |
+
if(!empty($popupsID)) {
|
361 |
+
foreach ($popupsID as $popupId) {
|
362 |
+
sgRenderPopupScript($popupId);
|
363 |
+
}
|
364 |
+
}
|
365 |
+
return $items;
|
366 |
+
}
|
367 |
+
|
368 |
add_action('wp_head','sgOnloadPopup');
|
369 |
require_once( SG_APP_POPUP_FILES . '/sg_popup_media_button.php');
|
370 |
require_once( SG_APP_POPUP_FILES . '/sg_popup_save.php'); // saving form data
|
371 |
require_once( SG_APP_POPUP_FILES . '/sg_popup_ajax.php');
|
372 |
require_once( SG_APP_POPUP_FILES . '/sg_admin_post.php');
|
373 |
+
require_once( SG_APP_POPUP_FILES . '/sg_popup_filetrs.php');
|
374 |
+
require_once( SG_APP_POPUP_FILES . '/sg_popup_actions.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Author: Sygnoos
|
|
5 |
Donate link: http://popup-builder.com
|
6 |
Tags: popup, pop up, modal popup, responsive popup, lightbox, youtube, video popup, iframe popup, vimeo, contact form, html popup, social popup, age restriction popup, countdown popup, facebook popup, subscription popup, exit intent popup
|
7 |
Requires at least: 3.8
|
8 |
-
Tested up to: 4.6
|
9 |
Stable tag: trunk
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -75,7 +75,7 @@ With popup builder plugin you can insert any type of content, right into your Po
|
|
75 |
|
76 |
* Exit Intent popup - catch your users attention when they decide 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.
|
77 |
|
78 |
-
* Subscription 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.
|
79 |
|
80 |
* Create contact form popup - contact popup will allow your clients to write you a message right from the popup.
|
81 |
|
@@ -153,6 +153,19 @@ Go to the Popup Builder settings and set your desired options.
|
|
153 |
|
154 |
== Changelog ==
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
= Version 2.3.8 =
|
157 |
* New animation effect added.
|
158 |
|
@@ -488,7 +501,7 @@ Leave us a good review :)
|
|
488 |
|
489 |
== Upgrade Notice ==
|
490 |
|
491 |
-
Current Version of Popup Builder is 2.3.
|
492 |
|
493 |
== Other Notes ==
|
494 |
|
5 |
Donate link: http://popup-builder.com
|
6 |
Tags: popup, pop up, modal popup, responsive popup, lightbox, youtube, video popup, iframe popup, vimeo, contact form, html popup, social popup, age restriction popup, countdown popup, facebook popup, subscription popup, exit intent popup
|
7 |
Requires at least: 3.8
|
8 |
+
Tested up to: 4.6.1
|
9 |
Stable tag: trunk
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
75 |
|
76 |
* Exit Intent popup - catch your users attention when they decide 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.
|
77 |
|
78 |
+
* Subscription 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. With our newsletter module you can easly send mass mailings.
|
79 |
|
80 |
* Create contact form popup - contact popup will allow your clients to write you a message right from the popup.
|
81 |
|
153 |
|
154 |
== Changelog ==
|
155 |
|
156 |
+
= Version 2.3.9.1 =
|
157 |
+
* UTF-8 issue fixed.
|
158 |
+
|
159 |
+
= Version 2.3.9 =
|
160 |
+
* New theme added (lightbox popup).
|
161 |
+
* Added new functionlity to turn on/off popup.
|
162 |
+
* Inside HTML popup now allowed to use script, styles and other HTML tags.
|
163 |
+
* Onclick popup inside menu item.
|
164 |
+
* Newsletter module added to subscription popup (PRO).
|
165 |
+
* Selective deletion inside Subscribers data table (PRO).
|
166 |
+
* Popup cookie saving per page or site (PRO).
|
167 |
+
* Bug fixed and code optimization.
|
168 |
+
|
169 |
= Version 2.3.8 =
|
170 |
* New animation effect added.
|
171 |
|
501 |
|
502 |
== Upgrade Notice ==
|
503 |
|
504 |
+
Current Version of Popup Builder is 2.3.9
|
505 |
|
506 |
== Other Notes ==
|
507 |
|
style/sg_popup_style.css
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
}
|
5 |
|
6 |
.sg-hide-element {
|
7 |
-
display: none;
|
8 |
}
|
9 |
|
10 |
.sg-margin0 {
|
@@ -30,6 +30,19 @@
|
|
30 |
float: left;
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
#sg-general .postbox-container,
|
34 |
#effect .postbox-container,
|
35 |
#dimentions .postbox-container,
|
@@ -111,6 +124,9 @@ h3.hndle .ui-sortable-handle .generalTitle {
|
|
111 |
#displayNone {
|
112 |
display: none;
|
113 |
}
|
|
|
|
|
|
|
114 |
|
115 |
div.sg-hide {
|
116 |
display: none;
|
@@ -357,6 +373,14 @@ span.phpErrorStyle {
|
|
357 |
margin: 26px 0px 0px 0px;
|
358 |
}
|
359 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
.popups-div {
|
361 |
width: 200px;
|
362 |
height: 150px;
|
@@ -374,6 +398,22 @@ span.phpErrorStyle {
|
|
374 |
transform: scale(1.05);
|
375 |
}
|
376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
.html-popup {
|
378 |
background-image: url("../img/HTML-Button.png");
|
379 |
}
|
@@ -463,13 +503,13 @@ span.phpErrorStyle {
|
|
463 |
}
|
464 |
|
465 |
.pro-options {
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
}
|
474 |
|
475 |
.generalMenu {
|
@@ -600,7 +640,8 @@ frametype h1 {
|
|
600 |
.theme2,
|
601 |
.theme3,
|
602 |
.theme4,
|
603 |
-
.theme5
|
|
|
604 |
border: 0px solid red;
|
605 |
width: 240px;
|
606 |
height: 130px;
|
@@ -638,6 +679,11 @@ input[name="theme"] {
|
|
638 |
background-size: 240px 130px;
|
639 |
}
|
640 |
|
|
|
|
|
|
|
|
|
|
|
641 |
.js-preview-effect {
|
642 |
background-image: url("../img/preview-eye.png");
|
643 |
width: 30px;
|
@@ -1082,32 +1128,32 @@ input[name="theme"] {
|
|
1082 |
|
1083 |
|
1084 |
.reviewPanelClose {
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
}
|
1094 |
|
1095 |
.reviewPanelHref {
|
1096 |
-
|
1097 |
-
|
1098 |
}
|
1099 |
|
1100 |
.reviewPanelSpan {
|
1101 |
-
|
1102 |
-
|
1103 |
}
|
1104 |
|
1105 |
.reviewPanel {
|
1106 |
-
|
1107 |
}
|
1108 |
|
1109 |
.reviewPanelContent {
|
1110 |
-
|
1111 |
}
|
1112 |
|
1113 |
.sg-review-panel {
|
@@ -1142,7 +1188,7 @@ input[name="theme"] {
|
|
1142 |
}
|
1143 |
|
1144 |
.plugin-card .compatibility-compatible:before {
|
1145 |
-
|
1146 |
}
|
1147 |
|
1148 |
#sg-plugins-wrapper .column-compatibility {
|
@@ -1156,7 +1202,19 @@ input[name="theme"] {
|
|
1156 |
|
1157 |
/*Settings tabe style*/
|
1158 |
.sg-settings-wrapper {
|
1159 |
-
width: 50%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1160 |
}
|
1161 |
|
1162 |
.sg-selectbox {
|
@@ -1175,16 +1233,190 @@ input[name="theme"] {
|
|
1175 |
.schedule-main-div-content {
|
1176 |
margin-bottom: 5px;
|
1177 |
}
|
1178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1179 |
@media only screen and (min-width:800px) {
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
}
|
1189 |
|
1190 |
@media(max-width: 1042px) {
|
4 |
}
|
5 |
|
6 |
.sg-hide-element {
|
7 |
+
display: none !important;
|
8 |
}
|
9 |
|
10 |
.sg-margin0 {
|
30 |
float: left;
|
31 |
}
|
32 |
|
33 |
+
.sgpb-alert {
|
34 |
+
padding: 15px;
|
35 |
+
margin-bottom: 20px;
|
36 |
+
border: 1px solid transparent;
|
37 |
+
border-radius: 4px;
|
38 |
+
}
|
39 |
+
|
40 |
+
.sgpb-alert-info {
|
41 |
+
color: #31708f;
|
42 |
+
background-color: #d9edf7;
|
43 |
+
border-color: #bce8f1;
|
44 |
+
}
|
45 |
+
|
46 |
#sg-general .postbox-container,
|
47 |
#effect .postbox-container,
|
48 |
#dimentions .postbox-container,
|
124 |
#displayNone {
|
125 |
display: none;
|
126 |
}
|
127 |
+
.sg-hide-element {
|
128 |
+
display: none !important;
|
129 |
+
}
|
130 |
|
131 |
div.sg-hide {
|
132 |
display: none;
|
373 |
margin: 26px 0px 0px 0px;
|
374 |
}
|
375 |
|
376 |
+
.popups-wrapper > a {
|
377 |
+
display: inline-block;
|
378 |
+
width: 200px;
|
379 |
+
height: 150px;
|
380 |
+
margin-right: 10px;
|
381 |
+
margin-bottom: 10px;
|
382 |
+
}
|
383 |
+
|
384 |
.popups-div {
|
385 |
width: 200px;
|
386 |
height: 150px;
|
398 |
transform: scale(1.05);
|
399 |
}
|
400 |
|
401 |
+
.add-new-extentions-wrapper {
|
402 |
+
width: 100%;
|
403 |
+
height: 20px;
|
404 |
+
border-bottom: 1px solid #DEDEDE;
|
405 |
+
text-align: center;
|
406 |
+
margin-bottom: 25px;
|
407 |
+
}
|
408 |
+
|
409 |
+
.add-new-extentions {
|
410 |
+
font-size: 35px;
|
411 |
+
background-color: #F1F1F1;
|
412 |
+
padding: 0 12px;
|
413 |
+
display: inline-block;
|
414 |
+
margin-top: 8px;
|
415 |
+
}
|
416 |
+
|
417 |
.html-popup {
|
418 |
background-image: url("../img/HTML-Button.png");
|
419 |
}
|
503 |
}
|
504 |
|
505 |
.pro-options {
|
506 |
+
clear: both;
|
507 |
+
width: 100%;
|
508 |
+
height: 568px;
|
509 |
+
background-image: url("../img/proOptions.png");
|
510 |
+
background-repeat: no-repeat;
|
511 |
+
background-size: contain;
|
512 |
+
cursor: pointer;
|
513 |
}
|
514 |
|
515 |
.generalMenu {
|
640 |
.theme2,
|
641 |
.theme3,
|
642 |
.theme4,
|
643 |
+
.theme5,
|
644 |
+
.theme6 {
|
645 |
border: 0px solid red;
|
646 |
width: 240px;
|
647 |
height: 130px;
|
679 |
background-size: 240px 130px;
|
680 |
}
|
681 |
|
682 |
+
.theme6 {
|
683 |
+
background-image: url("../img/theme6.jpg");
|
684 |
+
background-size: 240px 130px;
|
685 |
+
}
|
686 |
+
|
687 |
.js-preview-effect {
|
688 |
background-image: url("../img/preview-eye.png");
|
689 |
width: 30px;
|
1128 |
|
1129 |
|
1130 |
.reviewPanelClose {
|
1131 |
+
border: none;
|
1132 |
+
margin: 0;
|
1133 |
+
padding: 9px;
|
1134 |
+
background: 0 0;
|
1135 |
+
color: white;
|
1136 |
+
cursor: pointer;
|
1137 |
+
display: block;
|
1138 |
+
text-align: right;
|
1139 |
}
|
1140 |
|
1141 |
.reviewPanelHref {
|
1142 |
+
color: white;
|
1143 |
+
text-decoration: underline !important;
|
1144 |
}
|
1145 |
|
1146 |
.reviewPanelSpan {
|
1147 |
+
font-size: 19px;
|
1148 |
+
color: white;
|
1149 |
}
|
1150 |
|
1151 |
.reviewPanel {
|
1152 |
+
background-color: #2ECC71 !important;
|
1153 |
}
|
1154 |
|
1155 |
.reviewPanelContent {
|
1156 |
+
padding: 30px;
|
1157 |
}
|
1158 |
|
1159 |
.sg-review-panel {
|
1188 |
}
|
1189 |
|
1190 |
.plugin-card .compatibility-compatible:before {
|
1191 |
+
content: "\f147" !important;
|
1192 |
}
|
1193 |
|
1194 |
#sg-plugins-wrapper .column-compatibility {
|
1202 |
|
1203 |
/*Settings tabe style*/
|
1204 |
.sg-settings-wrapper {
|
1205 |
+
width: 50%;
|
1206 |
+
float: left;
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
.sg-newsletter-description {
|
1210 |
+
float: right;
|
1211 |
+
margin-right: 10px;
|
1212 |
+
margin-left: 10px;
|
1213 |
+
width: 48%;
|
1214 |
+
}
|
1215 |
+
|
1216 |
+
.sg-newsletter-description > .postbox-container {
|
1217 |
+
float: none !important;
|
1218 |
}
|
1219 |
|
1220 |
.sg-selectbox {
|
1233 |
.schedule-main-div-content {
|
1234 |
margin-bottom: 5px;
|
1235 |
}
|
1236 |
+
|
1237 |
+
/*Subsribers page view*/
|
1238 |
+
#addNewSubscriber {
|
1239 |
+
position: fixed;
|
1240 |
+
top:0;
|
1241 |
+
right: 0;
|
1242 |
+
bottom: 0;
|
1243 |
+
left: 0;
|
1244 |
+
background-color: rgba(0,0,0,0.8);
|
1245 |
+
z-index: 9999;
|
1246 |
+
opacity: 0;
|
1247 |
+
pointer-events: none;
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
#addNewSubscriber:target {
|
1251 |
+
opacity: 1;
|
1252 |
+
pointer-events: auto;
|
1253 |
+
}
|
1254 |
+
|
1255 |
+
.addNewSubsribersContent{
|
1256 |
+
width: 600px;
|
1257 |
+
height: 460px;
|
1258 |
+
position: fixed;
|
1259 |
+
top: 50%;
|
1260 |
+
left: 50%;
|
1261 |
+
margin-left: -300px;
|
1262 |
+
margin-top: -230px;
|
1263 |
+
background-color: white;
|
1264 |
+
padding: 15px;
|
1265 |
+
box-sizing: border-box;
|
1266 |
+
border-radius: 8px;
|
1267 |
+
}
|
1268 |
+
|
1269 |
+
.sg-close {
|
1270 |
+
background: #606061;
|
1271 |
+
color: #FFFFFF;
|
1272 |
+
line-height: 25px;
|
1273 |
+
position: absolute;
|
1274 |
+
right: -12px;
|
1275 |
+
text-align: center;
|
1276 |
+
top: -10px;
|
1277 |
+
width: 24px;
|
1278 |
+
text-decoration: none;
|
1279 |
+
font-weight: bold;
|
1280 |
+
-webkit-border-radius: 12px;
|
1281 |
+
-moz-border-radius: 12px;
|
1282 |
+
border-radius: 12px;
|
1283 |
+
-moz-box-shadow: 1px 1px 3px #000;
|
1284 |
+
-webkit-box-shadow: 1px 1px 3px #000;
|
1285 |
+
box-shadow: 1px 1px 3px #000;
|
1286 |
+
cursor: pointer;
|
1287 |
+
}
|
1288 |
+
|
1289 |
+
.sg-admin-popup-labeles {
|
1290 |
+
margin: 4px 0px;
|
1291 |
+
display: inline-block;
|
1292 |
+
}
|
1293 |
+
|
1294 |
+
.sg-bottom-hr {
|
1295 |
+
margin-top: 14px;
|
1296 |
+
margin-bottom: 13px;
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
.sg-admin-popup-inputs {
|
1300 |
+
width: 189px;
|
1301 |
+
}
|
1302 |
+
|
1303 |
+
.sg-email-error {
|
1304 |
+
color: red;
|
1305 |
+
}
|
1306 |
+
|
1307 |
+
.sg-add-to-list-button {
|
1308 |
+
margin-top: 5px !important;
|
1309 |
+
float: right;
|
1310 |
+
}
|
1311 |
+
|
1312 |
+
.spiner-subscribers {
|
1313 |
+
margin-bottom: 4px;
|
1314 |
+
margin-right: 5px;
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
.sg-successfully {
|
1318 |
+
float: right;
|
1319 |
+
background-color: #dff0d8;
|
1320 |
+
border-radius: 5px;
|
1321 |
+
color: #3c763d;
|
1322 |
+
padding: 5px;
|
1323 |
+
margin-top: 6px;
|
1324 |
+
margin-right: 5px;
|
1325 |
+
}
|
1326 |
+
|
1327 |
+
.sg-newslatter-submit-wrapper {
|
1328 |
+
margin-top: 15px;
|
1329 |
+
}
|
1330 |
+
|
1331 |
+
/*Subsribers page style*/
|
1332 |
+
.subscribers-wrapper .widefat .check-column {
|
1333 |
+
padding: 12px 0 0px 2px;
|
1334 |
+
}
|
1335 |
+
|
1336 |
+
.subs-delete-button-wrapper {
|
1337 |
+
text-align: right;
|
1338 |
+
margin-bottom: 5px;
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
/*Swich button style*/
|
1342 |
+
.sg-switch {
|
1343 |
+
position: relative;
|
1344 |
+
display: inline-block;
|
1345 |
+
width: 60px;
|
1346 |
+
height: 34px;
|
1347 |
+
}
|
1348 |
+
|
1349 |
+
/* Hide default HTML checkbox */
|
1350 |
+
.sg-switch input {display:none;}
|
1351 |
+
|
1352 |
+
/* The slider */
|
1353 |
+
.sg-slider {
|
1354 |
+
position: absolute;
|
1355 |
+
cursor: pointer;
|
1356 |
+
top: 0;
|
1357 |
+
left: 0;
|
1358 |
+
right: 0;
|
1359 |
+
bottom: 0;
|
1360 |
+
background-color: #ccc;
|
1361 |
+
-webkit-transition: .4s;
|
1362 |
+
transition: .4s;
|
1363 |
+
-ms-transform: scale(0.8, 0.8); /* IE 9 */
|
1364 |
+
-webkit-transform: scale(0.8, 0.8); /* Safari */
|
1365 |
+
transform: scale(0.8, 0.8);
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
.sg-slider:before {
|
1369 |
+
position: absolute;
|
1370 |
+
content: "";
|
1371 |
+
height: 26px;
|
1372 |
+
width: 26px;
|
1373 |
+
left: 4px;
|
1374 |
+
bottom: 4px;
|
1375 |
+
background-color: white;
|
1376 |
+
-webkit-transition: .4s;
|
1377 |
+
transition: .4s;
|
1378 |
+
}
|
1379 |
+
|
1380 |
+
input:checked + .sg-slider {
|
1381 |
+
background-color: #2196F3;
|
1382 |
+
}
|
1383 |
+
|
1384 |
+
input:focus + .sg-slider {
|
1385 |
+
box-shadow: 0 0 1px #2196F3;
|
1386 |
+
}
|
1387 |
+
|
1388 |
+
input:checked + .sg-slider:before {
|
1389 |
+
-webkit-transform: translateX(26px);
|
1390 |
+
-ms-transform: translateX(26px);
|
1391 |
+
transform: translateX(26px);
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
/* Rounded sliders */
|
1395 |
+
.sg-slider.sg-round {
|
1396 |
+
border-radius: 34px;
|
1397 |
+
}
|
1398 |
+
|
1399 |
+
.sg-slider.sg-round:before {
|
1400 |
+
border-radius: 50%;
|
1401 |
+
}
|
1402 |
+
/* Rounded sliders */
|
1403 |
+
.sg-slider.sg-round {
|
1404 |
+
border-radius: 34px;
|
1405 |
+
}
|
1406 |
+
|
1407 |
+
.sg-slider.sg-round:before {
|
1408 |
+
border-radius: 50%;
|
1409 |
+
}
|
1410 |
+
|
1411 |
@media only screen and (min-width:800px) {
|
1412 |
+
.sgmb-container {
|
1413 |
+
min-width:800px;
|
1414 |
+
margin-left: 10px;
|
1415 |
+
margin-right: 10px;
|
1416 |
+
}
|
1417 |
+
.reviewPanelContent {
|
1418 |
+
min-width:800px;
|
1419 |
+
}
|
1420 |
}
|
1421 |
|
1422 |
@media(max-width: 1042px) {
|
style/sg_popup_style.php
CHANGED
@@ -6,7 +6,8 @@ function sg_popup_admin_style($hook) {
|
|
6 |
'popup-builder_page_sgPopupMenu' != $hook &&
|
7 |
'popup-builder_page_more-plugins' != $hook &&
|
8 |
'popup-builder_page_popup-settings' != $hook &&
|
9 |
-
'popup-builder_page_subscribers' != $hook
|
|
|
10 |
return;
|
11 |
}
|
12 |
wp_register_style('sg_popup_style', SG_APP_POPUP_URL . '/style/sg_popup_style.css', false, '1.0.0');
|
@@ -43,7 +44,7 @@ function sg_popup_style($hook) {
|
|
43 |
wp_register_style('sg_popup_animate', SG_APP_POPUP_URL . '/style/animate.css');
|
44 |
wp_enqueue_style('sg_popup_animate');
|
45 |
|
46 |
-
wp_register_style('sg_popup_style', SG_APP_POPUP_URL . '/style/sg_popup_style.css', false
|
47 |
wp_enqueue_style('sg_popup_style');
|
48 |
}
|
49 |
|
6 |
'popup-builder_page_sgPopupMenu' != $hook &&
|
7 |
'popup-builder_page_more-plugins' != $hook &&
|
8 |
'popup-builder_page_popup-settings' != $hook &&
|
9 |
+
'popup-builder_page_subscribers' != $hook &&
|
10 |
+
'popup-builder_page_newsletter' != $hook) {
|
11 |
return;
|
12 |
}
|
13 |
wp_register_style('sg_popup_style', SG_APP_POPUP_URL . '/style/sg_popup_style.css', false, '1.0.0');
|
44 |
wp_register_style('sg_popup_animate', SG_APP_POPUP_URL . '/style/animate.css');
|
45 |
wp_enqueue_style('sg_popup_animate');
|
46 |
|
47 |
+
wp_register_style('sg_popup_style', SG_APP_POPUP_URL . '/style/sg_popup_style.css', false);
|
48 |
wp_enqueue_style('sg_popup_style');
|
49 |
}
|
50 |
|
style/sgcolorbox/colorbox6.css
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Colorbox Core Style:
|
3 |
+
The following CSS is consistent between example themes and should not be altered.
|
4 |
+
*/
|
5 |
+
#sgcolorbox.colorbox6, #sgcboxOverlay.colorbox6,.colorbox6 #sgcboxWrapper{position:absolute; top:0; left:0; z-index:2147483647; overflow:visible;}
|
6 |
+
|
7 |
+
.colorbox6 #sgcboxWrapper {max-width:none;}
|
8 |
+
|
9 |
+
#sgcboxOverlay.colorbox6{position:fixed; width:100%; height:100%;}
|
10 |
+
|
11 |
+
.colorbox6 #sgcboxMiddleLeft,.colorbox6 #sgcboxBottomLeft{clear:left;}
|
12 |
+
|
13 |
+
.colorbox6 #sgcboxContent{position:relative;}
|
14 |
+
|
15 |
+
.colorbox6 #sgcboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
|
16 |
+
|
17 |
+
.colorbox6 #sgcboxTitle{margin:0;}
|
18 |
+
|
19 |
+
#sgcboxLoadingOverlay.colorbox6,.colorbox6 #sgcboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
|
20 |
+
|
21 |
+
.colorbox6 #sgcboxPrevious,.colorbox6 #sgcboxNext,.colorbox6 #sgcboxClose,.colorbox6 #sgcboxSlideshow{cursor:pointer;}
|
22 |
+
|
23 |
+
.colorbox6 .sgcboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
|
24 |
+
|
25 |
+
.colorbox6 .sgcboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
|
26 |
+
|
27 |
+
#sgcolorbox.colorbox6,.colorbox6 #sgcboxContent,.colorbox6 #sgcboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
|
28 |
+
|
29 |
+
/*
|
30 |
+
User Style:
|
31 |
+
Change the following styles to modify the appearance of Colorbox. They are
|
32 |
+
ordered & tabbed in a way that represents the nesting of the generated HTML.
|
33 |
+
*/
|
34 |
+
|
35 |
+
#sgcboxOverlay.colorbox6{opacity: 1; filter: alpha(opacity = 99);}
|
36 |
+
|
37 |
+
#sgcboxOverlay.colorbox6 {background:url(../../img/colorbox6/colorbox_overlay.png) repeat 0 0;}
|
38 |
+
|
39 |
+
#sgcolorbox.colorbox6{outline:0;}
|
40 |
+
|
41 |
+
.colorbox6 #sgcboxTopLeft{width:25px; height:25px; background:url(../../img/colorbox6/border1.png) no-repeat 0 0;}
|
42 |
+
|
43 |
+
.colorbox6 #sgcboxTopCenter{height:25px; background:url(../../img/colorbox6/border1.png) repeat-x 0 -50px;}
|
44 |
+
|
45 |
+
.colorbox6 #sgcboxTopRight{width:25px; height:25px; background:url(../../img/colorbox6/border1.png) no-repeat -25px 0;}
|
46 |
+
|
47 |
+
.colorbox6 #sgcboxBottomLeft{width:25px; height:25px; background:url(../../img/colorbox6/border1.png) no-repeat 0 -25px;}
|
48 |
+
|
49 |
+
.colorbox6 #sgcboxBottomCenter{height:25px; background:url(../../img/colorbox6/border1.png) repeat-x 0 -75px;}
|
50 |
+
|
51 |
+
.colorbox6 #sgcboxBottomRight{width:25px; height:25px; background:url(../../img/colorbox6/border1.png) no-repeat -25px -25px;}
|
52 |
+
|
53 |
+
.colorbox6 #sgcboxMiddleLeft{width:25px; background:url(../../img/colorbox6/border2.png) repeat-y 0 0;}
|
54 |
+
|
55 |
+
.colorbox6 #sgcboxMiddleRight{width:25px; background:url(../../img/colorbox6/border2.png) repeat-y -25px 0;}
|
56 |
+
|
57 |
+
.colorbox6 #sgcboxContent{background:#fff; overflow:visible;}
|
58 |
+
|
59 |
+
.colorbox6 .sgcboxIframe{background:#fff;}
|
60 |
+
|
61 |
+
.colorbox6 #sgcboxError{padding:50px; border:1px solid #ccc;}
|
62 |
+
|
63 |
+
/*.colorbox6 #sgcboxLoadedContent{margin-bottom:20px;}*/
|
64 |
+
|
65 |
+
.colorbox6 #sgcboxTitle{position:absolute; bottom:0px; left:0; text-align:center; width:100%; color:#999;}
|
66 |
+
|
67 |
+
.colorbox6 #sgcboxCurrent{position:absolute; bottom:0px; left:100px; color:#999;}
|
68 |
+
|
69 |
+
#sgcboxLoadingOverlay.colorbox6{background:#fff url(../../img/colorbox6/loading.gif) no-repeat 5px 5px;}
|
70 |
+
|
71 |
+
/* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
|
72 |
+
.colorbox6 #sgcboxPrevious,.colorbox6 #sgcboxNext,.colorbox6 #sgcboxSlideshow,.colorbox6 #sgcboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
|
73 |
+
|
74 |
+
|
75 |
+
/* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
|
76 |
+
|
77 |
+
.colorbox6 #sgcboxPrevious:active,.colorbox6 #sgcboxNext:active,.colorbox6 #sgcboxSlideshow:active,.colorbox6 #sgcboxClose:active {outline:0;}
|
78 |
+
|
79 |
+
.colorbox6 #sgcboxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;}
|
80 |
+
|
81 |
+
.colorbox6 #sgcboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
|
82 |
+
|
83 |
+
.colorbox6 #sgcboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
|
84 |
+
|
85 |
+
.colorbox6 #sgcboxClose{
|
86 |
+
position:absolute;
|
87 |
+
top:-28px;
|
88 |
+
right:-26px;
|
89 |
+
display:block;
|
90 |
+
background:url(../../img/colorbox6/colorbox_sprite.png) no-repeat 2px 0;
|
91 |
+
text-indent: -9999px;
|
92 |
+
width:37px;
|
93 |
+
height:37px;
|
94 |
+
}
|
95 |
+
|
96 |
+
.colorbox6 #sgcboxClose:hover {
|
97 |
+
background-position: 2px 0px !important;
|
98 |
+
}
|
99 |
+
/*
|
100 |
+
The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
|
101 |
+
when an alpha filter (opacity change) is set on the element or ancestor element. This style is not applied to or needed in IE9.
|
102 |
+
See: http://jacklmoore.com/notes/ie-transparency-problems/
|
103 |
+
*/
|
104 |
+
|
105 |
+
|
106 |
+
.colorbox6 .sgcboxIE #sgcboxTopLeft,
|
107 |
+
|
108 |
+
.colorbox6 .sgcboxIE #sgcboxTopCenter,
|
109 |
+
|
110 |
+
.colorbox6 .sgcboxIE #sgcboxTopRight,
|
111 |
+
|
112 |
+
.colorbox6 .sgcboxIE #sgcboxBottomLeft,
|
113 |
+
|
114 |
+
.colorbox6 .sgcboxIE #sgcboxBottomCenter,
|
115 |
+
|
116 |
+
.colorbox6 .sgcboxIE #sgcboxBottomRight,
|
117 |
+
|
118 |
+
.colorbox6 .sgcboxIE #sgcboxMiddleLeft,
|
119 |
+
|
120 |
+
.colorbox6 .sgcboxIE #sgcboxMiddleRight {
|
121 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
|
122 |
+
|
123 |
+
}
|