Version Description
- Fixed: Minor bug
- Changed: Deactivation popup
Download this release
Release Info
Developer | webdorado |
Plugin | Image Optimizer by 10web – Image Optimizer and Compression plugin |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- assets/css/admin_main.css +16 -4
- assets/img/i_support.png +0 -0
- includes/iowd-optimize.php +29 -29
- io-wd.php +3 -2
- iowd_class.php +21 -14
- readme.txt +7 -3
- wd/README.md +1 -1
- wd/assets/css/deactivate_popup.css +36 -36
- wd/assets/css/notices.css +53 -62
- wd/assets/css/overview.css +138 -200
- wd/assets/css/subscribe.css +46 -64
- wd/assets/img/cfm_main_plugin.png +0 -0
- wd/assets/js/deactivate_popup.js +74 -74
- wd/assets/js/overview.js +14 -14
- wd/assets/js/subsribe.js +8 -8
- wd/config.php +115 -117
- wd/includes/api.php +76 -82
- wd/includes/deactivate.php +171 -173
- wd/includes/notices.php +83 -95
- wd/includes/overview.php +299 -313
- wd/includes/subscribe.php +134 -142
- wd/start.php +34 -34
- wd/templates/display_deactivation_popup.php +23 -33
- wd/templates/display_overview.php +35 -35
- wd/templates/display_overview_deals.php +43 -51
- wd/templates/display_overview_support.php +35 -36
- wd/templates/display_overview_user_guide.php +21 -26
- wd/templates/display_overview_welcome.php +12 -15
- wd/templates/display_subscribe.php +45 -47
- wd/wd.php +133 -144
assets/css/admin_main.css
CHANGED
@@ -1016,7 +1016,7 @@ input:checked + .iowd-slider:before {
|
|
1016 |
|
1017 |
.iowd_upgrade{
|
1018 |
clear: both;
|
1019 |
-
padding:
|
1020 |
background: #fff;
|
1021 |
margin: 6px 30px;
|
1022 |
color: #6e7990;
|
@@ -1025,18 +1025,30 @@ input:checked + .iowd-slider:before {
|
|
1025 |
line-height: 30px;
|
1026 |
|
1027 |
}
|
1028 |
-
.
|
1029 |
background-color: #D8D8D8;
|
1030 |
padding: 1px 5px;
|
1031 |
font-size: 11px;
|
1032 |
display: table;
|
1033 |
}
|
|
|
|
|
|
|
1034 |
.iowd_upgrade .wd-cell{
|
1035 |
display: table-cell;
|
1036 |
}
|
1037 |
-
.iowd_upgrade .wd-cell:first-child{
|
1038 |
-
padding-right:
|
|
|
1039 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1040 |
.iowd_upgrade a, .iowd_upgrade a:hover {
|
1041 |
text-decoration: none !important;
|
1042 |
}
|
1016 |
|
1017 |
.iowd_upgrade{
|
1018 |
clear: both;
|
1019 |
+
padding: 9px 15px;
|
1020 |
background: #fff;
|
1021 |
margin: 6px 30px;
|
1022 |
color: #6e7990;
|
1025 |
line-height: 30px;
|
1026 |
|
1027 |
}
|
1028 |
+
.wd-upgrade-table{
|
1029 |
background-color: #D8D8D8;
|
1030 |
padding: 1px 5px;
|
1031 |
font-size: 11px;
|
1032 |
display: table;
|
1033 |
}
|
1034 |
+
.iowd_upgrade .wd-table{
|
1035 |
+
display: table;
|
1036 |
+
}
|
1037 |
.iowd_upgrade .wd-cell{
|
1038 |
display: table-cell;
|
1039 |
}
|
1040 |
+
.iowd_upgrade .wd-cell:first-child a{
|
1041 |
+
padding-right: 8px;
|
1042 |
+
color: #72777c !important;
|
1043 |
}
|
1044 |
+
.iowd_upgrade .wd-cell:last-child {
|
1045 |
+
background: #45A6B7;
|
1046 |
+
padding: 1px 18px;
|
1047 |
+
}
|
1048 |
+
.iowd_upgrade .wd-cell:last-child a{
|
1049 |
+
color: #fff !important;
|
1050 |
+
}
|
1051 |
+
|
1052 |
.iowd_upgrade a, .iowd_upgrade a:hover {
|
1053 |
text-decoration: none !important;
|
1054 |
}
|
assets/img/i_support.png
ADDED
Binary file
|
includes/iowd-optimize.php
CHANGED
@@ -87,8 +87,13 @@ class IOWD_Optimize
|
|
87 |
$options = $this->options;
|
88 |
$image_data = array();
|
89 |
|
90 |
-
$optimized_data =
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
$optimize_thumbs = explode(",", $options["optimize_thumbs"]);
|
94 |
$uploads = wp_get_upload_dir();
|
@@ -297,53 +302,53 @@ class IOWD_Optimize
|
|
297 |
|
298 |
public function scan($all_attachments)
|
299 |
{
|
300 |
-
$
|
301 |
-
$
|
302 |
-
|
303 |
|
304 |
// all data
|
305 |
$media = isset($all_attachments["media"]) ? $all_attachments["media"] : array();
|
306 |
$media_sizes = isset($all_attachments["media_sizes"]) ? $all_attachments["media_sizes"] : array();
|
307 |
$other = isset($all_attachments["other"]) ? $all_attachments["other"] : array();
|
308 |
-
$unique_attachments = isset($all_attachments["attachments"]) ? $all_attachments["attachments"] :
|
309 |
|
310 |
-
$
|
311 |
-
$
|
312 |
-
$
|
313 |
|
314 |
$optimized_data_other = array();
|
315 |
$optimized_data_media = array();
|
316 |
$optimized_data_media_sizes = array();
|
317 |
|
318 |
|
319 |
-
|
320 |
-
|
321 |
-
|
|
|
|
|
322 |
|
323 |
-
if (
|
324 |
$optimized_data_other[$post_id] = $path;
|
325 |
} else {
|
326 |
-
if ($
|
327 |
-
$optimized_data_media[$post_id] = $path;
|
328 |
}
|
329 |
-
$optimized_data_media_sizes[$post_id] = $path;
|
330 |
}
|
|
|
331 |
}
|
332 |
|
333 |
-
} else {
|
334 |
-
$db_optimized_data = array();
|
335 |
}
|
336 |
|
337 |
$optimized_data = array_merge($optimized_data_other ,$optimized_data_media);
|
338 |
|
339 |
-
|
340 |
$not_optimized_data_sizes = array_diff($all_data_sizes, $db_optimized_data);
|
341 |
$not_optimized_data_media = array_diff($media, $optimized_data_media);
|
342 |
$not_optimized_data_media_sizes = array_diff($all_media_sizes, $optimized_data_media_sizes);
|
343 |
-
$not_optimized_data_other = array_diff($other, $optimized_data_other)
|
344 |
|
345 |
-
$all_data_sizes = array_merge($
|
346 |
-
$all_data = array_merge($
|
347 |
|
348 |
|
349 |
|
@@ -354,7 +359,7 @@ class IOWD_Optimize
|
|
354 |
"not_optimized_data_sizes" => count($not_optimized_data_sizes),
|
355 |
"not_optimized_data_media" => count($unique_attachments),
|
356 |
"not_optimized_data_media_sizes" => count($not_optimized_data_media_sizes),
|
357 |
-
"not_optimized_data_other" => count($
|
358 |
"all_data_sizes" => count($all_data_sizes),
|
359 |
"all_data" => count($all_data),
|
360 |
);
|
@@ -703,7 +708,7 @@ class IOWD_Optimize
|
|
703 |
$_image_size = 0;
|
704 |
$_image_orig_size = 0;
|
705 |
$_image_count = 0;
|
706 |
-
|
707 |
for ($i = 0; $i < count($request); $i++) {
|
708 |
$request_row = $request[$i];
|
709 |
$response_row = isset($body[$request_row["post_id"] . ":" . $request_row["size"]]) ? $body[$request_row["post_id"] . ":" . $request_row["size"]] : false;
|
@@ -755,7 +760,6 @@ class IOWD_Optimize
|
|
755 |
$_image_size += $row_data["image_size"];
|
756 |
$_image_orig_size += $img_orig_size;
|
757 |
$_image_count += 1;
|
758 |
-
$paths[$request_row["post_id"] . "_" . $request_row["size"]] = $request_row["path"];
|
759 |
}
|
760 |
|
761 |
$last_optimized_data = get_site_transient("iowd_last_optimized_data");
|
@@ -770,10 +774,6 @@ class IOWD_Optimize
|
|
770 |
|
771 |
set_site_transient("iowd_last_optimized_data", json_encode($last_optimized_data));
|
772 |
|
773 |
-
$db_paths = get_site_transient("iowd_optimized");
|
774 |
-
$db_paths = $db_paths ? $db_paths : array();
|
775 |
-
$paths = array_merge($db_paths, $paths);
|
776 |
-
set_site_transient("iowd_optimized", $paths);
|
777 |
|
778 |
}
|
779 |
|
87 |
$options = $this->options;
|
88 |
$image_data = array();
|
89 |
|
90 |
+
$optimized_data = array();
|
91 |
+
global $wpdb;
|
92 |
+
$_optimized_data = $wpdb->get_results("SELECT path, post_id, size FROM " . $wpdb->prefix . "iowd_images");
|
93 |
+
|
94 |
+
foreach($_optimized_data as $data){
|
95 |
+
$optimized_data[ $data->post_id . "_" . $data->size] = $data->path;
|
96 |
+
}
|
97 |
|
98 |
$optimize_thumbs = explode(",", $options["optimize_thumbs"]);
|
99 |
$uploads = wp_get_upload_dir();
|
302 |
|
303 |
public function scan($all_attachments)
|
304 |
{
|
305 |
+
global $wpdb;
|
306 |
+
$_db_optimized_data = $wpdb->get_results("SELECT `path`, `post_id`, `size` FROM " . $wpdb->prefix . "iowd_images");
|
|
|
307 |
|
308 |
// all data
|
309 |
$media = isset($all_attachments["media"]) ? $all_attachments["media"] : array();
|
310 |
$media_sizes = isset($all_attachments["media_sizes"]) ? $all_attachments["media_sizes"] : array();
|
311 |
$other = isset($all_attachments["other"]) ? $all_attachments["other"] : array();
|
312 |
+
$unique_attachments = isset($all_attachments["attachments"]) ? $all_attachments["attachments"] : array();
|
313 |
|
314 |
+
$not_optimized_data_media_sizes = array_merge($media, $media_sizes);
|
315 |
+
$not_optimized_data_sizes = array_merge($not_optimized_data_media_sizes, $other);
|
316 |
+
$not_optimized_data = array_unique(array_merge($media, $other));
|
317 |
|
318 |
$optimized_data_other = array();
|
319 |
$optimized_data_media = array();
|
320 |
$optimized_data_media_sizes = array();
|
321 |
|
322 |
|
323 |
+
$db_optimized_data = array();
|
324 |
+
if ($_db_optimized_data) {
|
325 |
+
foreach ($_db_optimized_data as $data) {
|
326 |
+
$post_id = $data->post_id;
|
327 |
+
$path = $data->path;
|
328 |
|
329 |
+
if (strpos($post_id , "iowd") !== false ) {
|
330 |
$optimized_data_other[$post_id] = $path;
|
331 |
} else {
|
332 |
+
if ($data->size == "full") {
|
333 |
+
$optimized_data_media[$post_id . "_" . $data->size] = $path;
|
334 |
}
|
335 |
+
$optimized_data_media_sizes[$post_id . "_" . $data->size] = $path;
|
336 |
}
|
337 |
+
$db_optimized_data[$post_id . "_" . $data->size] = $path;
|
338 |
}
|
339 |
|
|
|
|
|
340 |
}
|
341 |
|
342 |
$optimized_data = array_merge($optimized_data_other ,$optimized_data_media);
|
343 |
|
344 |
+
/*$not_optimized_data = array_diff($all_data, $optimized_data);
|
345 |
$not_optimized_data_sizes = array_diff($all_data_sizes, $db_optimized_data);
|
346 |
$not_optimized_data_media = array_diff($media, $optimized_data_media);
|
347 |
$not_optimized_data_media_sizes = array_diff($all_media_sizes, $optimized_data_media_sizes);
|
348 |
+
$not_optimized_data_other = array_diff($other, $optimized_data_other);*/
|
349 |
|
350 |
+
$all_data_sizes = array_merge($not_optimized_data_sizes,$db_optimized_data);
|
351 |
+
$all_data = array_merge($not_optimized_data, $optimized_data);
|
352 |
|
353 |
|
354 |
|
359 |
"not_optimized_data_sizes" => count($not_optimized_data_sizes),
|
360 |
"not_optimized_data_media" => count($unique_attachments),
|
361 |
"not_optimized_data_media_sizes" => count($not_optimized_data_media_sizes),
|
362 |
+
"not_optimized_data_other" => count($other),
|
363 |
"all_data_sizes" => count($all_data_sizes),
|
364 |
"all_data" => count($all_data),
|
365 |
);
|
708 |
$_image_size = 0;
|
709 |
$_image_orig_size = 0;
|
710 |
$_image_count = 0;
|
711 |
+
|
712 |
for ($i = 0; $i < count($request); $i++) {
|
713 |
$request_row = $request[$i];
|
714 |
$response_row = isset($body[$request_row["post_id"] . ":" . $request_row["size"]]) ? $body[$request_row["post_id"] . ":" . $request_row["size"]] : false;
|
760 |
$_image_size += $row_data["image_size"];
|
761 |
$_image_orig_size += $img_orig_size;
|
762 |
$_image_count += 1;
|
|
|
763 |
}
|
764 |
|
765 |
$last_optimized_data = get_site_transient("iowd_last_optimized_data");
|
774 |
|
775 |
set_site_transient("iowd_last_optimized_data", json_encode($last_optimized_data));
|
776 |
|
|
|
|
|
|
|
|
|
777 |
|
778 |
}
|
779 |
|
io-wd.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Image Optimizer WD
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-image-optimizer.html
|
6 |
* Description: Image Optimizer WordPress plugin enables you to resize, compress and optimize PNG, JPG, GIF files while maintaining image quality.
|
7 |
-
* Version: 1.0.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -28,7 +28,8 @@ define('IOWD_API_URL', "https://optimizer.web-dorado.com/api/");
|
|
28 |
|
29 |
setlocale(LC_ALL, 'en_US.UTF-8');
|
30 |
|
31 |
-
|
|
|
32 |
require_once('vendor/autoload.php');
|
33 |
}
|
34 |
|
4 |
* Plugin Name: Image Optimizer WD
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-image-optimizer.html
|
6 |
* Description: Image Optimizer WordPress plugin enables you to resize, compress and optimize PNG, JPG, GIF files while maintaining image quality.
|
7 |
+
* Version: 1.0.4
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
28 |
|
29 |
setlocale(LC_ALL, 'en_US.UTF-8');
|
30 |
|
31 |
+
$uri = $_SERVER['REQUEST_URI'];
|
32 |
+
if (version_compare(phpversion(), "5.4", '>') && (strpos($uri, "iowd") || (defined('DOING_AJAX') && DOING_AJAX && isset($_POST["action"]) && $_POST["action"] == "optimize"))) {
|
33 |
require_once('vendor/autoload.php');
|
34 |
}
|
35 |
|
iowd_class.php
CHANGED
@@ -8,7 +8,7 @@ class IOWD
|
|
8 |
{
|
9 |
|
10 |
protected static $instance = null;
|
11 |
-
private static $version = '1.0.
|
12 |
private static $page;
|
13 |
private $reg_autoloader = false;
|
14 |
private $options = array();
|
@@ -449,13 +449,13 @@ class IOWD
|
|
449 |
<div style="font-size: 14px;margin-top: 6px;">
|
450 |
<?php
|
451 |
if (get_option(IOWD_PREFIX . '_mode') == "standart") {
|
452 |
-
_e("This section allows you quickly optimize the pictures
|
453 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;"
|
454 |
target="_blank"
|
455 |
href="https://web-dorado.com/wordpress-image-optimizer-guide/easy-optimization.html"><?php _e("Read More in User Manual.", IOWD_PREFIX); ?></a>
|
456 |
<?php
|
457 |
} else {
|
458 |
-
_e("This section allows you configure image optimization
|
459 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;"
|
460 |
target="_blank"
|
461 |
href="https://web-dorado.com/wordpress-image-optimizer-guide/advanced-optimization.html"><?php _e("Read More in User Manual.", IOWD_PREFIX); ?></a>
|
@@ -478,17 +478,24 @@ class IOWD
|
|
478 |
?>
|
479 |
</div>
|
480 |
<div class="wd-right">
|
481 |
-
<
|
482 |
-
<
|
483 |
-
<
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
492 |
</div>
|
493 |
</div>
|
494 |
<?php
|
8 |
{
|
9 |
|
10 |
protected static $instance = null;
|
11 |
+
private static $version = '1.0.4';
|
12 |
private static $page;
|
13 |
private $reg_autoloader = false;
|
14 |
private $options = array();
|
449 |
<div style="font-size: 14px;margin-top: 6px;">
|
450 |
<?php
|
451 |
if (get_option(IOWD_PREFIX . '_mode') == "standart") {
|
452 |
+
_e("This section allows you quickly optimize the pictures.", IOWD_PREFIX); ?>
|
453 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;"
|
454 |
target="_blank"
|
455 |
href="https://web-dorado.com/wordpress-image-optimizer-guide/easy-optimization.html"><?php _e("Read More in User Manual.", IOWD_PREFIX); ?></a>
|
456 |
<?php
|
457 |
} else {
|
458 |
+
_e("This section allows you configure image optimization .", IOWD_PREFIX); ?>
|
459 |
<a style="color: #5CAEBD; text-decoration: none;border-bottom: 1px dotted;"
|
460 |
target="_blank"
|
461 |
href="https://web-dorado.com/wordpress-image-optimizer-guide/advanced-optimization.html"><?php _e("Read More in User Manual.", IOWD_PREFIX); ?></a>
|
478 |
?>
|
479 |
</div>
|
480 |
<div class="wd-right">
|
481 |
+
<div class="wd-cell wd-cell-valign-middle">
|
482 |
+
<a href="https://wordpress.org/support/plugin/image-optimizer-wd" target="_blank">
|
483 |
+
<img src="<?php echo IOWD_URL_IMG; ?>/i_support.png">
|
484 |
+
Support Forum </a>
|
485 |
+
</div>
|
486 |
+
<div class="wd-cell wd-cell-valign-middle">
|
487 |
+
<a href="https://web-dorado.com/products/wordpress-image-optimizer.html" target="_blank">
|
488 |
+
<?php _e("UPGRADE TO PAID VERSION", IOWD_PREFIX); ?>
|
489 |
+
<!--<div class="wd-table wd-upgrade-table">
|
490 |
+
<div class="wd-cell wd-cell-valign-middle">
|
491 |
+
<img src="<?php echo IOWD_URL_IMG; ?>/web-dorado.png" width="42px">
|
492 |
+
</div>
|
493 |
+
<div class="wd-cell wd-cell-valign-middle">
|
494 |
+
<?php _e("UPGRADE TO PAID VERSION", IOWD_PREFIX); ?>
|
495 |
+
</div>
|
496 |
+
</div>-->
|
497 |
+
</a>
|
498 |
+
</div>
|
499 |
</div>
|
500 |
</div>
|
501 |
<?php
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: : compress, image, images optimization, performance, photos, lossless, opt
|
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.9
|
7 |
Requires PHP: 5.5
|
8 |
-
Stable tag: 1.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -55,12 +55,16 @@ Upgrade to [Image Optimizer WD Pro](https://web-dorado.com/products/wordpress-im
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
|
|
58 |
= 1.0.3 =
|
59 |
* Added: Integration with Photo Gallery plugin.
|
60 |
|
61 |
= 1.0.2 =
|
62 |
-
*
|
63 |
-
*
|
64 |
|
65 |
= 1.0.1 =
|
66 |
* Added: Check required PHP version
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.9
|
7 |
Requires PHP: 5.5
|
8 |
+
Stable tag: 1.0.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 1.0.4 =
|
59 |
+
* Fixed: Minor bug
|
60 |
+
* Changed: Deactivation popup
|
61 |
+
|
62 |
= 1.0.3 =
|
63 |
* Added: Integration with Photo Gallery plugin.
|
64 |
|
65 |
= 1.0.2 =
|
66 |
+
* Changed: Require PHP 5.5
|
67 |
+
* Changed: Using AJAX for getting optimizer scan info
|
68 |
|
69 |
= 1.0.1 =
|
70 |
* Added: Check required PHP version
|
wd/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
Version: 1.0.
|
2 |
|
3 |
|
4 |
|
1 |
+
Version: 1.0.13
|
2 |
|
3 |
|
4 |
|
wd/assets/css/deactivate_popup.css
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
-
.wd-
|
2 |
-
|
|
|
|
|
|
|
|
|
3 |
top: 0px;
|
4 |
bottom: 0px;
|
5 |
left: 0px;
|
@@ -7,11 +11,11 @@
|
|
7 |
z-index: 9999;
|
8 |
background: #000;
|
9 |
opacity: 0.5;
|
10 |
-
|
11 |
}
|
12 |
|
13 |
-
.wd-deactivate-popup
|
14 |
-
|
15 |
top: 0px;
|
16 |
bottom: 0px;
|
17 |
left: 0px;
|
@@ -21,55 +25,51 @@
|
|
21 |
width: 600px;
|
22 |
height: 281px;
|
23 |
margin: auto;
|
24 |
-
|
25 |
-
|
26 |
}
|
27 |
|
28 |
-
|
29 |
-
|
|
|
30 |
padding: 18px 40px;
|
31 |
font-size: 16px;
|
32 |
-
background: rgba(221, 221, 221, 0.14);
|
33 |
}
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
border-bottom: 1px solid #ccc;
|
38 |
}
|
39 |
-
|
40 |
-
|
41 |
-
width: 220px;
|
42 |
}
|
43 |
-
|
44 |
-
.wd-deactivate-popup-body textarea {
|
45 |
width: 100%;
|
46 |
}
|
47 |
-
|
48 |
-
.wd-btns
|
49 |
position: absolute;
|
50 |
bottom: 19px;
|
51 |
-
right: 19px
|
52 |
}
|
53 |
|
54 |
-
.additional_details_wrap
|
55 |
-
|
56 |
}
|
57 |
|
58 |
-
.wd-additional-active
|
59 |
-
|
60 |
padding: 15px;
|
61 |
-
|
62 |
}
|
63 |
-
|
64 |
-
|
65 |
-
height: 523px !important;
|
66 |
}
|
67 |
|
68 |
-
.wd-popup-active2
|
69 |
-
|
70 |
}
|
71 |
-
|
72 |
-
.wd-deactivate-popup-opacity {
|
73 |
width: 100%;
|
74 |
height: 100%;
|
75 |
background: #D9D9D9;
|
@@ -79,7 +79,7 @@
|
|
79 |
display: none;
|
80 |
}
|
81 |
|
82 |
-
.wd-deactivate-popup-opacity .wd-img-loader
|
83 |
position: absolute;
|
84 |
top: 0;
|
85 |
left: 0;
|
@@ -87,4 +87,4 @@
|
|
87 |
bottom: 0;
|
88 |
margin: auto;
|
89 |
z-index: 63;
|
90 |
-
}
|
1 |
+
.wd-bwg-reasons:nth-child(3) {
|
2 |
+
display: none;
|
3 |
+
}
|
4 |
+
|
5 |
+
.wd-opacity{
|
6 |
+
position: fixed;
|
7 |
top: 0px;
|
8 |
bottom: 0px;
|
9 |
left: 0px;
|
11 |
z-index: 9999;
|
12 |
background: #000;
|
13 |
opacity: 0.5;
|
14 |
+
display: none;
|
15 |
}
|
16 |
|
17 |
+
.wd-deactivate-popup{
|
18 |
+
position: fixed;
|
19 |
top: 0px;
|
20 |
bottom: 0px;
|
21 |
left: 0px;
|
25 |
width: 600px;
|
26 |
height: 281px;
|
27 |
margin: auto;
|
28 |
+
display: none;
|
29 |
+
box-sizing: border-box;
|
30 |
}
|
31 |
|
32 |
+
|
33 |
+
.wd-deactivate-popup-header{
|
34 |
+
border-bottom: 1px solid #ccc;
|
35 |
padding: 18px 40px;
|
36 |
font-size: 16px;
|
37 |
+
background: rgba(221, 221, 221, 0.14);
|
38 |
}
|
39 |
+
.wd-deactivate-popup-body{
|
40 |
+
padding: 20px 40px;
|
41 |
+
border-bottom: 1px solid #ccc;
|
|
|
42 |
}
|
43 |
+
.wd-deactivate-popup-body input[type=text]{
|
44 |
+
width: 220px;
|
|
|
45 |
}
|
46 |
+
.wd-deactivate-popup-body textarea{
|
|
|
47 |
width: 100%;
|
48 |
}
|
49 |
+
|
50 |
+
.wd-btns{
|
51 |
position: absolute;
|
52 |
bottom: 19px;
|
53 |
+
right: 19px
|
54 |
}
|
55 |
|
56 |
+
.additional_details_wrap{
|
57 |
+
margin-top: 20px;
|
58 |
}
|
59 |
|
60 |
+
.wd-additional-active{
|
61 |
+
background: rgba(204, 204, 204, 0.18);
|
62 |
padding: 15px;
|
63 |
+
margin: 14px 0px 5px;
|
64 |
}
|
65 |
+
.wd-popup-active1{
|
66 |
+
height: 523px !important;
|
|
|
67 |
}
|
68 |
|
69 |
+
.wd-popup-active2{
|
70 |
+
height: 426px !important
|
71 |
}
|
72 |
+
.wd-deactivate-popup-opacity{
|
|
|
73 |
width: 100%;
|
74 |
height: 100%;
|
75 |
background: #D9D9D9;
|
79 |
display: none;
|
80 |
}
|
81 |
|
82 |
+
.wd-deactivate-popup-opacity .wd-img-loader{
|
83 |
position: absolute;
|
84 |
top: 0;
|
85 |
left: 0;
|
87 |
bottom: 0;
|
88 |
margin: auto;
|
89 |
z-index: 63;
|
90 |
+
}
|
wd/assets/css/notices.css
CHANGED
@@ -1,97 +1,88 @@
|
|
1 |
.wd-admin-notice {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
}
|
9 |
-
|
10 |
.wd-admin-notice a {
|
11 |
-
|
12 |
}
|
13 |
-
|
14 |
.wd-notice-logo {
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
}
|
27 |
-
|
28 |
.wd-admin-notice > .dashicons {
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
}
|
34 |
-
|
35 |
.wd-notice-title {
|
36 |
-
|
37 |
-
|
38 |
}
|
39 |
-
|
40 |
.wd-notice-body {
|
41 |
-
|
42 |
-
|
43 |
}
|
44 |
-
|
45 |
.wd-notice-body:after {
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
}
|
50 |
-
|
51 |
.wd-notice-body li {
|
52 |
-
|
53 |
-
|
54 |
}
|
55 |
-
|
56 |
.wd-notice-body .dashicons {
|
57 |
-
|
58 |
}
|
59 |
-
|
60 |
.wd-blue {
|
61 |
-
|
62 |
}
|
63 |
|
64 |
.admin-notice-promo {
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
}
|
73 |
|
74 |
.admin-notice-promo:after {
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
}
|
79 |
|
80 |
.close-promo {
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
}
|
85 |
|
86 |
.promo {
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
}
|
93 |
|
94 |
.promo a {
|
95 |
-
|
96 |
-
|
97 |
}
|
1 |
.wd-admin-notice {
|
2 |
+
background: #fff;
|
3 |
+
border: 4px;
|
4 |
+
display: block;
|
5 |
+
min-height: 68px;
|
6 |
+
padding: 10px 40px 10px 125px;
|
7 |
+
position: relative;
|
8 |
}
|
|
|
9 |
.wd-admin-notice a {
|
10 |
+
color: #10738B;
|
11 |
}
|
|
|
12 |
.wd-notice-logo {
|
13 |
+
clear: both;
|
14 |
+
content: "";
|
15 |
+
display: block;
|
16 |
+
background-size: 108px auto;
|
17 |
+
background-repeat: no-repeat;
|
18 |
+
background-position: 0 45%;
|
19 |
+
width: 125px;
|
20 |
+
position: absolute;
|
21 |
+
top: 0;
|
22 |
+
bottom: 0;
|
23 |
+
left: 5px;
|
24 |
}
|
|
|
25 |
.wd-admin-notice > .dashicons {
|
26 |
+
color: #424242;
|
27 |
+
position: absolute;
|
28 |
+
right: 20px;
|
29 |
+
top: 40%;
|
30 |
}
|
|
|
31 |
.wd-notice-title {
|
32 |
+
font-size: 24px;
|
33 |
+
margin: 0;
|
34 |
}
|
|
|
35 |
.wd-notice-body {
|
36 |
+
font-weight: normal;
|
37 |
+
margin: 5px 0;
|
38 |
}
|
|
|
39 |
.wd-notice-body:after {
|
40 |
+
clear: both;
|
41 |
+
content: "";
|
42 |
+
display: block;
|
43 |
}
|
|
|
44 |
.wd-notice-body li {
|
45 |
+
float: left;
|
46 |
+
margin-right: 20px;
|
47 |
}
|
|
|
48 |
.wd-notice-body .dashicons {
|
49 |
+
font-size: 17px;
|
50 |
}
|
|
|
51 |
.wd-blue {
|
52 |
+
color: #10738B;
|
53 |
}
|
54 |
|
55 |
.admin-notice-promo {
|
56 |
+
background: #fff;
|
57 |
+
border-top: 4px;
|
58 |
+
display: block;
|
59 |
+
min-height: 68px;
|
60 |
+
padding: 10px 40px 0px 10px;
|
61 |
+
margin: 10px 0;
|
62 |
+
position: relative;
|
63 |
}
|
64 |
|
65 |
.admin-notice-promo:after {
|
66 |
+
content: '';
|
67 |
+
display: table;
|
68 |
+
clear: both;
|
69 |
}
|
70 |
|
71 |
.close-promo {
|
72 |
+
position: absolute;
|
73 |
+
top: 5px;
|
74 |
+
right: 5px;
|
75 |
}
|
76 |
|
77 |
.promo {
|
78 |
+
background-position: center;
|
79 |
+
background-repeat: no-repeat;
|
80 |
+
background-size: 972px 200px;
|
81 |
+
height: 200px;
|
82 |
+
max-width: 100%;
|
83 |
}
|
84 |
|
85 |
.promo a {
|
86 |
+
display: block;
|
87 |
+
height: 100%;
|
88 |
}
|
wd/assets/css/overview.css
CHANGED
@@ -1,162 +1,137 @@
|
|
1 |
/* general */
|
2 |
-
.wd-table
|
3 |
display: table;
|
4 |
width: 100%;
|
5 |
}
|
6 |
-
|
7 |
-
.wd-cell {
|
8 |
display: table-cell;
|
9 |
}
|
10 |
-
|
11 |
-
.wd-valign-top {
|
12 |
vertical-align: top;
|
13 |
}
|
14 |
-
|
15 |
-
.wd-valign-middle {
|
16 |
vertical-align: middle;
|
17 |
}
|
18 |
-
|
19 |
-
.wd-valign-bottom {
|
20 |
vertical-align: bottom;
|
21 |
}
|
22 |
-
|
23 |
-
.wd-text-right {
|
24 |
text-align: right;
|
25 |
}
|
26 |
-
|
27 |
-
.wd-text-center {
|
28 |
text-align: center;
|
29 |
}
|
30 |
-
|
31 |
-
.hide {
|
32 |
display: none;
|
33 |
}
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
box-shadow: none !important;
|
39 |
}
|
40 |
|
41 |
/*end general */
|
42 |
-
.wd-video_container
|
43 |
text-align: center;
|
44 |
}
|
45 |
-
|
46 |
-
.overview_welcome {
|
47 |
background: url(img/welcome_bg.png) no-repeat;
|
48 |
margin: 21px 0px;
|
49 |
background-size: 100% 100%;
|
50 |
line-height: 28px;
|
51 |
}
|
52 |
-
|
53 |
-
|
54 |
-
padding: 15px;
|
55 |
}
|
56 |
-
|
57 |
-
|
58 |
-
position: relative;
|
59 |
}
|
60 |
|
61 |
-
.overview_welcome h2
|
62 |
-
|
63 |
-
|
64 |
margin-top: 0;
|
65 |
margin-bottom: 15px;
|
66 |
-
|
67 |
}
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
padding-
|
72 |
-
padding-left: 25px;
|
73 |
}
|
74 |
-
|
75 |
-
.overview_wrap {
|
76 |
width: 935px;
|
77 |
background: #fff;
|
78 |
}
|
79 |
-
|
80 |
-
.overview_welcome .overview_welcome_text {
|
81 |
font-size: 15px;
|
82 |
-
|
83 |
}
|
84 |
-
|
85 |
-
.overview_tabs:after, .deals_content:after, .deal_desc_footer:after {
|
86 |
content: "";
|
87 |
display: table;
|
88 |
clear: both;
|
89 |
}
|
90 |
-
|
91 |
-
.overview_tabs li {
|
92 |
float: left;
|
93 |
width: 16.666%;
|
94 |
}
|
95 |
|
96 |
-
.overview_tabs li a
|
97 |
text-decoration: none !important;
|
98 |
color: #000;
|
99 |
background: #D6D6D6;
|
100 |
background: -webkit-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Safari 5.1 to 6.0 */
|
101 |
background: -o-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Opera 11.1 to 12.0 */
|
102 |
background: -moz-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Firefox 3.6 to 15 */
|
103 |
-
background: linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* Standard syntax */
|
104 |
text-transform: uppercase;
|
105 |
display: block;
|
106 |
-
padding: 7px 10px;
|
107 |
-
text-align: center;
|
108 |
-
font-weight: bold;
|
109 |
-
border-top: 4px solid #F1F1F1;
|
110 |
position: relative;
|
111 |
-
top: -4px;
|
112 |
}
|
113 |
-
|
114 |
-
.overview_tabs li a:hover, .overview_tabs li a:active, .overview_tabs li a:focus, .overview_tab_active {
|
115 |
background: #fff !important;
|
116 |
border-top: 4px solid #2A495F !important;
|
117 |
-
|
118 |
}
|
119 |
-
|
120 |
-
#welcome, #user_guide, #support, .deals_content {
|
121 |
padding: 15px 10px;
|
122 |
background: #fff;
|
123 |
}
|
124 |
-
|
125 |
-
.plugin_feature_title {
|
126 |
font-size: 19px;
|
127 |
}
|
128 |
-
|
129 |
-
.more_features_wrap {
|
130 |
margin-top: 25px;
|
131 |
text-align: right;
|
132 |
}
|
133 |
-
|
134 |
-
.more_features, .more_features:hover, .more_features:focus {
|
135 |
color: #fff;
|
136 |
background: #00384F;
|
137 |
padding: 3px 15px;
|
138 |
text-decoration: none;
|
139 |
}
|
140 |
-
|
141 |
-
.user_guide_item {
|
142 |
margin-bottom: 19px;
|
143 |
}
|
144 |
-
|
145 |
-
.user_guide_title, .user_guide_title:hover, .user_guide_title:focus {
|
146 |
font-size: 16px;
|
147 |
color: #192D3B;
|
148 |
font-weight: bold;
|
149 |
margin-bottom: 5px;
|
150 |
-
|
151 |
}
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
text-decoration: none;
|
156 |
}
|
157 |
-
|
158 |
-
.user_guide_demo, .user_guide_plugin, .user_guide_support_forum, .user_guide_addons, .user_guide_faq
|
159 |
-
.user_guide_demo:hover, .user_guide_plugin:hover, .user_guide_support_forum:hover, .user_guide_addons:hover, .user_guide_faq:hover {
|
160 |
background-color: #F5F5F5;
|
161 |
background-repeat: no-repeat;
|
162 |
background-position: right -4px center;
|
@@ -167,56 +142,47 @@ a:focus {
|
|
167 |
font-weight: bold;
|
168 |
text-transform: uppercase;
|
169 |
color: #192D3B;
|
170 |
-
margin-bottom: 7px;
|
171 |
display: block;
|
172 |
-
text-decoration: none;
|
173 |
}
|
174 |
-
|
175 |
-
.user_guide_demo {
|
176 |
background-image: url(img/ug-icon-1.png);
|
177 |
}
|
178 |
-
|
179 |
-
.user_guide_plugin {
|
180 |
background-image: url(img/ug-icon-2.png);
|
181 |
}
|
182 |
-
|
183 |
-
.user_guide_support_forum {
|
184 |
background-image: url(img/ug-icon-3.png);
|
185 |
}
|
186 |
-
|
187 |
-
.user_guide_addons {
|
188 |
background-image: url(img/ug-icon-4.png);
|
189 |
}
|
190 |
-
|
191 |
-
.user_guide_faq {
|
192 |
background-image: url(img/ug-icon-5.png);
|
193 |
}
|
194 |
|
195 |
-
#support .wd-support-main
|
196 |
-
|
197 |
margin: 0 auto;
|
198 |
font-size: 16px;
|
199 |
text-align: center;
|
200 |
margin-bottom: 15px;
|
201 |
-
|
202 |
}
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
margin: 0 auto;
|
209 |
}
|
210 |
-
|
211 |
-
|
212 |
-
text-align: center;
|
213 |
}
|
214 |
-
|
215 |
-
|
216 |
-
font-size: 16px;
|
217 |
}
|
218 |
-
|
219 |
-
.contact_us, .contact_us:hover, .contact_us:focus {
|
220 |
display: block;
|
221 |
background: #27475D;
|
222 |
color: #fff;
|
@@ -231,28 +197,24 @@ a:focus {
|
|
231 |
text-transform: uppercase;
|
232 |
}
|
233 |
|
234 |
-
.support_email
|
235 |
color: #F47A31;
|
236 |
}
|
237 |
-
|
238 |
-
|
239 |
-
padding: 23px;
|
240 |
background: #f1f1f1;
|
241 |
box-sizing: border-box;
|
242 |
}
|
243 |
-
|
244 |
-
|
245 |
-
width: 100%;
|
246 |
}
|
247 |
-
|
248 |
-
.contact_us {
|
249 |
margin-left: auto !important;
|
250 |
margin-right: auto;
|
251 |
-
|
252 |
}
|
253 |
-
|
254 |
-
|
255 |
-
display: block;
|
256 |
background: #27475D;
|
257 |
color: #fff;
|
258 |
padding: 5px 8px;
|
@@ -262,56 +224,46 @@ a:focus {
|
|
262 |
border: 1px solid #B7B7B7;
|
263 |
cursor: pointer;
|
264 |
}
|
265 |
-
|
266 |
-
#plugins {
|
267 |
padding-bottom: 15px;
|
268 |
background: #fff;
|
269 |
}
|
270 |
|
271 |
-
.deals_header_plugins
|
272 |
background: url(img/plugins_header_bg.png) #fff no-repeat;
|
273 |
}
|
274 |
-
|
275 |
-
.deals_header_themes {
|
276 |
background: url(img/themes_headrer_bg.png) #fff no-repeat;
|
277 |
}
|
278 |
-
|
279 |
-
.deals_header {
|
280 |
background-size: cover;
|
281 |
height: 241px;
|
282 |
}
|
283 |
-
|
284 |
-
.deals_header .wd-table .wd-cell {
|
285 |
position: relative;
|
286 |
}
|
287 |
-
|
288 |
-
.deals_header_plugins .wd-table .wd-cell {
|
289 |
padding: 27px 10px 10px;
|
290 |
}
|
291 |
-
|
292 |
-
.deals_header_themes .wd-table .wd-cell {
|
293 |
padding: 0px 10px 10px;
|
294 |
}
|
295 |
-
|
296 |
-
.deals_header_plugins .wd-table .wd-cell:first-child {
|
297 |
padding-left: 23px;
|
298 |
width: 30%;
|
299 |
}
|
300 |
-
|
301 |
-
.deals_header_themes .wd-table .wd-cell:first-child {
|
302 |
padding-left: 23px;
|
303 |
width: 36%;
|
304 |
}
|
305 |
-
|
306 |
-
.deals_header_themes .wd-table {
|
307 |
height: 100%
|
308 |
}
|
309 |
-
|
310 |
-
.titles_wrap
|
311 |
display: inline-block;
|
312 |
}
|
313 |
-
|
314 |
-
.deals_main_title, .deals_secondary_title {
|
315 |
color: #00425A;
|
316 |
font-weight: bold;
|
317 |
line-height: 55px;
|
@@ -319,19 +271,18 @@ a:focus {
|
|
319 |
text-transform: uppercase;
|
320 |
}
|
321 |
|
322 |
-
.deals_main_title
|
323 |
font-size: 39px;
|
324 |
}
|
325 |
-
|
326 |
-
.deals_secondary_title {
|
327 |
font-size: 30px;
|
328 |
}
|
329 |
|
330 |
-
.higlight
|
331 |
color: #E5682E;
|
332 |
}
|
333 |
|
334 |
-
.deals_save
|
335 |
position: absolute;
|
336 |
right: 87px;
|
337 |
-webkit-transform: rotate(-27deg);
|
@@ -341,64 +292,54 @@ a:focus {
|
|
341 |
color: #E5682E;
|
342 |
text-transform: uppercase;
|
343 |
}
|
344 |
-
|
345 |
-
.deals_header_plugins .deals_save {
|
346 |
bottom: 37px;
|
347 |
}
|
348 |
-
|
349 |
-
.deals_header_themes .deals_save {
|
350 |
bottom: 76px;
|
351 |
}
|
352 |
-
|
353 |
-
.deal_block {
|
354 |
width: 31.2%;
|
355 |
display: inline-block;
|
356 |
vertical-align: top;
|
357 |
margin: 5px;
|
358 |
}
|
359 |
-
|
360 |
-
.deal_title {
|
361 |
text-align: center;
|
362 |
text-transform: uppercase;
|
363 |
font-size: 20px;
|
364 |
background: #FAFAFA;
|
365 |
padding: 10px 5px;
|
366 |
-
|
367 |
}
|
368 |
-
|
369 |
-
.deal_title a, .deal_title a:hover, .deal_title a:focus {
|
370 |
text-decoration: none !important;
|
371 |
color: #000 !important;
|
372 |
}
|
373 |
-
|
374 |
-
.deal_desc {
|
375 |
background: #F5F5F5;
|
376 |
padding: 10px 5px;
|
377 |
}
|
378 |
-
|
379 |
-
.deal_desc p {
|
380 |
margin-bottom: 15px;
|
381 |
}
|
382 |
|
383 |
-
.deal_desc_footer .downloads
|
384 |
float: left;
|
385 |
}
|
386 |
-
|
387 |
-
.deal_desc_footer .download_btn {
|
388 |
/*float: right;*/
|
389 |
margin-top: 10px;
|
390 |
-
|
391 |
}
|
392 |
-
|
393 |
-
.deal_desc_footer .downloads .spans span:first-child {
|
394 |
background: #26455A;
|
395 |
color: #fff;
|
396 |
text-transform: uppercase;
|
397 |
padding: 5px;
|
398 |
display: inline-block;
|
399 |
}
|
400 |
-
|
401 |
-
.deal_desc_footer .downloads .spans span:last-child {
|
402 |
background: #fff;
|
403 |
padding: 5px;
|
404 |
border-top-right-radius: 25px;
|
@@ -406,7 +347,7 @@ a:focus {
|
|
406 |
margin-left: -3px;
|
407 |
}
|
408 |
|
409 |
-
.download_btn a, .download_btn a:hover, .download_btn a:focus
|
410 |
color: #fff !important;
|
411 |
background: #E97025;
|
412 |
text-decoration: none;
|
@@ -441,11 +382,10 @@ a:focus {
|
|
441 |
overflow: hidden;
|
442 |
}
|
443 |
|
444 |
-
.get_all_deals
|
445 |
margin: 15px 0px;
|
446 |
text-align: center;
|
447 |
}
|
448 |
-
|
449 |
.get_all_deals a, .get_all_deals a:hover, .get_all_deals a:active, .get_all_deals a:focus {
|
450 |
color: #fff !important;
|
451 |
background: #E97025;
|
@@ -458,19 +398,18 @@ a:focus {
|
|
458 |
font-size: 21px;
|
459 |
}
|
460 |
|
461 |
-
#themes
|
462 |
border-top: 35px solid #F1F1F1;
|
463 |
padding-bottom: 15px;
|
464 |
}
|
465 |
|
466 |
-
.theme_block
|
467 |
width: 48%;
|
468 |
margin: 5px;
|
469 |
border: 1px solid #ECE9E9;
|
470 |
float: left;
|
471 |
}
|
472 |
-
|
473 |
-
.theme_block a, .theme_block a:hover, .theme_block a:focus {
|
474 |
display: block;
|
475 |
text-decoration: none !important;
|
476 |
background: #F7F7F7;
|
@@ -479,33 +418,32 @@ a:focus {
|
|
479 |
}
|
480 |
|
481 |
/* noteices */
|
482 |
-
.notice_wrap
|
483 |
-
|
484 |
border: 1px solid #C4C4C4;
|
485 |
width: 98%;
|
486 |
margin: 10px auto;
|
487 |
box-sizing: border-box;
|
488 |
-
|
489 |
}
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
display: block;
|
497 |
}
|
498 |
|
499 |
-
.notice_wrap .notice_txt
|
500 |
-
|
501 |
}
|
502 |
|
503 |
-
.wd-tour {
|
504 |
-
text-align: right;
|
505 |
-
}
|
506 |
|
507 |
-
.wd-tour
|
508 |
-
|
|
|
|
|
|
|
509 |
color: #fff;
|
510 |
text-decoration: none;
|
511 |
padding: 5px;
|
@@ -513,12 +451,12 @@ a:focus {
|
|
513 |
font-size: 16px;
|
514 |
}
|
515 |
|
516 |
-
.wd-start-using-button .button
|
517 |
-
|
518 |
-
|
519 |
}
|
520 |
|
521 |
-
.wd-start-using-button
|
522 |
-
|
523 |
-
|
524 |
}
|
1 |
/* general */
|
2 |
+
.wd-table{
|
3 |
display: table;
|
4 |
width: 100%;
|
5 |
}
|
6 |
+
.wd-cell{
|
|
|
7 |
display: table-cell;
|
8 |
}
|
9 |
+
.wd-valign-top{
|
|
|
10 |
vertical-align: top;
|
11 |
}
|
12 |
+
.wd-valign-middle{
|
|
|
13 |
vertical-align: middle;
|
14 |
}
|
15 |
+
.wd-valign-bottom{
|
|
|
16 |
vertical-align: bottom;
|
17 |
}
|
18 |
+
.wd-text-right{
|
|
|
19 |
text-align: right;
|
20 |
}
|
21 |
+
.wd-text-center{
|
|
|
22 |
text-align: center;
|
23 |
}
|
24 |
+
.hide{
|
|
|
25 |
display: none;
|
26 |
}
|
27 |
+
a:focus{
|
28 |
+
border: none !important;
|
29 |
+
outline: none !important;
|
30 |
+
box-shadow: none !important;
|
|
|
31 |
}
|
32 |
|
33 |
/*end general */
|
34 |
+
.wd-video_container{
|
35 |
text-align: center;
|
36 |
}
|
37 |
+
.overview_welcome{
|
|
|
38 |
background: url(img/welcome_bg.png) no-repeat;
|
39 |
margin: 21px 0px;
|
40 |
background-size: 100% 100%;
|
41 |
line-height: 28px;
|
42 |
}
|
43 |
+
.overview_welcome .wd-cell{
|
44 |
+
padding: 15px;
|
|
|
45 |
}
|
46 |
+
.overview_welcome .wd-cell:first-child{
|
47 |
+
position: relative;
|
|
|
48 |
}
|
49 |
|
50 |
+
.overview_welcome h2{
|
51 |
+
text-transform: uppercase;
|
52 |
+
font-size: 26px;
|
53 |
margin-top: 0;
|
54 |
margin-bottom: 15px;
|
55 |
+
color: #424141;
|
56 |
}
|
57 |
+
.overview_welcome img{
|
58 |
+
width: 120px;
|
59 |
+
padding-right: 100px;
|
60 |
+
padding-left: 25px;
|
|
|
61 |
}
|
62 |
+
.overview_wrap{
|
|
|
63 |
width: 935px;
|
64 |
background: #fff;
|
65 |
}
|
66 |
+
.overview_welcome .overview_welcome_text{
|
|
|
67 |
font-size: 15px;
|
68 |
+
color: #424141;
|
69 |
}
|
70 |
+
.overview_tabs:after, .deals_content:after, .deal_desc_footer:after{
|
|
|
71 |
content: "";
|
72 |
display: table;
|
73 |
clear: both;
|
74 |
}
|
75 |
+
.overview_tabs li{
|
|
|
76 |
float: left;
|
77 |
width: 16.666%;
|
78 |
}
|
79 |
|
80 |
+
.overview_tabs li a{
|
81 |
text-decoration: none !important;
|
82 |
color: #000;
|
83 |
background: #D6D6D6;
|
84 |
background: -webkit-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Safari 5.1 to 6.0 */
|
85 |
background: -o-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Opera 11.1 to 12.0 */
|
86 |
background: -moz-linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* For Firefox 3.6 to 15 */
|
87 |
+
background: linear-gradient(#D6D6D6, #D7D7D7, #D6D6D6); /* Standard syntax */
|
88 |
text-transform: uppercase;
|
89 |
display: block;
|
90 |
+
padding: 7px 10px;
|
91 |
+
text-align: center;
|
92 |
+
font-weight: bold;
|
93 |
+
border-top: 4px solid #F1F1F1;
|
94 |
position: relative;
|
95 |
+
top: -4px;
|
96 |
}
|
97 |
+
.overview_tabs li a:hover,.overview_tabs li a:active, .overview_tabs li a:focus, .overview_tab_active{
|
|
|
98 |
background: #fff !important;
|
99 |
border-top: 4px solid #2A495F !important;
|
100 |
+
|
101 |
}
|
102 |
+
#welcome, #user_guide, #support, .deals_content{
|
|
|
103 |
padding: 15px 10px;
|
104 |
background: #fff;
|
105 |
}
|
106 |
+
.plugin_feature_title{
|
|
|
107 |
font-size: 19px;
|
108 |
}
|
109 |
+
.more_features_wrap{
|
|
|
110 |
margin-top: 25px;
|
111 |
text-align: right;
|
112 |
}
|
113 |
+
.more_features, .more_features:hover, .more_features:focus{
|
|
|
114 |
color: #fff;
|
115 |
background: #00384F;
|
116 |
padding: 3px 15px;
|
117 |
text-decoration: none;
|
118 |
}
|
119 |
+
.user_guide_item{
|
|
|
120 |
margin-bottom: 19px;
|
121 |
}
|
122 |
+
.user_guide_title, .user_guide_title:hover, .user_guide_title:focus{
|
|
|
123 |
font-size: 16px;
|
124 |
color: #192D3B;
|
125 |
font-weight: bold;
|
126 |
margin-bottom: 5px;
|
127 |
+
text-decoration: none;
|
128 |
}
|
129 |
+
.user_guide_titles, .user_guide_titles:hover, .user_guide_titles:focus{
|
130 |
+
color: #192D3B;
|
131 |
+
text-decoration: none;
|
|
|
132 |
}
|
133 |
+
.user_guide_demo, .user_guide_plugin, .user_guide_support_forum, .user_guide_addons, .user_guide_faq,
|
134 |
+
.user_guide_demo:hover, .user_guide_plugin:hover, .user_guide_support_forum:hover, .user_guide_addons:hover, .user_guide_faq:hover{
|
|
|
135 |
background-color: #F5F5F5;
|
136 |
background-repeat: no-repeat;
|
137 |
background-position: right -4px center;
|
142 |
font-weight: bold;
|
143 |
text-transform: uppercase;
|
144 |
color: #192D3B;
|
145 |
+
margin-bottom: 7px;
|
146 |
display: block;
|
147 |
+
text-decoration: none;
|
148 |
}
|
149 |
+
.user_guide_demo{
|
|
|
150 |
background-image: url(img/ug-icon-1.png);
|
151 |
}
|
152 |
+
.user_guide_plugin{
|
|
|
153 |
background-image: url(img/ug-icon-2.png);
|
154 |
}
|
155 |
+
.user_guide_support_forum{
|
|
|
156 |
background-image: url(img/ug-icon-3.png);
|
157 |
}
|
158 |
+
.user_guide_addons{
|
|
|
159 |
background-image: url(img/ug-icon-4.png);
|
160 |
}
|
161 |
+
.user_guide_faq{
|
|
|
162 |
background-image: url(img/ug-icon-5.png);
|
163 |
}
|
164 |
|
165 |
+
#support .wd-support-main{
|
166 |
+
width: 800px;
|
167 |
margin: 0 auto;
|
168 |
font-size: 16px;
|
169 |
text-align: center;
|
170 |
margin-bottom: 15px;
|
171 |
+
|
172 |
}
|
173 |
+
.wd-overview-site-deatils{
|
174 |
+
width: 800px;
|
175 |
+
background: #FBFBFB;
|
176 |
+
padding: 10px;
|
177 |
+
margin: 0 auto;
|
|
|
178 |
}
|
179 |
+
.wd-overview-site-deatils h2, .wd-overview-site-deatils p{
|
180 |
+
text-align: center;
|
|
|
181 |
}
|
182 |
+
.wd-overview-site-deatils p{
|
183 |
+
font-size: 16px;
|
|
|
184 |
}
|
185 |
+
.contact_us, .contact_us:hover, .contact_us:focus{
|
|
|
186 |
display: block;
|
187 |
background: #27475D;
|
188 |
color: #fff;
|
197 |
text-transform: uppercase;
|
198 |
}
|
199 |
|
200 |
+
.support_email{
|
201 |
color: #F47A31;
|
202 |
}
|
203 |
+
.wd-site-deatils{
|
204 |
+
padding: 23px;
|
|
|
205 |
background: #f1f1f1;
|
206 |
box-sizing: border-box;
|
207 |
}
|
208 |
+
.wd-site-deatils textarea{
|
209 |
+
width: 100%;
|
|
|
210 |
}
|
211 |
+
.contact_us{
|
|
|
212 |
margin-left: auto !important;
|
213 |
margin-right: auto;
|
214 |
+
margin-top: 10px;
|
215 |
}
|
216 |
+
#wd-copy{
|
217 |
+
display: block;
|
|
|
218 |
background: #27475D;
|
219 |
color: #fff;
|
220 |
padding: 5px 8px;
|
224 |
border: 1px solid #B7B7B7;
|
225 |
cursor: pointer;
|
226 |
}
|
227 |
+
#plugins{
|
|
|
228 |
padding-bottom: 15px;
|
229 |
background: #fff;
|
230 |
}
|
231 |
|
232 |
+
.deals_header_plugins{
|
233 |
background: url(img/plugins_header_bg.png) #fff no-repeat;
|
234 |
}
|
235 |
+
.deals_header_themes{
|
|
|
236 |
background: url(img/themes_headrer_bg.png) #fff no-repeat;
|
237 |
}
|
238 |
+
.deals_header{
|
|
|
239 |
background-size: cover;
|
240 |
height: 241px;
|
241 |
}
|
242 |
+
.deals_header .wd-table .wd-cell{
|
|
|
243 |
position: relative;
|
244 |
}
|
245 |
+
.deals_header_plugins .wd-table .wd-cell{
|
|
|
246 |
padding: 27px 10px 10px;
|
247 |
}
|
248 |
+
.deals_header_themes .wd-table .wd-cell{
|
|
|
249 |
padding: 0px 10px 10px;
|
250 |
}
|
251 |
+
.deals_header_plugins .wd-table .wd-cell:first-child{
|
|
|
252 |
padding-left: 23px;
|
253 |
width: 30%;
|
254 |
}
|
255 |
+
.deals_header_themes .wd-table .wd-cell:first-child{
|
|
|
256 |
padding-left: 23px;
|
257 |
width: 36%;
|
258 |
}
|
259 |
+
.deals_header_themes .wd-table{
|
|
|
260 |
height: 100%
|
261 |
}
|
262 |
+
|
263 |
+
.titles_wrap{
|
264 |
display: inline-block;
|
265 |
}
|
266 |
+
.deals_main_title, .deals_secondary_title{
|
|
|
267 |
color: #00425A;
|
268 |
font-weight: bold;
|
269 |
line-height: 55px;
|
271 |
text-transform: uppercase;
|
272 |
}
|
273 |
|
274 |
+
.deals_main_title{
|
275 |
font-size: 39px;
|
276 |
}
|
277 |
+
.deals_secondary_title{
|
|
|
278 |
font-size: 30px;
|
279 |
}
|
280 |
|
281 |
+
.higlight{
|
282 |
color: #E5682E;
|
283 |
}
|
284 |
|
285 |
+
.deals_save{
|
286 |
position: absolute;
|
287 |
right: 87px;
|
288 |
-webkit-transform: rotate(-27deg);
|
292 |
color: #E5682E;
|
293 |
text-transform: uppercase;
|
294 |
}
|
295 |
+
.deals_header_plugins .deals_save{
|
|
|
296 |
bottom: 37px;
|
297 |
}
|
298 |
+
.deals_header_themes .deals_save{
|
|
|
299 |
bottom: 76px;
|
300 |
}
|
301 |
+
.deal_block{
|
|
|
302 |
width: 31.2%;
|
303 |
display: inline-block;
|
304 |
vertical-align: top;
|
305 |
margin: 5px;
|
306 |
}
|
307 |
+
.deal_title{
|
|
|
308 |
text-align: center;
|
309 |
text-transform: uppercase;
|
310 |
font-size: 20px;
|
311 |
background: #FAFAFA;
|
312 |
padding: 10px 5px;
|
313 |
+
line-height: 23px;
|
314 |
}
|
315 |
+
.deal_title a, .deal_title a:hover, .deal_title a:focus{
|
|
|
316 |
text-decoration: none !important;
|
317 |
color: #000 !important;
|
318 |
}
|
319 |
+
.deal_desc{
|
|
|
320 |
background: #F5F5F5;
|
321 |
padding: 10px 5px;
|
322 |
}
|
323 |
+
.deal_desc p{
|
|
|
324 |
margin-bottom: 15px;
|
325 |
}
|
326 |
|
327 |
+
.deal_desc_footer .downloads{
|
328 |
float: left;
|
329 |
}
|
330 |
+
.deal_desc_footer .download_btn{
|
|
|
331 |
/*float: right;*/
|
332 |
margin-top: 10px;
|
333 |
+
text-align: center;
|
334 |
}
|
335 |
+
.deal_desc_footer .downloads .spans span:first-child{
|
|
|
336 |
background: #26455A;
|
337 |
color: #fff;
|
338 |
text-transform: uppercase;
|
339 |
padding: 5px;
|
340 |
display: inline-block;
|
341 |
}
|
342 |
+
.deal_desc_footer .downloads .spans span:last-child{
|
|
|
343 |
background: #fff;
|
344 |
padding: 5px;
|
345 |
border-top-right-radius: 25px;
|
347 |
margin-left: -3px;
|
348 |
}
|
349 |
|
350 |
+
.download_btn a, .download_btn a:hover, .download_btn a:focus{
|
351 |
color: #fff !important;
|
352 |
background: #E97025;
|
353 |
text-decoration: none;
|
382 |
overflow: hidden;
|
383 |
}
|
384 |
|
385 |
+
.get_all_deals{
|
386 |
margin: 15px 0px;
|
387 |
text-align: center;
|
388 |
}
|
|
|
389 |
.get_all_deals a, .get_all_deals a:hover, .get_all_deals a:active, .get_all_deals a:focus {
|
390 |
color: #fff !important;
|
391 |
background: #E97025;
|
398 |
font-size: 21px;
|
399 |
}
|
400 |
|
401 |
+
#themes{
|
402 |
border-top: 35px solid #F1F1F1;
|
403 |
padding-bottom: 15px;
|
404 |
}
|
405 |
|
406 |
+
.theme_block{
|
407 |
width: 48%;
|
408 |
margin: 5px;
|
409 |
border: 1px solid #ECE9E9;
|
410 |
float: left;
|
411 |
}
|
412 |
+
.theme_block a, .theme_block a:hover, .theme_block a:focus{
|
|
|
413 |
display: block;
|
414 |
text-decoration: none !important;
|
415 |
background: #F7F7F7;
|
418 |
}
|
419 |
|
420 |
/* noteices */
|
421 |
+
.notice_wrap{
|
422 |
+
padding: 15px;
|
423 |
border: 1px solid #C4C4C4;
|
424 |
width: 98%;
|
425 |
margin: 10px auto;
|
426 |
box-sizing: border-box;
|
427 |
+
|
428 |
}
|
429 |
+
.notice_wrap .notice_title, .notice_wrap .notice_title:hover, .notice_wrap .notice_title:focus{
|
430 |
+
color: #E5682E !important;
|
431 |
+
text-decoration: none;
|
432 |
+
margin-bottom: 17px;
|
433 |
+
font-size: 20px;
|
434 |
+
display: block;
|
|
|
435 |
}
|
436 |
|
437 |
+
.notice_wrap .notice_txt{
|
438 |
+
font-size: 15px;
|
439 |
}
|
440 |
|
|
|
|
|
|
|
441 |
|
442 |
+
.wd-tour{
|
443 |
+
text-align: right;
|
444 |
+
}
|
445 |
+
.wd-tour-btn, .wd-tour-btn:hover, .wd-tour-btn:focus{
|
446 |
+
background: #F47629;
|
447 |
color: #fff;
|
448 |
text-decoration: none;
|
449 |
padding: 5px;
|
451 |
font-size: 16px;
|
452 |
}
|
453 |
|
454 |
+
.wd-start-using-button .button{
|
455 |
+
margin-left: 7px;
|
456 |
+
margin-top: 7px;
|
457 |
}
|
458 |
|
459 |
+
.wd-start-using-button{
|
460 |
+
margin-right:10px;
|
461 |
+
float: right;
|
462 |
}
|
wd/assets/css/subscribe.css
CHANGED
@@ -1,43 +1,38 @@
|
|
1 |
body {
|
2 |
color: #444;
|
3 |
-
font-family: "Open Sans",
|
4 |
line-height: 1.4em;
|
5 |
min-width: 600px;
|
6 |
}
|
7 |
|
8 |
-
.wd-subscribe
|
9 |
background: #fff;
|
10 |
border: 2px solid #E2E5EC;
|
11 |
width: 55%;
|
12 |
margin-top: 40px;
|
13 |
}
|
14 |
-
|
15 |
-
|
16 |
-
padding: 30px 92px;
|
17 |
}
|
18 |
-
|
19 |
-
|
20 |
-
text-align: center;
|
21 |
}
|
22 |
-
|
23 |
-
.imgs img {
|
24 |
vertical-align: middle;
|
25 |
width: 125px;
|
26 |
}
|
27 |
-
|
28 |
.imgs span {
|
29 |
color: #21759B;
|
30 |
font-weight: bold;
|
31 |
font-size: 52px;
|
32 |
padding: 0px 28px;
|
33 |
}
|
34 |
-
|
35 |
-
.texts {
|
36 |
margin-top: 10px;
|
37 |
margin-bottom: 25px;
|
38 |
}
|
39 |
|
40 |
-
.btns .allow_and_continue, .btns .allow_and_continue:hover, .btns .allow_and_continue:focus
|
41 |
display: inline-block;
|
42 |
background: url(img/allow&continue.png) no-repeat;
|
43 |
width: 279px;
|
@@ -45,88 +40,75 @@ body {
|
|
45 |
border: none;
|
46 |
|
47 |
}
|
48 |
-
|
49 |
-
.btns .skip, .btns .skip:hover, .btns .skip:focus {
|
50 |
margin-left: 66px;
|
51 |
display: inline-block;
|
52 |
background: url(img/skip.png) no-repeat;
|
53 |
width: 76px;
|
54 |
height: 59px;
|
55 |
}
|
56 |
-
|
57 |
-
|
58 |
-
color: #525252 !important;
|
59 |
}
|
60 |
-
|
61 |
-
.list {
|
62 |
margin-top: 15px;
|
63 |
-
|
64 |
}
|
65 |
-
|
66 |
-
.list_item {
|
67 |
display: table;
|
68 |
-
|
69 |
}
|
70 |
-
|
71 |
-
.list_item:after {
|
72 |
content: "";
|
73 |
clear: both;
|
74 |
display: table;
|
75 |
}
|
76 |
-
|
77 |
-
.list_img_wrap {
|
78 |
float: left;
|
79 |
}
|
80 |
-
|
81 |
-
.list_img_wrap img {
|
82 |
width: 27px;
|
83 |
}
|
84 |
-
|
85 |
-
.list_text_wrap {
|
86 |
margin-left: 33px;
|
87 |
float: right;
|
88 |
}
|
89 |
-
|
90 |
-
.list_title, .list_text {
|
91 |
color: #525252;
|
92 |
-
|
93 |
}
|
94 |
-
|
95 |
-
.wd_loader {
|
96 |
vertical-align: top;
|
97 |
width: 30px;
|
98 |
margin-top: 11px;
|
99 |
-
|
100 |
}
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
border-top: 1px solid rgba(204, 204, 204, 0.52);
|
106 |
}
|
107 |
-
|
108 |
.wd-footer-menu {
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
}
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
text-decoration: none;
|
122 |
-
font-size: 12px;
|
123 |
padding: 2px;
|
124 |
-
|
125 |
display: inline-block;
|
126 |
-
vertical-align: middle;
|
127 |
}
|
128 |
|
129 |
-
|
130 |
-
|
131 |
-
|
|
|
132 |
}
|
1 |
body {
|
2 |
color: #444;
|
3 |
+
font-family: "Open Sans",sans-serif;
|
4 |
line-height: 1.4em;
|
5 |
min-width: 600px;
|
6 |
}
|
7 |
|
8 |
+
.wd-subscribe{
|
9 |
background: #fff;
|
10 |
border: 2px solid #E2E5EC;
|
11 |
width: 55%;
|
12 |
margin-top: 40px;
|
13 |
}
|
14 |
+
.wd-subscribe-content{
|
15 |
+
padding: 30px 92px;
|
|
|
16 |
}
|
17 |
+
.imgs{
|
18 |
+
text-align: center;
|
|
|
19 |
}
|
20 |
+
.imgs img{
|
|
|
21 |
vertical-align: middle;
|
22 |
width: 125px;
|
23 |
}
|
|
|
24 |
.imgs span {
|
25 |
color: #21759B;
|
26 |
font-weight: bold;
|
27 |
font-size: 52px;
|
28 |
padding: 0px 28px;
|
29 |
}
|
30 |
+
.texts{
|
|
|
31 |
margin-top: 10px;
|
32 |
margin-bottom: 25px;
|
33 |
}
|
34 |
|
35 |
+
.btns .allow_and_continue, .btns .allow_and_continue:hover, .btns .allow_and_continue:focus{
|
36 |
display: inline-block;
|
37 |
background: url(img/allow&continue.png) no-repeat;
|
38 |
width: 279px;
|
40 |
border: none;
|
41 |
|
42 |
}
|
43 |
+
.btns .skip, .btns .skip:hover, .btns .skip:focus{
|
|
|
44 |
margin-left: 66px;
|
45 |
display: inline-block;
|
46 |
background: url(img/skip.png) no-repeat;
|
47 |
width: 76px;
|
48 |
height: 59px;
|
49 |
}
|
50 |
+
.permissions{
|
51 |
+
color: #525252 !important;
|
|
|
52 |
}
|
53 |
+
.list{
|
|
|
54 |
margin-top: 15px;
|
55 |
+
display:none;
|
56 |
}
|
57 |
+
.list_item{
|
|
|
58 |
display: table;
|
59 |
+
margin-bottom: 15px;
|
60 |
}
|
61 |
+
.list_item:after{
|
|
|
62 |
content: "";
|
63 |
clear: both;
|
64 |
display: table;
|
65 |
}
|
66 |
+
.list_img_wrap{
|
|
|
67 |
float: left;
|
68 |
}
|
69 |
+
.list_img_wrap img{
|
|
|
70 |
width: 27px;
|
71 |
}
|
72 |
+
.list_text_wrap{
|
|
|
73 |
margin-left: 33px;
|
74 |
float: right;
|
75 |
}
|
76 |
+
.list_title, .list_text{
|
|
|
77 |
color: #525252;
|
78 |
+
font-size: 13px;
|
79 |
}
|
80 |
+
.wd_loader{
|
|
|
81 |
vertical-align: top;
|
82 |
width: 30px;
|
83 |
margin-top: 11px;
|
84 |
+
visibility: hidden;
|
85 |
}
|
86 |
+
.wd-subscribe-footer{
|
87 |
+
text-align: center;
|
88 |
+
padding: 4px 0px;
|
89 |
+
border-top: 1px solid rgba(204, 204, 204, 0.52);
|
|
|
90 |
}
|
|
|
91 |
.wd-footer-menu {
|
92 |
+
display: inline-block;
|
93 |
+
list-style-type: none;
|
94 |
+
padding: 0;
|
95 |
+
margin: 0;
|
96 |
+
}
|
97 |
+
.wd-footer-menu li{
|
98 |
+
float: left;
|
99 |
+
}
|
100 |
+
.wd-footer-menu li, .wd-footer-menu li a{
|
101 |
+
color: rgba(62, 60, 60, 0.57) !important;
|
102 |
+
text-decoration: none;
|
103 |
+
font-size: 12px;
|
|
|
|
|
104 |
padding: 2px;
|
105 |
+
font-weight: bold;
|
106 |
display: inline-block;
|
107 |
+
vertical-align: middle;
|
108 |
}
|
109 |
|
110 |
+
|
111 |
+
.wd-footer-menu li a:hover{
|
112 |
+
color: rgba(62, 60, 60, 0.57) !important;
|
113 |
+
text-decoration: underline;
|
114 |
}
|
wd/assets/img/cfm_main_plugin.png
ADDED
Binary file
|
wd/assets/js/deactivate_popup.js
CHANGED
@@ -19,80 +19,80 @@ var btnVal = 3;
|
|
19 |
////////////////////////////////////////////////////////////////////////////////////////
|
20 |
// Public Methods //
|
21 |
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
-
function wdReady(prefix)
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
|
97 |
}
|
98 |
|
19 |
////////////////////////////////////////////////////////////////////////////////////////
|
20 |
// Public Methods //
|
21 |
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
+
function wdReady(prefix){
|
23 |
+
|
24 |
+
jQuery(document).on("click", "." + window[prefix + "WDDeactivateVars"].deactivate_class, function(){
|
25 |
+
jQuery(".wd-" + prefix + "-opacity").show();
|
26 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").show();
|
27 |
+
if(jQuery(this).attr("data-uninstall") == "1"){
|
28 |
+
btnVal = 2 ;
|
29 |
+
}
|
30 |
+
|
31 |
+
return false;
|
32 |
+
});
|
33 |
+
|
34 |
+
jQuery(document).on("change", "[name=" + prefix + "_reasons]", function(){
|
35 |
+
|
36 |
+
jQuery("." + prefix + "_additional_details_wrap").html("");
|
37 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").removeClass("wd-popup-active1 wd-popup-active2");
|
38 |
+
if(jQuery(this).val() == "reason_plugin_is_hard_to_use_technical_problems"){
|
39 |
+
|
40 |
+
additionalInfo = '<div class="wd-additional-active"><div><strong>Please describe your issue.</strong></div><br>' +
|
41 |
+
'<textarea name="' + prefix + '_additional_details" rows = "4"></textarea><br>' +
|
42 |
+
'<div>Our support will contact <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"> shortly.</div>'+
|
43 |
+
'<br><div><button class="button button-primary wd-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit support ticket</button></div></div>';
|
44 |
+
jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
|
45 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active1");
|
46 |
+
|
47 |
+
}
|
48 |
+
else if(jQuery(this).val() == "reason_free_version_limited"){
|
49 |
+
additionalInfo = '<div class="wd-additional-active">' +
|
50 |
+
'<div><strong>We believe our premium version will fit your needs.</strong></div>' +
|
51 |
+
'<div><a href="' + window[prefix + "WDDeactivateVars"].plugin_wd_url+ '" target="_blank">Try with 30 day money back guarantee.</a></div>';
|
52 |
+
|
53 |
+
jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
|
54 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active2");
|
55 |
+
}
|
56 |
+
else if(jQuery(this).val() == "reason_premium_expensive"){
|
57 |
+
additionalInfo = '<div class="wd-additional-active">' +
|
58 |
+
'<div><strong>We have a special offer for you.</strong></div>' +
|
59 |
+
'<div>Submit this form to get the offer to <input type="text" name="' + prefix + '_email" value="' + window[prefix + "WDDeactivateVars"].email + '"></div>' +
|
60 |
+
'<br><div><button class="button button-primary wd-' + prefix + '-deactivate" data-val="' + btnVal + '">Submit</button></div></div>';
|
61 |
+
|
62 |
+
jQuery("." + prefix + "_additional_details_wrap").append(additionalInfo);
|
63 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").addClass("wd-popup-active2");
|
64 |
+
}
|
65 |
+
|
66 |
+
jQuery("#wd-" + prefix + "-deactivate").hide();
|
67 |
+
jQuery("#wd-" + prefix + "-submit-and-deactivate").show();
|
68 |
+
|
69 |
+
});
|
70 |
+
jQuery(document).on("keyup", "[name=" + prefix + "_additional_details]", function(){
|
71 |
+
if(jQuery(this).val().trim() || jQuery("[name=" + prefix + "_reasons]:checked").length > 0){
|
72 |
+
jQuery("#wd-" + prefix + "-deactivate").hide();
|
73 |
+
jQuery("#wd-" + prefix + "-submit-and-deactivate").show();
|
74 |
+
}
|
75 |
+
else{
|
76 |
+
jQuery("#wd-" + prefix + "-deactivate").show();
|
77 |
+
jQuery("#wd-" + prefix + "-submit-and-deactivate").hide();
|
78 |
+
}
|
79 |
+
|
80 |
+
});
|
81 |
+
jQuery(document).on("click", ".wd-" + prefix + "-deactivate", function(){
|
82 |
+
jQuery(".wd-deactivate-popup-opacity-" + prefix).show();
|
83 |
+
if(jQuery(this).hasClass("wd-clicked") == false){
|
84 |
+
jQuery(this).addClass("wd-clicked");
|
85 |
+
jQuery("[name=" + prefix + "_submit_and_deactivate]").val(jQuery(this).attr("data-val"));
|
86 |
+
jQuery("#" + prefix + "_deactivate_form").submit();
|
87 |
+
}
|
88 |
+
return false;
|
89 |
+
});
|
90 |
+
|
91 |
+
jQuery(document).on("click", ".wd-" + prefix + "-cancel, .wd-opacity", function(){
|
92 |
+
jQuery(".wd-" + prefix + "-opacity").hide();
|
93 |
+
jQuery(".wd-" + prefix + "-deactivate-popup").hide();
|
94 |
+
return false;
|
95 |
+
});
|
96 |
|
97 |
}
|
98 |
|
wd/assets/js/overview.js
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
jQuery(document).ready(function () {
|
14 |
jQuery(".overview_content > div:not(#welcome)").hide();
|
15 |
-
jQuery(".overview_tabs li a:not(.not_tab)").click
|
16 |
jQuery(".overview_tabs li a").removeClass("overview_tab_active");
|
17 |
jQuery(this).addClass("overview_tab_active");
|
18 |
jQuery(".overview_content > div").hide();
|
@@ -20,25 +20,25 @@ jQuery(document).ready(function () {
|
|
20 |
jQuery(id).show();
|
21 |
return false;
|
22 |
});
|
23 |
-
|
24 |
// rating
|
25 |
// jQuery(".rating").each(function(){
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
// });
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
|
39 |
-
|
40 |
|
41 |
-
|
42 |
|
43 |
});
|
44 |
|
12 |
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
jQuery(document).ready(function () {
|
14 |
jQuery(".overview_content > div:not(#welcome)").hide();
|
15 |
+
jQuery(".overview_tabs li a:not(.not_tab)").on("click", function(){
|
16 |
jQuery(".overview_tabs li a").removeClass("overview_tab_active");
|
17 |
jQuery(this).addClass("overview_tab_active");
|
18 |
jQuery(".overview_content > div").hide();
|
20 |
jQuery(id).show();
|
21 |
return false;
|
22 |
});
|
23 |
+
|
24 |
// rating
|
25 |
// jQuery(".rating").each(function(){
|
26 |
+
// var rate = jQuery(this).attr("data-rating");
|
27 |
+
// jQuery("<span class='stars-container'>")
|
28 |
+
// .addClass("stars-" + rate.toString())
|
29 |
+
// .text("★★★★★")
|
30 |
+
// .appendTo(jQuery(this));
|
31 |
+
// jQuery("body").append('<style>.stars-' + rate.toString() + ':after{width:' + rate + '%;}</style>');
|
32 |
// });
|
33 |
|
34 |
+
jQuery("#wd-copy").on("click", function(){
|
35 |
+
var selector = document.querySelector('#wd-site-deatils-textarea');
|
36 |
+
selector.select();
|
37 |
+
document.execCommand('copy');
|
38 |
|
39 |
+
return false;
|
40 |
|
41 |
+
});
|
42 |
|
43 |
});
|
44 |
|
wd/assets/js/subsribe.js
CHANGED
@@ -10,15 +10,15 @@
|
|
10 |
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
// Constructor & Destructor //
|
12 |
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
jQuery(document).ready
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
-
jQuery(".allow_and_continue").click
|
20 |
-
|
21 |
-
|
22 |
});
|
23 |
});
|
24 |
|
10 |
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
// Constructor & Destructor //
|
12 |
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
jQuery(document).on("ready", function () {
|
14 |
+
jQuery(".permissions").on("click", function(){
|
15 |
+
jQuery(".list").toggle();
|
16 |
+
return false;
|
17 |
+
});
|
18 |
|
19 |
+
jQuery(".allow_and_continue").on("click", function(){
|
20 |
+
jQuery(this).css("opacity", "0.5");
|
21 |
+
jQuery(".wd_loader").css("visibility", "visible");
|
22 |
});
|
23 |
});
|
24 |
|
wd/config.php
CHANGED
@@ -1,129 +1,127 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
|
4 |
-
}
|
5 |
|
6 |
-
class DoradoWebConfig
|
7 |
-
|
8 |
-
public static $instance;
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
|
41 |
-
|
42 |
-
{
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
-
|
64 |
-
$this->
|
65 |
-
|
66 |
-
|
67 |
-
$this->
|
68 |
-
|
69 |
-
|
70 |
-
$this->
|
71 |
-
}
|
72 |
-
if (isset($options["video_youtube_id"])) {
|
73 |
-
$this->video_youtube_id = $options["video_youtube_id"];
|
74 |
-
}
|
75 |
-
if (isset($options["overview_welcome_image"])) {
|
76 |
-
$this->overview_welcome_image = $options["overview_welcome_image"];
|
77 |
-
}
|
78 |
-
if (isset($options["plugin_wd_url"])) {
|
79 |
-
$this->plugin_wd_url = $options["plugin_wd_url"];
|
80 |
-
}
|
81 |
-
if (isset($options["plugin_wd_demo_link"])) {
|
82 |
-
$this->plugin_wd_demo_link = $options["plugin_wd_demo_link"];
|
83 |
-
}
|
84 |
-
if (isset($options["plugin_wd_addons_link"])) {
|
85 |
-
$this->plugin_wd_addons_link = $options["plugin_wd_addons_link"];
|
86 |
-
}
|
87 |
-
if (isset($options["plugin_wizard_link"])) {
|
88 |
-
$this->plugin_wizard_link = $options["plugin_wizard_link"];
|
89 |
-
}
|
90 |
-
if (isset($options["after_subscribe"])) {
|
91 |
-
$this->after_subscribe = $options["after_subscribe"];
|
92 |
-
}
|
93 |
-
if (isset($options["plugin_menu_title"])) {
|
94 |
-
$this->plugin_menu_title = $options["plugin_menu_title"];
|
95 |
-
}
|
96 |
-
if (isset($options["plugin_menu_icon"])) {
|
97 |
-
$this->plugin_menu_icon = $options["plugin_menu_icon"];
|
98 |
-
}
|
99 |
-
if (isset($options["deactivate"])) {
|
100 |
-
$this->deactivate = $options["deactivate"];
|
101 |
-
}
|
102 |
-
if (isset($options["subscribe"])) {
|
103 |
-
$this->subscribe = $options["subscribe"];
|
104 |
-
}
|
105 |
-
if (isset($options["custom_post"])) {
|
106 |
-
$this->custom_post = $options["custom_post"];
|
107 |
-
}
|
108 |
-
if (isset($options["menu_capability"])) {
|
109 |
-
$this->menu_capability = $options["menu_capability"];
|
110 |
-
}
|
111 |
-
if (isset($options["menu_position"])) {
|
112 |
-
$this->menu_position = $options["menu_position"];
|
113 |
}
|
114 |
|
115 |
-
// directories
|
116 |
-
$this->wd_dir = dirname($this->plugin_main_file) . '/wd';
|
117 |
-
$this->wd_dir_includes = $this->wd_dir . '/includes';
|
118 |
-
$this->wd_dir_templates = $this->wd_dir . '/templates';
|
119 |
-
$this->wd_dir_assets = $this->wd_dir . '/assets';
|
120 |
-
$this->wd_url_css = plugins_url(plugin_basename($this->wd_dir)) . '/assets/css';
|
121 |
-
$this->wd_url_js = plugins_url(plugin_basename($this->wd_dir)) . '/assets/js';
|
122 |
-
$this->wd_url_img = plugins_url(plugin_basename($this->wd_dir)) . '/assets/img';
|
123 |
-
}
|
124 |
-
|
125 |
|
126 |
-
}
|
127 |
|
128 |
|
129 |
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
|
6 |
+
class DoradoWebConfig {
|
7 |
+
public static $instance;
|
|
|
8 |
|
9 |
+
public $prefix = null;
|
10 |
+
public $wd_plugin_id = null;
|
11 |
+
public $plugin_title = null;
|
12 |
+
public $plugin_wordpress_slug = null;
|
13 |
+
public $plugin_dir = null;
|
14 |
+
public $plugin_main_file = null;
|
15 |
+
public $description = null;
|
16 |
+
public $plugin_features = null;
|
17 |
+
public $user_guide = null;
|
18 |
+
public $overview_welcome_image = null;
|
19 |
+
public $video_youtube_id = null;
|
20 |
+
public $plugin_wd_url = null;
|
21 |
+
public $plugin_wd_demo_link = null;
|
22 |
+
public $plugin_wd_addons_link = null;
|
23 |
+
public $plugin_wizard_link = null;
|
24 |
+
public $after_subscribe = null;
|
25 |
+
public $plugin_menu_title = null;
|
26 |
+
public $plugin_menu_icon = null;
|
27 |
+
public $wd_dir = null;
|
28 |
+
public $wd_dir_includes = null;
|
29 |
+
public $wd_dir_templates = null;
|
30 |
+
public $wd_dir_assets = null;
|
31 |
+
public $wd_url_css = null;
|
32 |
+
public $wd_url_js = null;
|
33 |
+
public $wd_url_img = null;
|
34 |
+
public $deactivate = null;
|
35 |
+
public $subscribe = null;
|
36 |
+
public $custom_post = null;
|
37 |
+
public $menu_capability = null;
|
38 |
+
public $menu_position = null;
|
39 |
|
40 |
+
public function set_options( $options ){
|
|
|
41 |
|
42 |
+
if(isset( $options["prefix"] )) {
|
43 |
+
$this->prefix = $options["prefix"];
|
44 |
+
}
|
45 |
+
if(isset( $options["wd_plugin_id"] )) {
|
46 |
+
$this->wd_plugin_id = $options["wd_plugin_id"];
|
47 |
+
}
|
48 |
+
if(isset( $options["plugin_title"] )) {
|
49 |
+
$this->plugin_title = $options["plugin_title"];
|
50 |
+
}
|
51 |
+
if(isset( $options["plugin_wordpress_slug"] )) {
|
52 |
+
$this->plugin_wordpress_slug = $options["plugin_wordpress_slug"];
|
53 |
+
}
|
54 |
+
if(isset( $options["plugin_dir"] )) {
|
55 |
+
$this->plugin_dir = $options["plugin_dir"];
|
56 |
+
}
|
57 |
+
if(isset( $options["plugin_main_file"] )) {
|
58 |
+
$this->plugin_main_file = $options["plugin_main_file"];
|
59 |
+
}
|
60 |
+
|
61 |
+
if(isset( $options["description"] )) {
|
62 |
+
$this->description = $options["description"];
|
63 |
+
}
|
64 |
+
if(isset( $options["plugin_features"] )) {
|
65 |
+
$this->plugin_features = $options["plugin_features"];
|
66 |
+
}
|
67 |
+
if(isset( $options["user_guide"] )) {
|
68 |
+
$this->user_guide = $options["user_guide"];
|
69 |
+
}
|
70 |
+
if(isset( $options["video_youtube_id"] )) {
|
71 |
+
$this->video_youtube_id = $options["video_youtube_id"];
|
72 |
+
}
|
73 |
+
if(isset( $options["overview_welcome_image"] )) {
|
74 |
+
$this->overview_welcome_image = $options["overview_welcome_image"];
|
75 |
+
}
|
76 |
+
if(isset( $options["plugin_wd_url"] )) {
|
77 |
+
$this->plugin_wd_url = $options["plugin_wd_url"];
|
78 |
+
}
|
79 |
+
if(isset( $options["plugin_wd_demo_link"] )) {
|
80 |
+
$this->plugin_wd_demo_link = $options["plugin_wd_demo_link"];
|
81 |
+
}
|
82 |
+
if(isset( $options["plugin_wd_addons_link"] )) {
|
83 |
+
$this->plugin_wd_addons_link = $options["plugin_wd_addons_link"];
|
84 |
+
}
|
85 |
+
if(isset( $options["plugin_wizard_link"] )) {
|
86 |
+
$this->plugin_wizard_link = $options["plugin_wizard_link"];
|
87 |
+
}
|
88 |
+
if(isset( $options["after_subscribe"] )) {
|
89 |
+
$this->after_subscribe = $options["after_subscribe"];
|
90 |
+
}
|
91 |
+
if(isset( $options["plugin_menu_title"] )) {
|
92 |
+
$this->plugin_menu_title = $options["plugin_menu_title"];
|
93 |
+
}
|
94 |
+
if(isset( $options["plugin_menu_icon"] )) {
|
95 |
+
$this->plugin_menu_icon = $options["plugin_menu_icon"];
|
96 |
+
}
|
97 |
+
if(isset( $options["deactivate"] )) {
|
98 |
+
$this->deactivate = $options["deactivate"];
|
99 |
+
}
|
100 |
+
if(isset( $options["subscribe"] )) {
|
101 |
+
$this->subscribe = $options["subscribe"];
|
102 |
+
}
|
103 |
+
if(isset( $options["custom_post"] )) {
|
104 |
+
$this->custom_post = $options["custom_post"];
|
105 |
+
}
|
106 |
+
if(isset( $options["menu_capability"] )) {
|
107 |
+
$this->menu_capability = $options["menu_capability"];
|
108 |
+
}
|
109 |
+
if(isset( $options["menu_position"] )) {
|
110 |
+
$this->menu_position = $options["menu_position"];
|
111 |
+
}
|
112 |
|
113 |
+
// directories
|
114 |
+
$this->wd_dir = dirname( $this->plugin_main_file ) . '/wd';
|
115 |
+
$this->wd_dir_includes = $this->wd_dir . '/includes';
|
116 |
+
$this->wd_dir_templates = $this->wd_dir . '/templates';
|
117 |
+
$this->wd_dir_assets = $this->wd_dir . '/assets';
|
118 |
+
$this->wd_url_css = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/css';
|
119 |
+
$this->wd_url_js = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/js';
|
120 |
+
$this->wd_url_img = plugins_url( plugin_basename( $this->wd_dir ) ) . '/assets/img';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
}
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
+
}
|
125 |
|
126 |
|
127 |
|
wd/includes/api.php
CHANGED
@@ -1,87 +1,81 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
|
4 |
-
}
|
5 |
-
|
6 |
-
class DoradoWebApi
|
7 |
-
{
|
8 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
9 |
-
// Events //
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
12 |
-
// Constants //
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Variables //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
|
18 |
-
public $config;
|
19 |
-
public $userhash = array();
|
20 |
-
|
21 |
-
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
// Constructor & Destructor //
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
public function __construct($config = array())
|
26 |
-
{
|
27 |
-
$this->config = $config;
|
28 |
-
$this->userhash = $this->get_userhash();
|
29 |
}
|
30 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
-
// Public Methods //
|
32 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
33 |
-
|
34 |
-
|
35 |
-
public function get_remote_data($id)
|
36 |
-
{
|
37 |
-
$remote_data_path = DORADO_WEB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
|
38 |
-
$request = wp_remote_get((str_replace('_id_', $id, $remote_data_path)));
|
39 |
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
86 |
-
|
87 |
-
}
|
1 |
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
class DoradoWebApi{
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Events //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Constants //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Variables //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
|
17 |
+
public $config ;
|
18 |
+
public $userhash = array();
|
19 |
+
|
20 |
+
|
21 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
+
// Constructor & Destructor //
|
23 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
+
public function __construct( $config = array() ) {
|
25 |
+
$this->config = $config;
|
26 |
+
$this->userhash = $this->get_userhash();
|
27 |
}
|
28 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
+
// Public Methods //
|
30 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
+
|
32 |
+
|
33 |
+
public function get_remote_data( $id ) {
|
34 |
+
$remote_data_path = DORADO_WEB_API_PLUGIN_DATA_PATH . '/' . $this->userhash;
|
35 |
+
$request = wp_remote_get( ( str_replace( '_id_', $id, $remote_data_path ) ) );
|
36 |
+
|
37 |
+
if ( !is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200 ) {
|
38 |
+
return json_decode($request['body'], true);
|
39 |
+
}
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
public function get_userhash(){
|
45 |
+
$wd_options = $this->config;
|
46 |
+
$userhash = 'nohash';
|
47 |
+
if ( file_exists( $wd_options->plugin_dir . '/.keep') && is_readable( $wd_options->plugin_dir . '/.keep' ) ) {
|
48 |
+
$f = fopen( $wd_options->plugin_dir . '/.keep', 'r' );
|
49 |
+
$userhash = fgets( $f );
|
50 |
+
fclose( $f );
|
51 |
+
}
|
52 |
+
return $userhash;
|
53 |
}
|
54 |
+
|
55 |
+
public function get_hash(){
|
56 |
+
$response = wp_remote_get("https://api.web-dorado.com/hash/" . $_SERVER['REMOTE_ADDR'] . "/" . $_SERVER['HTTP_HOST']);
|
57 |
+
|
58 |
+
$response_body = ( !is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
|
59 |
+
|
60 |
+
if(is_array($response_body)){
|
61 |
+
$hash = $response_body["body"]["hash"];
|
62 |
+
}
|
63 |
+
else{
|
64 |
+
$hash = null;
|
65 |
+
}
|
66 |
+
|
67 |
+
return $hash;
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
72 |
+
// Getters & Setters //
|
73 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
74 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
75 |
+
// Private Methods //
|
76 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
77 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
78 |
+
// Listeners //
|
79 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
80 |
+
|
81 |
+
}
|
|
|
|
|
|
wd/includes/deactivate.php
CHANGED
@@ -1,181 +1,179 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
|
4 |
-
}
|
5 |
-
|
6 |
-
class DoradoWebDeactivate
|
7 |
-
{
|
8 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
9 |
-
// Events //
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
12 |
-
// Constants //
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Variables //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
public $deactivate_reasons = array();
|
18 |
-
public $config;
|
19 |
-
// Reason IDs
|
20 |
-
const REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS = "reason_plugin_is_hard_to_use_technical_problems";
|
21 |
-
const REASON_FREE_VERSION_IS_LIMITED = "reason_free_version_limited";
|
22 |
-
const REASON_PRO_EXPENSIVE = "reason_premium_expensive";
|
23 |
-
const REASON_UPGRADING_TO_PAID_VERSION = "reason_upgrading_to_paid_version";
|
24 |
-
const REASON_TEMPORARY_DEACTIVATION = "reason_temporary_deactivation";
|
25 |
-
|
26 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
27 |
-
// Constructor & Destructor //
|
28 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
-
public function __construct($config = array())
|
30 |
-
{
|
31 |
-
$this->config = $config;
|
32 |
-
$wd_options = $this->config;
|
33 |
-
|
34 |
-
$this->deactivate_reasons = array(
|
35 |
-
1 => array(
|
36 |
-
'id' => self::REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS,
|
37 |
-
'text' => __('Technical problems / hard to use', $wd_options->prefix),
|
38 |
-
),
|
39 |
-
2 => array(
|
40 |
-
'id' => self::REASON_FREE_VERSION_IS_LIMITED,
|
41 |
-
'text' => __('Plugin functionality is limited', $wd_options->prefix),
|
42 |
-
),
|
43 |
-
3 => array(
|
44 |
-
'id' => self::REASON_PRO_EXPENSIVE,
|
45 |
-
'text' => __('Premium is expensive', $wd_options->prefix),
|
46 |
-
),
|
47 |
-
4 => array(
|
48 |
-
'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
|
49 |
-
'text' => __('Upgrading to paid version', $wd_options->prefix),
|
50 |
-
),
|
51 |
-
5 => array(
|
52 |
-
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
53 |
-
'text' => __('Temporary deactivation', $wd_options->prefix),
|
54 |
-
),
|
55 |
-
);
|
56 |
-
|
57 |
-
add_action('admin_footer', array($this, 'add_deactivation_feedback_dialog_box'));
|
58 |
-
add_action('admin_init', array($this, 'submit_and_deactivate'));
|
59 |
-
|
60 |
-
|
61 |
-
add_action('admin_enqueue_scripts', array($this, 'scripts'));
|
62 |
-
|
63 |
-
|
64 |
}
|
65 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
66 |
-
// Public Methods //
|
67 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
68 |
-
public function add_deactivation_feedback_dialog_box()
|
69 |
-
{
|
70 |
-
$deactivate_reasons = $this->deactivate_reasons;
|
71 |
-
$wd_options = $this->config;
|
72 |
-
|
73 |
-
?>
|
74 |
-
<script>
|
75 |
-
jQuery(document).ready(function () {
|
76 |
-
wdReady("<?php echo $wd_options->prefix; ?>");
|
77 |
-
});
|
78 |
-
</script>
|
79 |
-
<?php
|
80 |
-
|
81 |
-
$deactivate_url =
|
82 |
-
add_query_arg(
|
83 |
-
array(
|
84 |
-
'action' => 'deactivate',
|
85 |
-
'plugin' => plugin_basename($wd_options->plugin_main_file),
|
86 |
-
'_wpnonce' => wp_create_nonce('deactivate-plugin_' . plugin_basename($wd_options->plugin_main_file))
|
87 |
-
),
|
88 |
-
admin_url('plugins.php')
|
89 |
-
);
|
90 |
-
|
91 |
-
require($wd_options->wd_dir_templates . '/display_deactivation_popup.php');
|
92 |
-
}
|
93 |
-
|
94 |
-
|
95 |
-
public function scripts()
|
96 |
-
{
|
97 |
-
$wd_options = $this->config;
|
98 |
-
wp_enqueue_style('wd-deactivate-popup', $wd_options->wd_url_css . '/deactivate_popup.css', array(), get_option($wd_options->prefix . "_version"));
|
99 |
-
wp_enqueue_script('wd-deactivate-popup', $wd_options->wd_url_js . '/deactivate_popup.js', array(), get_option($wd_options->prefix . "_version"));
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
'_wpnonce' => wp_create_nonce('deactivate-plugin_' . plugin_basename($wd_options->plugin_main_file))
|
159 |
-
),
|
160 |
-
admin_url('plugins.php')
|
161 |
-
);
|
162 |
-
echo '<script>window.location.href="' . $deactivate_url . '";</script>';
|
163 |
-
}
|
164 |
|
165 |
}
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
-
|
169 |
-
// Getters & Setters //
|
170 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
171 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
172 |
-
// Private Methods //
|
173 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
174 |
-
|
175 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
176 |
-
// Listeners //
|
177 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
178 |
-
|
179 |
-
}
|
180 |
|
181 |
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
class DoradoWebDeactivate{
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Events //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Constants //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Variables //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public $deactivate_reasons = array();
|
17 |
+
public $config;
|
18 |
+
// Reason IDs
|
19 |
+
const REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS = "reason_plugin_is_hard_to_use_technical_problems";
|
20 |
+
const REASON_FREE_VERSION_IS_LIMITED = "reason_free_version_limited";
|
21 |
+
const REASON_PRO_EXPENSIVE = "reason_premium_expensive";
|
22 |
+
const REASON_UPGRADING_TO_PAID_VERSION = "reason_upgrading_to_paid_version";
|
23 |
+
const REASON_TEMPORARY_DEACTIVATION = "reason_temporary_deactivation";
|
24 |
+
|
25 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
26 |
+
// Constructor & Destructor //
|
27 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
+
public function __construct( $config = array() ) {
|
29 |
+
$this->config = $config;
|
30 |
+
$wd_options = $this->config;
|
31 |
+
|
32 |
+
$this->deactivate_reasons = array(
|
33 |
+
1 => array(
|
34 |
+
'id' => self::REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS,
|
35 |
+
'text' => __( 'Technical problems / hard to use', $wd_options->prefix ),
|
36 |
+
),
|
37 |
+
2 => array(
|
38 |
+
'id' => self::REASON_FREE_VERSION_IS_LIMITED,
|
39 |
+
'text' => __( 'Free version is limited', $wd_options->prefix ),
|
40 |
+
),
|
41 |
+
3 => array(
|
42 |
+
'id' => self::REASON_PRO_EXPENSIVE,
|
43 |
+
'text' => __( 'Premium is expensive', $wd_options->prefix ),
|
44 |
+
),
|
45 |
+
4 => array(
|
46 |
+
'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
|
47 |
+
'text' => __( 'Upgrading to paid version', $wd_options->prefix ),
|
48 |
+
),
|
49 |
+
5 => array(
|
50 |
+
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
51 |
+
'text' => __( 'Temporary deactivation', $wd_options->prefix ),
|
52 |
+
),
|
53 |
+
);
|
54 |
+
|
55 |
+
add_action( 'admin_footer', array( $this, 'add_deactivation_feedback_dialog_box' ) );
|
56 |
+
add_action( 'admin_init', array( $this, 'submit_and_deactivate' ) );
|
57 |
+
|
58 |
+
|
59 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
|
60 |
+
|
61 |
+
|
62 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
}
|
65 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
66 |
+
// Public Methods //
|
67 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
68 |
+
public function add_deactivation_feedback_dialog_box(){
|
69 |
+
$deactivate_reasons = $this->deactivate_reasons;
|
70 |
+
$wd_options = $this->config;
|
71 |
+
|
72 |
+
?>
|
73 |
+
<script>
|
74 |
+
jQuery(document).ready(function () {
|
75 |
+
wdReady("<?php echo $wd_options->prefix; ?>");
|
76 |
+
});
|
77 |
+
</script>
|
78 |
+
<?php
|
79 |
+
|
80 |
+
$deactivate_url =
|
81 |
+
add_query_arg(
|
82 |
+
array(
|
83 |
+
'action' => 'deactivate',
|
84 |
+
'plugin' => plugin_basename( $wd_options->plugin_main_file ),
|
85 |
+
'_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
|
86 |
+
),
|
87 |
+
admin_url( 'plugins.php' )
|
88 |
+
);
|
89 |
+
|
90 |
+
require ( $wd_options->wd_dir_templates . '/display_deactivation_popup.php' );
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
public function scripts(){
|
96 |
+
$wd_options = $this->config;
|
97 |
+
wp_enqueue_style( 'wd-deactivate-popup', $wd_options->wd_url_css . '/deactivate_popup.css', array(), get_option($wd_options->prefix . "_version" ) );
|
98 |
+
wp_enqueue_script( 'wd-deactivate-popup', $wd_options->wd_url_js . '/deactivate_popup.js', array(), get_option($wd_options->prefix . "_version" ));
|
99 |
+
|
100 |
+
$admin_data = wp_get_current_user();
|
101 |
+
wp_localize_script( 'wd-deactivate-popup', $wd_options->prefix . 'WDDeactivateVars' , array(
|
102 |
+
"prefix" => $wd_options->prefix ,
|
103 |
+
"deactivate_class" => $wd_options->prefix . '_deactivate_link',
|
104 |
+
"email" => $admin_data->data->user_email,
|
105 |
+
"plugin_wd_url" => $wd_options->plugin_wd_url,
|
106 |
+
));
|
107 |
+
|
108 |
+
|
109 |
+
}
|
110 |
+
public function submit_and_deactivate(){
|
111 |
+
$wd_options = $this->config;
|
112 |
+
if( isset( $_POST[$wd_options->prefix . "_submit_and_deactivate"] ) ){
|
113 |
+
|
114 |
+
if( $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 3 ){
|
115 |
+
$api = new DoradoWebApi( $wd_options );
|
116 |
+
$hash = $api->get_hash();
|
117 |
+
if($hash != null){
|
118 |
+
$data = array();
|
119 |
+
|
120 |
+
$data["reason"] = isset($_POST[$wd_options->prefix . "_reasons"]) ? $_POST[$wd_options->prefix . "_reasons"] : "";
|
121 |
+
$data["site_url"] = site_url();
|
122 |
+
$data["plugin_id"] = $wd_options->wd_plugin_id;
|
123 |
+
|
124 |
+
$data["additional_details"] = isset($_POST[$wd_options->prefix . "_additional_details"]) ? $_POST[$wd_options->prefix . "_additional_details"] : "";
|
125 |
+
$admin_data = wp_get_current_user();
|
126 |
+
$data["email"] = isset($_POST[$wd_options->prefix . "_email"]) ? $_POST[$wd_options->prefix . "_email"] : $admin_data->data->user_email;
|
127 |
+
$user_first_name = get_user_meta( $admin_data->ID, "first_name", true );
|
128 |
+
$user_last_name = get_user_meta( $admin_data->ID, "last_name", true );
|
129 |
+
|
130 |
+
$data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
|
131 |
+
$data["hash"] = $hash;
|
132 |
+
$response = wp_remote_post( "https://api.web-dorado.com/deactivatereasons", array(
|
133 |
+
'method' => 'POST',
|
134 |
+
'timeout' => 45,
|
135 |
+
'redirection' => 5,
|
136 |
+
'httpversion' => '1.0',
|
137 |
+
'blocking' => true,
|
138 |
+
'headers' => array(),
|
139 |
+
'body' => json_encode($data),
|
140 |
+
'cookies' => array()
|
141 |
+
)
|
142 |
+
);
|
143 |
+
|
144 |
+
$response_body = (!is_wp_error($response) && isset( $response["body"] )) ? json_decode( $response["body"], true ) : null;
|
145 |
+
if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
|
146 |
+
|
147 |
+
}
|
148 |
+
}
|
149 |
+
}
|
150 |
+
if($_POST[$wd_options->prefix . "_submit_and_deactivate"] == 2 || $_POST[$wd_options->prefix . "_submit_and_deactivate"] == 1 ){
|
151 |
+
$deactivate_url =
|
152 |
+
add_query_arg(
|
153 |
+
array(
|
154 |
+
'action' => 'deactivate',
|
155 |
+
'plugin' => plugin_basename( $wd_options->plugin_main_file ),
|
156 |
+
'_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
|
157 |
+
),
|
158 |
+
admin_url( 'plugins.php' )
|
159 |
+
);
|
160 |
+
echo '<script>window.location.href="' . $deactivate_url . '";</script>';
|
161 |
+
}
|
162 |
+
|
163 |
+
}
|
164 |
+
}
|
165 |
+
|
166 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
167 |
+
// Getters & Setters //
|
168 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
169 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
170 |
+
// Private Methods //
|
171 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
172 |
+
|
173 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
174 |
+
// Listeners //
|
175 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
176 |
|
177 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
|
179 |
|
wd/includes/notices.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
-
class DoradoWebNotices
|
7 |
-
|
8 |
protected $promo_link = '';
|
9 |
|
10 |
public $config;
|
@@ -12,89 +12,85 @@ class DoradoWebNotices
|
|
12 |
public $notice_spam_max = 2;
|
13 |
|
14 |
// Basic actions to run
|
15 |
-
public function __construct($config = array())
|
16 |
-
{
|
17 |
$this->config = $config;
|
18 |
// Runs the admin notice ignore function incase a dismiss button has been clicked
|
19 |
-
add_action('admin_init', array($this, 'admin_notice_ignore'));
|
20 |
// Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
|
21 |
-
add_action('admin_init', array($this, 'admin_notice_temp_ignore'));
|
22 |
-
add_action('admin_notices', array($this, 'wd_admin_notices'));
|
23 |
}
|
24 |
|
25 |
// Checks to ensure notices aren't disabled and the user has the correct permissions.
|
26 |
-
public function wd_admin_notice()
|
27 |
-
|
28 |
-
$wd_options = $this->config;
|
29 |
$settings = get_option($wd_options->prefix . '_admin_notice');
|
30 |
-
if (!isset($settings['disable_admin_notices']) || (isset($settings['disable_admin_notices']) && $settings['disable_admin_notices'] == 0)) {
|
31 |
-
if (current_user_can('manage_options')) {
|
32 |
return true;
|
33 |
}
|
34 |
}
|
35 |
-
|
36 |
return false;
|
37 |
}
|
38 |
|
39 |
// Primary notice function that can be called from an outside function sending necessary variables
|
40 |
-
public function admin_notice($admin_notices)
|
41 |
-
|
42 |
-
$wd_options = $this->config;
|
43 |
// Check options
|
44 |
-
if (!$this->wd_admin_notice()) {
|
45 |
return false;
|
46 |
}
|
47 |
-
foreach ($admin_notices as $slug => $admin_notice) {
|
48 |
// Call for spam protection
|
49 |
-
if ($this->anti_notice_spam()) {
|
50 |
return false;
|
51 |
}
|
52 |
|
53 |
// Check for proper page to display on
|
54 |
-
if (isset($admin_notices[$slug]['pages']) && is_array($admin_notices[$slug]['pages'])) {
|
55 |
-
if (!$this->admin_notice_pages($admin_notices[$slug]['pages'])) {
|
56 |
return false;
|
57 |
}
|
58 |
}
|
59 |
|
60 |
// Check for required fields
|
61 |
-
if (!$this->required_fields($admin_notices[$slug])) {
|
62 |
|
63 |
// Get the current date then set start date to either passed value or current date value and add interval
|
64 |
-
$current_date = current_time("n/j/Y");
|
65 |
-
$start = (isset($admin_notices[$slug]['start']) ? $admin_notices[$slug]['start'] : $current_date);
|
66 |
-
$start = date("n/j/Y", strtotime($start));
|
67 |
-
$date_array = explode('/', $start);
|
68 |
-
$interval = (isset($admin_notices[$slug]['int']) ? $admin_notices[$slug]['int'] : 0);
|
69 |
|
70 |
$date_array[1] += $interval;
|
71 |
-
$start = date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
|
72 |
|
73 |
// This is the main notices storage option
|
74 |
-
$admin_notices_option = get_option($wd_options->prefix . '_admin_notice', array());
|
75 |
// Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
|
76 |
-
if (!array_key_exists($slug, $admin_notices_option)) {
|
77 |
$admin_notices_option[$slug]['start'] = $start;
|
78 |
$admin_notices_option[$slug]['int'] = $interval;
|
79 |
-
update_option($wd_options->prefix . '_admin_notice', $admin_notices_option);
|
80 |
}
|
81 |
|
82 |
// Sanity check to ensure we have accurate information
|
83 |
// New date information will not overwrite old date information
|
84 |
-
$admin_display_check = (isset($admin_notices_option[$slug]['dismissed']) ? $admin_notices_option[$slug]['dismissed'] : 0);
|
85 |
-
$admin_display_start = (isset($admin_notices_option[$slug]['start']) ? $admin_notices_option[$slug]['start'] : $start);
|
86 |
-
$admin_display_interval = (isset($admin_notices_option[$slug]['int']) ? $admin_notices_option[$slug]['int'] : $interval);
|
87 |
-
$admin_display_msg = (isset($admin_notices[$slug]['msg']) ? $admin_notices[$slug]['msg'] : '');
|
88 |
-
$admin_display_title = (isset($admin_notices[$slug]['title']) ? $admin_notices[$slug]['title'] : '');
|
89 |
-
$admin_display_link = (isset($admin_notices[$slug]['link']) ? $admin_notices[$slug]['link'] : '');
|
90 |
$output_css = false;
|
91 |
|
92 |
// Ensure the notice hasn't been hidden and that the current date is after the start date
|
93 |
-
if ($admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date)) {
|
94 |
|
95 |
// Get remaining query string
|
96 |
-
$query_str = (isset($admin_notices[$slug]['later_link']) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg($wd_options->prefix . '_admin_notice_ignore', $slug)));
|
97 |
-
if (strpos($slug, 'promo') ===
|
98 |
// Admin notice display output
|
99 |
echo '<div class="update-nag wd-admin-notice">
|
100 |
<div class="wd-notice-logo" style="background-image: url(' . $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png);"></div>
|
@@ -103,7 +99,8 @@ class DoradoWebNotices
|
|
103 |
<ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
|
104 |
<a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
|
105 |
</div>';
|
106 |
-
}
|
|
|
107 |
echo '<div class="admin-notice-promo">';
|
108 |
echo $admin_display_msg;
|
109 |
echo '<ul class="notice-body-promo blue">
|
@@ -115,119 +112,110 @@ class DoradoWebNotices
|
|
115 |
$this->notice_spam += 1;
|
116 |
$output_css = true;
|
117 |
}
|
118 |
-
if ($output_css) {
|
119 |
-
wp_enqueue_style($wd_options->prefix . '-admin-notices', $wd_options->wd_url_css . '/notices.css', array(), get_option($wd_options->prefix . "_version"));
|
120 |
}
|
121 |
}
|
122 |
}
|
123 |
}
|
124 |
|
125 |
// Spam protection check
|
126 |
-
public function anti_notice_spam()
|
127 |
-
|
128 |
-
if ($this->notice_spam >= $this->notice_spam_max) {
|
129 |
return true;
|
130 |
}
|
131 |
-
|
132 |
return false;
|
133 |
}
|
134 |
|
135 |
// Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
|
136 |
-
public function admin_notice_ignore()
|
137 |
-
|
138 |
-
$wd_options = $this->config;
|
139 |
// If user clicks to ignore the notice, update the option to not show it again
|
140 |
-
if (isset($_GET[$wd_options->prefix . '_admin_notice_ignore'])) {
|
141 |
-
$admin_notices_option = get_option($wd_options->prefix . '_admin_notice', array());
|
142 |
$admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
|
143 |
-
update_option($wd_options->prefix . '_admin_notice', $admin_notices_option);
|
144 |
-
$query_str = remove_query_arg($wd_options->prefix . '_admin_notice_ignore');
|
145 |
-
wp_redirect($query_str);
|
146 |
exit;
|
147 |
}
|
148 |
}
|
149 |
|
150 |
// Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
|
151 |
-
public function admin_notice_temp_ignore()
|
152 |
-
|
153 |
-
$wd_options = $this->config;
|
154 |
// If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
|
155 |
-
if (isset($_GET[$wd_options->prefix . '_admin_notice_temp_ignore'])) {
|
156 |
-
$admin_notices_option = get_option($wd_options->prefix . '_admin_notice', array());
|
157 |
-
$current_date = current_time("n/j/Y");
|
158 |
-
$date_array = explode('/', $current_date);
|
159 |
$interval = (isset($_GET['wd_int']) ? $_GET['wd_int'] : 14);
|
160 |
$date_array[1] += $interval;
|
161 |
-
$new_start = date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
|
162 |
|
163 |
$admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['start'] = $new_start;
|
164 |
$admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['dismissed'] = 0;
|
165 |
-
update_option($wd_options->prefix . '_admin_notice', $admin_notices_option);
|
166 |
-
$query_str = remove_query_arg(array($wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int'));
|
167 |
-
wp_redirect($query_str);
|
168 |
exit;
|
169 |
}
|
170 |
}
|
171 |
|
172 |
-
public function admin_notice_pages($pages)
|
173 |
-
|
174 |
-
$
|
175 |
-
foreach ($pages as $key => $page) {
|
176 |
if (is_array($page)) {
|
177 |
-
if (isset($_GET['page']) && $_GET['page'] == $page[0] && isset($_GET['tab']) && $_GET['tab'] == $page[1]) {
|
178 |
return true;
|
179 |
}
|
180 |
-
}
|
181 |
-
|
|
|
182 |
return true;
|
183 |
}
|
184 |
-
if (get_current_screen()->id === $page) {
|
185 |
return true;
|
186 |
}
|
187 |
-
if (isset($_GET['page']) && $_GET['page'] == $page) {
|
188 |
return true;
|
189 |
}
|
190 |
}
|
191 |
-
|
192 |
return false;
|
193 |
}
|
194 |
}
|
195 |
|
196 |
// Required fields check
|
197 |
-
public function required_fields($fields)
|
198 |
-
|
199 |
-
if (!isset($fields['msg']) || (isset($fields['msg']) && empty($fields['msg']))) {
|
200 |
return true;
|
201 |
}
|
202 |
-
if (!isset($fields['title']) || (isset($fields['title']) && empty($fields['title']))) {
|
203 |
return true;
|
204 |
}
|
205 |
-
|
206 |
return false;
|
207 |
}
|
208 |
|
209 |
// Special parameters function that is to be used in any extension of this class
|
210 |
-
public function special_parameters($admin_notices)
|
211 |
-
{
|
212 |
// Intentionally left blank
|
213 |
}
|
214 |
|
215 |
-
public function wd_admin_notices()
|
216 |
-
|
217 |
-
$
|
218 |
-
$
|
219 |
-
$
|
220 |
-
$promo_close = add_query_arg(array($wd_options->prefix . '_admin_notice_ignore' => 'ecommerce_promo'));
|
221 |
|
222 |
$notices['two_week_review'] = array(
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
<li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
|
227 |
<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
|
228 |
<li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
|
229 |
-
|
230 |
-
|
231 |
);
|
232 |
|
233 |
$this->admin_notice($notices);
|
1 |
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) {
|
3 |
exit;
|
4 |
}
|
5 |
|
6 |
+
class DoradoWebNotices {
|
7 |
+
|
8 |
protected $promo_link = '';
|
9 |
|
10 |
public $config;
|
12 |
public $notice_spam_max = 2;
|
13 |
|
14 |
// Basic actions to run
|
15 |
+
public function __construct( $config = array() ) {
|
|
|
16 |
$this->config = $config;
|
17 |
// Runs the admin notice ignore function incase a dismiss button has been clicked
|
18 |
+
add_action( 'admin_init', array( $this, 'admin_notice_ignore' ) );
|
19 |
// Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
|
20 |
+
add_action( 'admin_init', array( $this, 'admin_notice_temp_ignore' ) );
|
21 |
+
add_action( 'admin_notices', array( $this, 'wd_admin_notices' ) );
|
22 |
}
|
23 |
|
24 |
// Checks to ensure notices aren't disabled and the user has the correct permissions.
|
25 |
+
public function wd_admin_notice() {
|
26 |
+
$wd_options = $this->config;
|
|
|
27 |
$settings = get_option($wd_options->prefix . '_admin_notice');
|
28 |
+
if ( !isset( $settings['disable_admin_notices'] ) || ( isset( $settings['disable_admin_notices'] ) && $settings['disable_admin_notices'] == 0 ) ) {
|
29 |
+
if ( current_user_can( 'manage_options' ) ) {
|
30 |
return true;
|
31 |
}
|
32 |
}
|
|
|
33 |
return false;
|
34 |
}
|
35 |
|
36 |
// Primary notice function that can be called from an outside function sending necessary variables
|
37 |
+
public function admin_notice( $admin_notices ) {
|
38 |
+
$wd_options = $this->config;
|
|
|
39 |
// Check options
|
40 |
+
if ( !$this->wd_admin_notice() ) {
|
41 |
return false;
|
42 |
}
|
43 |
+
foreach ( $admin_notices as $slug => $admin_notice ) {
|
44 |
// Call for spam protection
|
45 |
+
if ( $this->anti_notice_spam() ) {
|
46 |
return false;
|
47 |
}
|
48 |
|
49 |
// Check for proper page to display on
|
50 |
+
if (isset( $admin_notices[$slug]['pages']) && is_array( $admin_notices[$slug]['pages'])) {
|
51 |
+
if ( !$this->admin_notice_pages( $admin_notices[$slug]['pages'] ) ) {
|
52 |
return false;
|
53 |
}
|
54 |
}
|
55 |
|
56 |
// Check for required fields
|
57 |
+
if ( !$this->required_fields( $admin_notices[$slug] ) ) {
|
58 |
|
59 |
// Get the current date then set start date to either passed value or current date value and add interval
|
60 |
+
$current_date = current_time( "n/j/Y" );
|
61 |
+
$start = ( isset( $admin_notices[$slug]['start'] ) ? $admin_notices[$slug]['start'] : $current_date );
|
62 |
+
$start = date( "n/j/Y", strtotime( $start ) );
|
63 |
+
$date_array = explode( '/', $start );
|
64 |
+
$interval = ( isset( $admin_notices[$slug]['int'] ) ? $admin_notices[$slug]['int'] : 0 );
|
65 |
|
66 |
$date_array[1] += $interval;
|
67 |
+
$start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
|
68 |
|
69 |
// This is the main notices storage option
|
70 |
+
$admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
|
71 |
// Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
|
72 |
+
if ( !array_key_exists( $slug, $admin_notices_option ) ) {
|
73 |
$admin_notices_option[$slug]['start'] = $start;
|
74 |
$admin_notices_option[$slug]['int'] = $interval;
|
75 |
+
update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
|
76 |
}
|
77 |
|
78 |
// Sanity check to ensure we have accurate information
|
79 |
// New date information will not overwrite old date information
|
80 |
+
$admin_display_check = ( isset( $admin_notices_option[$slug]['dismissed'] ) ? $admin_notices_option[$slug]['dismissed'] : 0 );
|
81 |
+
$admin_display_start = ( isset( $admin_notices_option[$slug]['start'] ) ? $admin_notices_option[$slug]['start'] : $start );
|
82 |
+
$admin_display_interval = ( isset($admin_notices_option[$slug]['int'] ) ? $admin_notices_option[$slug]['int'] : $interval );
|
83 |
+
$admin_display_msg = ( isset($admin_notices[$slug]['msg'] ) ? $admin_notices[$slug]['msg'] : '' );
|
84 |
+
$admin_display_title = ( isset($admin_notices[$slug]['title'] ) ? $admin_notices[$slug]['title'] : '' );
|
85 |
+
$admin_display_link = ( isset( $admin_notices[$slug]['link'] ) ? $admin_notices[$slug]['link'] : '' );
|
86 |
$output_css = false;
|
87 |
|
88 |
// Ensure the notice hasn't been hidden and that the current date is after the start date
|
89 |
+
if ( $admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date ) ) {
|
90 |
|
91 |
// Get remaining query string
|
92 |
+
$query_str = ( isset( $admin_notices[$slug]['later_link'] ) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg( $wd_options->prefix . '_admin_notice_ignore', $slug ) ) );
|
93 |
+
if ( strpos($slug, 'promo' ) === FALSE ) {
|
94 |
// Admin notice display output
|
95 |
echo '<div class="update-nag wd-admin-notice">
|
96 |
<div class="wd-notice-logo" style="background-image: url(' . $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png);"></div>
|
99 |
<ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
|
100 |
<a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
|
101 |
</div>';
|
102 |
+
}
|
103 |
+
else {
|
104 |
echo '<div class="admin-notice-promo">';
|
105 |
echo $admin_display_msg;
|
106 |
echo '<ul class="notice-body-promo blue">
|
112 |
$this->notice_spam += 1;
|
113 |
$output_css = true;
|
114 |
}
|
115 |
+
if ( $output_css ) {
|
116 |
+
wp_enqueue_style( $wd_options->prefix . '-admin-notices', $wd_options->wd_url_css . '/notices.css', array(), get_option($wd_options->prefix . "_version" ) );
|
117 |
}
|
118 |
}
|
119 |
}
|
120 |
}
|
121 |
|
122 |
// Spam protection check
|
123 |
+
public function anti_notice_spam() {
|
124 |
+
if ( $this->notice_spam >= $this->notice_spam_max ) {
|
|
|
125 |
return true;
|
126 |
}
|
|
|
127 |
return false;
|
128 |
}
|
129 |
|
130 |
// Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
|
131 |
+
public function admin_notice_ignore() {
|
132 |
+
$wd_options = $this->config;
|
|
|
133 |
// If user clicks to ignore the notice, update the option to not show it again
|
134 |
+
if ( isset( $_GET[$wd_options->prefix . '_admin_notice_ignore'] ) ) {
|
135 |
+
$admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
|
136 |
$admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
|
137 |
+
update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
|
138 |
+
$query_str = remove_query_arg( $wd_options->prefix . '_admin_notice_ignore' );
|
139 |
+
wp_redirect( $query_str );
|
140 |
exit;
|
141 |
}
|
142 |
}
|
143 |
|
144 |
// Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
|
145 |
+
public function admin_notice_temp_ignore() {
|
146 |
+
$wd_options = $this->config;
|
|
|
147 |
// If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
|
148 |
+
if ( isset( $_GET[$wd_options->prefix . '_admin_notice_temp_ignore'] ) ) {
|
149 |
+
$admin_notices_option = get_option( $wd_options->prefix . '_admin_notice', array() );
|
150 |
+
$current_date = current_time( "n/j/Y" );
|
151 |
+
$date_array = explode( '/', $current_date );
|
152 |
$interval = (isset($_GET['wd_int']) ? $_GET['wd_int'] : 14);
|
153 |
$date_array[1] += $interval;
|
154 |
+
$new_start = date( "n/j/Y", mktime( 0, 0, 0, $date_array[0], $date_array[1], $date_array[2] ) );
|
155 |
|
156 |
$admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['start'] = $new_start;
|
157 |
$admin_notices_option[$_GET[$wd_options->prefix . '_admin_notice_temp_ignore']]['dismissed'] = 0;
|
158 |
+
update_option( $wd_options->prefix . '_admin_notice', $admin_notices_option );
|
159 |
+
$query_str = remove_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore', 'wd_int' ) );
|
160 |
+
wp_redirect( $query_str );
|
161 |
exit;
|
162 |
}
|
163 |
}
|
164 |
|
165 |
+
public function admin_notice_pages($pages) {
|
166 |
+
$wd_options = $this->config;
|
167 |
+
foreach ( $pages as $key => $page ) {
|
|
|
168 |
if (is_array($page)) {
|
169 |
+
if ( isset( $_GET['page'] ) && $_GET['page'] == $page[0] && isset($_GET['tab']) && $_GET['tab'] == $page[1] ) {
|
170 |
return true;
|
171 |
}
|
172 |
+
}
|
173 |
+
else {
|
174 |
+
if ( $page == 'all' ) {
|
175 |
return true;
|
176 |
}
|
177 |
+
if ( get_current_screen()->id === $page ) {
|
178 |
return true;
|
179 |
}
|
180 |
+
if ( isset($_GET['page']) && $_GET['page'] == $page ) {
|
181 |
return true;
|
182 |
}
|
183 |
}
|
|
|
184 |
return false;
|
185 |
}
|
186 |
}
|
187 |
|
188 |
// Required fields check
|
189 |
+
public function required_fields( $fields ) {
|
190 |
+
if ( !isset( $fields['msg'] ) || ( isset($fields['msg'] ) && empty( $fields['msg'] ) ) ) {
|
|
|
191 |
return true;
|
192 |
}
|
193 |
+
if ( !isset( $fields['title'] ) || ( isset( $fields['title'] ) && empty( $fields['title'] ) ) ) {
|
194 |
return true;
|
195 |
}
|
|
|
196 |
return false;
|
197 |
}
|
198 |
|
199 |
// Special parameters function that is to be used in any extension of this class
|
200 |
+
public function special_parameters($admin_notices) {
|
|
|
201 |
// Intentionally left blank
|
202 |
}
|
203 |
|
204 |
+
public function wd_admin_notices() {
|
205 |
+
$wd_options = $this->config;
|
206 |
+
$two_week_review_ignore = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'two_week_review' ) );
|
207 |
+
$two_week_review_temp = add_query_arg( array( $wd_options->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14 ) );
|
208 |
+
$promo_close = add_query_arg( array( $wd_options->prefix . '_admin_notice_ignore' => 'ecommerce_promo' ) );
|
|
|
209 |
|
210 |
$notices['two_week_review'] = array(
|
211 |
+
'title' => __('Leave A Review?', $wd_options->prefix),
|
212 |
+
'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $wd_options->prefix), $wd_options->plugin_title),
|
213 |
+
'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/plugin/' . $wd_options->plugin_wordpress_slug . '/reviews?filter=5&rate=5#new-post" target="_blank">' . __('Sure! I\'d love to!', $wd_options->prefix) . '</a></li>
|
214 |
<li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $wd_options->prefix) . '</a></li>
|
215 |
<li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $wd_options->prefix) . '</a></li>
|
216 |
<li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $wd_options->prefix) . '</a></li>',
|
217 |
+
'later_link' => $two_week_review_temp,
|
218 |
+
'int' => 14
|
219 |
);
|
220 |
|
221 |
$this->admin_notice($notices);
|
wd/includes/overview.php
CHANGED
@@ -1,326 +1,312 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
|
4 |
-
}
|
5 |
-
|
6 |
-
class DoradoWebOverview
|
7 |
-
{
|
8 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
9 |
-
// Events //
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
12 |
-
// Constants //
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Variables //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
public $config;
|
18 |
-
private $tabs = array();
|
19 |
-
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
// Constructor & Destructor //
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
public function __construct($config = array())
|
24 |
-
{
|
25 |
-
$this->config = $config;
|
26 |
-
$wd_options = $this->config;
|
27 |
-
$this->tabs = array(
|
28 |
-
'welcome' => array(
|
29 |
-
'name' => __("Welcome", $wd_options->prefix),
|
30 |
-
'view' => array($this, 'wd_overview_welcome')
|
31 |
-
),
|
32 |
-
'user_guide' => array(
|
33 |
-
'name' => __("User Guide", $wd_options->prefix),
|
34 |
-
'view' => array($this, 'wd_overview_user_guide')
|
35 |
-
),
|
36 |
-
'deals' => array(
|
37 |
-
'name' => __('Deals', $wd_options->prefix),
|
38 |
-
'view' => array($this, 'wd_overview_deals')
|
39 |
-
),
|
40 |
-
'support' => array(
|
41 |
-
'name' => __("Support", $wd_options->prefix),
|
42 |
-
'view' => array($this, 'wd_overview_support')
|
43 |
-
),
|
44 |
-
'https://web-dorado.com/support/submit-your-idea.html' => array(
|
45 |
-
'name' => __("Submit Your Idea", $wd_options->prefix),
|
46 |
-
'view' => false
|
47 |
-
),
|
48 |
-
'https://wordpress.org/support/plugin/' . $wd_options->plugin_wordpress_slug => array(
|
49 |
-
'name' => __("Forum", $wd_options->prefix),
|
50 |
-
'view' => false
|
51 |
-
)
|
52 |
-
);
|
53 |
-
|
54 |
-
|
55 |
-
}
|
56 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
57 |
-
// Public Methods //
|
58 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
-
public function display_overview_page()
|
60 |
-
{
|
61 |
-
$wd_options = $this->config;
|
62 |
-
$tabs = $this->tabs;
|
63 |
-
$start_using_url = "";
|
64 |
-
if (!empty($this->config->custom_post)) {
|
65 |
-
if (strpos($this->config->custom_post, 'post_type', 0) !== false) {
|
66 |
-
$start_using_url = admin_url($this->config->custom_post);
|
67 |
-
} else {
|
68 |
-
$start_using_url = menu_page_url($this->config->custom_post, false);
|
69 |
-
}
|
70 |
-
}
|
71 |
-
require_once($wd_options->wd_dir_templates . "/display_overview.php");
|
72 |
-
}
|
73 |
-
|
74 |
-
public function wd_overview_welcome()
|
75 |
-
{
|
76 |
-
$wd_options = $this->config;
|
77 |
-
//http://api.wordpress.org/plugins/info/1.0/wd-google-maps
|
78 |
-
require_once($wd_options->wd_dir_templates . "/display_overview_welcome.php");
|
79 |
-
}
|
80 |
-
|
81 |
-
public function wd_overview_user_guide()
|
82 |
-
{
|
83 |
-
$wd_options = $this->config;
|
84 |
-
$user_guide = $wd_options->user_guide;
|
85 |
-
require_once($wd_options->wd_dir_templates . "/display_overview_user_guide.php");
|
86 |
-
}
|
87 |
-
|
88 |
-
public function wd_overview_deals()
|
89 |
-
{
|
90 |
-
|
91 |
-
$wd_options = $this->config;
|
92 |
-
$plugins = array(
|
93 |
-
"form-maker" => array(
|
94 |
-
'title' => 'Form Maker',
|
95 |
-
'text' => __('Wordpress form builder plugin', $wd_options->prefix),
|
96 |
-
'content' => __('Form Maker is a modern and advanced tool for creating WordPress forms easily and fast.', $wd_options->prefix),
|
97 |
-
'href' => 'https://web-dorado.com/products/wordpress-form.html'
|
98 |
-
),
|
99 |
-
"photo-gallery" => array(
|
100 |
-
'title' => 'Photo Gallery',
|
101 |
-
'text' => __('WordPress Photo Gallery plugin', $wd_options->prefix),
|
102 |
-
'content' => __('Photo Gallery is a fully responsive WordPress Gallery plugin with advanced functionality.', $wd_options->prefix),
|
103 |
-
'href' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin.html'
|
104 |
-
),
|
105 |
-
"event-calendar-wd" => array(
|
106 |
-
'title' => 'Event Calendar WD',
|
107 |
-
'text' => __('WordPress calendar plugin', $wd_options->prefix),
|
108 |
-
'content' => __('Organize and publish your events in an easy and elegant way using Event Calendar WD.', $wd_options->prefix),
|
109 |
-
'href' => 'https://web-dorado.com/products/wordpress-event-calendar-wd.html'
|
110 |
-
),
|
111 |
-
"wd-google-maps" => array(
|
112 |
-
'title' => 'WD Google Maps',
|
113 |
-
'text' => __('WD Google Maps plugin', $wd_options->prefix),
|
114 |
-
'content' => __('Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.', $wd_options->prefix),
|
115 |
-
'href' => 'https://web-dorado.com/products/wordpress-google-maps-plugin.html'
|
116 |
-
),
|
117 |
-
"slider-wd" => array(
|
118 |
-
'title' => 'Slider WD',
|
119 |
-
'text' => __('WordPress slider plugin', $wd_options->prefix),
|
120 |
-
'content' => __('Create responsive, highly configurable sliders with various effects for your WordPress site.', $wd_options->prefix),
|
121 |
-
'href' => 'https://web-dorado.com/products/wordpress-slider-plugin.html'
|
122 |
-
),
|
123 |
-
"spider-event-calendar" => array(
|
124 |
-
'title' => 'Spider Calendar',
|
125 |
-
'text' => __('WordPress event calendar plugin', $wd_options->prefix),
|
126 |
-
'content' => __('Spider Event Calendar is a highly configurable product which allows you to have multiple organized events.', $wd_options->prefix),
|
127 |
-
'href' => 'https://web-dorado.com/products/wordpress-calendar.html'
|
128 |
-
),
|
129 |
-
"wd-instagram-feed" => array(
|
130 |
-
'title' => 'Instagram Feed WD',
|
131 |
-
'text' => __('WordPress Instagram Feed plugin', $wd_options->prefix),
|
132 |
-
'content' => __('WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website.', $wd_options->prefix),
|
133 |
-
'href' => 'https://web-dorado.com/products/wordpress-instagram-feed-wd.html'
|
134 |
-
),
|
135 |
-
);
|
136 |
-
unset($plugins[$wd_options->plugin_wordpress_slug]);
|
137 |
-
|
138 |
-
// foreach ( $plugins as $wp_slug => &$plugin ){
|
139 |
-
// $wp_data = $this->
|
140 |
-
//remote_get($wp_slug);
|
141 |
-
// $plugin["downloaded"] = $wp_data["downloaded"];
|
142 |
-
// $plugin["rating"] = $wp_data["rating"];
|
143 |
-
// }
|
144 |
-
|
145 |
-
$themes = array(
|
146 |
-
"business_elite" => array(
|
147 |
-
'title' => 'Business Elite Theme',
|
148 |
-
'href' => 'https://web-dorado.com/wordpress-themes/business-elite.html'
|
149 |
-
),
|
150 |
-
"portfolio_gallery" => array(
|
151 |
-
'title' => 'Portfolio Gallery Theme',
|
152 |
-
'href' => 'https://web-dorado.com/wordpress-themes/portfolio-gallery.html'
|
153 |
-
),
|
154 |
-
"sauron" => array(
|
155 |
-
'title' => 'Sauron Theme',
|
156 |
-
'href' => 'https://web-dorado.com/wordpress-themes/sauron.html'
|
157 |
-
),
|
158 |
-
"business_world" => array(
|
159 |
-
'title' => 'Business World Theme',
|
160 |
-
'href' => 'https://web-dorado.com/wordpress-themes/business-world.html'
|
161 |
-
),
|
162 |
-
);
|
163 |
-
|
164 |
-
require_once($wd_options->wd_dir_templates . "/display_overview_deals.php");
|
165 |
}
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
$
|
184 |
-
|
185 |
-
$
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
// Get PHP Max Post Size
|
215 |
-
if (ini_get('post_max_size'))
|
216 |
-
$post_max = ini_get('post_max_size');
|
217 |
-
else
|
218 |
-
$post_max = __('N/A', $wd_options->prefix);
|
219 |
-
$server_info["PHP Max Post Size"] = $post_max;
|
220 |
-
|
221 |
-
// Get PHP Max execution time
|
222 |
-
if (ini_get('max_execution_time'))
|
223 |
-
$max_execute = ini_get('max_execution_time');
|
224 |
-
else
|
225 |
-
$max_execute = __('N/A', $wd_options->prefix);
|
226 |
-
$server_info["PHP Max Script Execute Time"] = $max_execute;
|
227 |
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
$
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
else
|
240 |
-
$memory_usage = __('N/A', $wd_options->prefix);
|
241 |
-
$server_info["Memory usage"] = $memory_usage;
|
242 |
-
|
243 |
-
// required for EXIF read
|
244 |
-
if (is_callable('exif_read_data'))
|
245 |
-
$exif = __('Yes', $wd_options->prefix) . " (V" . substr(phpversion('exif'), 0, 4) . ")";
|
246 |
-
else
|
247 |
-
$exif = __('No', $wd_options->prefix);
|
248 |
-
$server_info["PHP Exif support"] = $exif;
|
249 |
-
|
250 |
-
// required for meta data
|
251 |
-
if (is_callable('iptcparse'))
|
252 |
-
$iptc = __('Yes', $wd_options->prefix);
|
253 |
-
else
|
254 |
-
$iptc = __('No', $wd_options->prefix);
|
255 |
-
$server_info["PHP IPTC support"] = $iptc;
|
256 |
-
|
257 |
-
// required for meta data
|
258 |
-
if (is_callable('xml_parser_create'))
|
259 |
-
$xml = __('Yes', $wd_options->prefix);
|
260 |
-
else
|
261 |
-
$xml = __('No', $wd_options->prefix);
|
262 |
-
$server_info["PHP XML support"] = $xml;
|
263 |
-
|
264 |
-
$gd_info = array("GD support" => __('No', $wd_options->prefix));
|
265 |
-
if (function_exists("gd_info")) {
|
266 |
-
$gd_info = array();
|
267 |
-
foreach (gd_info() as $key => $val) {
|
268 |
-
if (is_bool($val)) {
|
269 |
-
$gd_info[$key] = $val ? __('Yes', $wd_options->prefix) : __('No', $wd_options->prefix);
|
270 |
} else {
|
271 |
-
$
|
272 |
}
|
273 |
}
|
|
|
274 |
}
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
314 |
}
|
315 |
|
316 |
-
|
317 |
}
|
318 |
|
319 |
-
|
|
|
|
|
|
|
320 |
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
5 |
|
6 |
+
class DoradoWebOverview{
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Events //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Constants //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Variables //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public $config ;
|
17 |
+
private $tabs = array();
|
18 |
+
|
19 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
20 |
+
// Constructor & Destructor //
|
21 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
+
public function __construct( $config = array() ) {
|
23 |
+
$this->config = $config;
|
24 |
+
$wd_options = $this->config;
|
25 |
+
$this->tabs = array(
|
26 |
+
'welcome' => array(
|
27 |
+
'name' => __( "Welcome", $wd_options->prefix ),
|
28 |
+
'view' => array( $this, 'wd_overview_welcome' )
|
29 |
+
),
|
30 |
+
'user_guide' => array(
|
31 |
+
'name' => __( "User Guide", $wd_options->prefix ),
|
32 |
+
'view' => array( $this, 'wd_overview_user_guide' )
|
33 |
+
),
|
34 |
+
'deals' => array(
|
35 |
+
'name' => __( 'Deals', $wd_options->prefix ),
|
36 |
+
'view' => array( $this, 'wd_overview_deals' )
|
37 |
+
),
|
38 |
+
'support' => array(
|
39 |
+
'name' => __( "Support", $wd_options->prefix ),
|
40 |
+
'view' => array( $this, 'wd_overview_support' )
|
41 |
+
),
|
42 |
+
'https://web-dorado.com/support/submit-your-idea.html' => array(
|
43 |
+
'name' => __( "Submit Your Idea", $wd_options->prefix ),
|
44 |
+
'view' => false
|
45 |
+
),
|
46 |
+
'https://wordpress.org/support/plugin/' . $wd_options->plugin_wordpress_slug => array(
|
47 |
+
'name' => __( "Forum", $wd_options->prefix ),
|
48 |
+
'view' => false
|
49 |
+
)
|
50 |
+
);
|
51 |
+
|
52 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
+
}
|
55 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
56 |
+
// Public Methods //
|
57 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
58 |
+
public function display_overview_page(){
|
59 |
+
$wd_options = $this->config;
|
60 |
+
$tabs = $this->tabs;
|
61 |
+
$start_using_url = "";
|
62 |
+
if(!empty($this->config->custom_post)) {
|
63 |
+
if (strpos($this->config->custom_post, 'post_type', 0) !== false) {
|
64 |
+
$start_using_url = admin_url($this->config->custom_post);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
} else {
|
66 |
+
$start_using_url = menu_page_url($this->config->custom_post, false);
|
67 |
}
|
68 |
}
|
69 |
+
require_once( $wd_options->wd_dir_templates . "/display_overview.php" );
|
70 |
}
|
71 |
+
public function wd_overview_welcome(){
|
72 |
+
$wd_options = $this->config;
|
73 |
+
//http://api.wordpress.org/plugins/info/1.0/wd-google-maps
|
74 |
+
require_once( $wd_options->wd_dir_templates . "/display_overview_welcome.php" );
|
75 |
+
}
|
76 |
+
public function wd_overview_user_guide(){
|
77 |
+
$wd_options = $this->config;
|
78 |
+
$user_guide = $wd_options->user_guide;
|
79 |
+
require_once( $wd_options->wd_dir_templates . "/display_overview_user_guide.php" );
|
80 |
+
}
|
81 |
+
public function wd_overview_deals(){
|
82 |
+
|
83 |
+
$wd_options = $this->config;
|
84 |
+
$plugins = array(
|
85 |
+
"form-maker" => array(
|
86 |
+
'title' => 'Form Maker',
|
87 |
+
'text' => __( 'Wordpress form builder plugin', $wd_options->prefix ),
|
88 |
+
'content' => __( 'Form Maker is a modern and advanced tool for creating WordPress forms easily and fast.', $wd_options->prefix ),
|
89 |
+
'href' => 'https://web-dorado.com/products/wordpress-form.html'
|
90 |
+
),
|
91 |
+
"photo-gallery" => array(
|
92 |
+
'title' => 'Photo Gallery',
|
93 |
+
'text' => __( 'WordPress Photo Gallery plugin', $wd_options->prefix ),
|
94 |
+
'content' => __( 'Photo Gallery is a fully responsive WordPress Gallery plugin with advanced functionality.', $wd_options->prefix ),
|
95 |
+
'href' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin.html'
|
96 |
+
),
|
97 |
+
"event-calendar-wd" => array(
|
98 |
+
'title' => 'Event Calendar WD',
|
99 |
+
'text' => __( 'WordPress calendar plugin', $wd_options->prefix ),
|
100 |
+
'content' => __( 'Organize and publish your events in an easy and elegant way using Event Calendar WD.', $wd_options->prefix ),
|
101 |
+
'href' => 'https://web-dorado.com/products/wordpress-event-calendar-wd.html'
|
102 |
+
),
|
103 |
+
"wd-google-maps" => array(
|
104 |
+
'title' => 'WD Google Maps',
|
105 |
+
'text' => __( 'WD Google Maps plugin', $wd_options->prefix ),
|
106 |
+
'content' => __( 'Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.', $wd_options->prefix ),
|
107 |
+
'href' => 'https://web-dorado.com/products/wordpress-google-maps-plugin.html'
|
108 |
+
),
|
109 |
+
"slider-wd" => array(
|
110 |
+
'title' => 'Slider WD',
|
111 |
+
'text' => __( 'WordPress slider plugin', $wd_options->prefix ),
|
112 |
+
'content' => __( 'Create responsive, highly configurable sliders with various effects for your WordPress site.', $wd_options->prefix ),
|
113 |
+
'href' => 'https://web-dorado.com/products/wordpress-slider-plugin.html'
|
114 |
+
),
|
115 |
+
"spider-event-calendar" => array(
|
116 |
+
'title' => 'Spider Calendar',
|
117 |
+
'text' => __( 'WordPress event calendar plugin', $wd_options->prefix ),
|
118 |
+
'content' => __( 'Spider Event Calendar is a highly configurable product which allows you to have multiple organized events.', $wd_options->prefix ),
|
119 |
+
'href' => 'https://web-dorado.com/products/wordpress-calendar.html'
|
120 |
+
),
|
121 |
+
"wd-instagram-feed" => array(
|
122 |
+
'title' => 'Instagram Feed WD',
|
123 |
+
'text' => __( 'WordPress Instagram Feed plugin', $wd_options->prefix ),
|
124 |
+
'content' => __( 'WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website.', $wd_options->prefix ),
|
125 |
+
'href' => 'https://web-dorado.com/products/wordpress-instagram-feed-wd.html'
|
126 |
+
),
|
127 |
+
);
|
128 |
+
unset($plugins[$wd_options->plugin_wordpress_slug]) ;
|
129 |
+
|
130 |
+
// foreach ( $plugins as $wp_slug => &$plugin ){
|
131 |
+
// $wp_data = $this->
|
132 |
+
//remote_get($wp_slug);
|
133 |
+
// $plugin["downloaded"] = $wp_data["downloaded"];
|
134 |
+
// $plugin["rating"] = $wp_data["rating"];
|
135 |
+
// }
|
136 |
+
|
137 |
+
$themes = array(
|
138 |
+
"business_elite" => array(
|
139 |
+
'title' => 'Business Elite Theme',
|
140 |
+
'href' => 'https://web-dorado.com/wordpress-themes/business-elite.html'
|
141 |
+
),
|
142 |
+
"portfolio_gallery" => array(
|
143 |
+
'title' => 'Portfolio Gallery Theme',
|
144 |
+
'href' => 'https://web-dorado.com/wordpress-themes/portfolio-gallery.html'
|
145 |
+
),
|
146 |
+
"sauron" => array(
|
147 |
+
'title' => 'Sauron Theme',
|
148 |
+
'href' => 'https://web-dorado.com/wordpress-themes/sauron.html'
|
149 |
+
),
|
150 |
+
"business_world" => array(
|
151 |
+
'title' => 'Business World Theme',
|
152 |
+
'href' => 'https://web-dorado.com/wordpress-themes/business-world.html'
|
153 |
+
),
|
154 |
+
);
|
155 |
+
|
156 |
+
require_once( $wd_options->wd_dir_templates . "/display_overview_deals.php" );
|
157 |
+
}
|
158 |
+
public function wd_overview_support(){
|
159 |
+
$wd_options = $this->config;
|
160 |
+
global $wpdb;
|
161 |
+
$server_info = array();
|
162 |
+
|
163 |
+
// Get PHP Version
|
164 |
+
$server_info["Operating System"] = PHP_OS . " (" . ( PHP_INT_SIZE * 8 ) . ")";
|
165 |
+
$server_info["PHP Version"] = PHP_VERSION;
|
166 |
+
$server_info["Server"] = $_SERVER["SERVER_SOFTWARE"];
|
167 |
+
|
168 |
+
// Get MYSQL Version
|
169 |
+
$sql_version = $wpdb->get_var( "SELECT VERSION() AS version" );
|
170 |
+
$server_info["MySQL Version"] = $sql_version;
|
171 |
+
|
172 |
+
// GET SQL Mode
|
173 |
+
$mysqlinfo = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" );
|
174 |
+
if ( is_array( $mysqlinfo ) )
|
175 |
+
$sql_mode = $mysqlinfo[0]->Value;
|
176 |
+
if ( empty( $sql_mode ) )
|
177 |
+
$sql_mode = __( 'Not set', $wd_options->prefix );
|
178 |
+
$server_info["SQL Mode"] = $sql_mode;
|
179 |
+
|
180 |
+
// Get PHP allow_url_fopen
|
181 |
+
if( ini_get( 'allow_url_fopen' ) )
|
182 |
+
$allow_url_fopen = __( 'On', $wd_options->prefix );
|
183 |
+
else
|
184 |
+
$allow_url_fopen = __( 'Off', $wd_options->prefix );
|
185 |
+
$server_info["PHP Allow URL fopen"] = $allow_url_fopen;
|
186 |
+
|
187 |
+
// Get PHP Max Upload Size
|
188 |
+
if (function_exists('wp_max_upload_size'))
|
189 |
+
$upload_max = strval(round((int) wp_max_upload_size() / (1024 * 1024))) . 'M';
|
190 |
+
else if(ini_get('upload_max_filesize'))
|
191 |
+
$upload_max = ini_get('upload_max_filesize');
|
192 |
+
else
|
193 |
+
$upload_max = __('N/A', $wd_options->prefix);
|
194 |
+
|
195 |
+
$server_info["PHP Max Upload Size"] = $upload_max;
|
196 |
+
|
197 |
+
// Get PHP Output buffer Size
|
198 |
+
if( ini_get( 'pcre.backtrack_limit' ) )
|
199 |
+
$backtrack_limit = ini_get( 'pcre.backtrack_limit' );
|
200 |
+
else
|
201 |
+
$backtrack_limit = __( 'N/A', $wd_options->prefix );
|
202 |
+
$server_info["PCRE Backtracking Limit"] = $backtrack_limit;
|
203 |
+
|
204 |
+
// Get PHP Max Post Size
|
205 |
+
if( ini_get( 'post_max_size' ) )
|
206 |
+
$post_max = ini_get( 'post_max_size' );
|
207 |
+
else
|
208 |
+
$post_max = __( 'N/A', $wd_options->prefix );
|
209 |
+
$server_info["PHP Max Post Size"] = $post_max;
|
210 |
+
|
211 |
+
// Get PHP Max execution time
|
212 |
+
if( ini_get( 'max_execution_time' ) )
|
213 |
+
$max_execute = ini_get( 'max_execution_time' );
|
214 |
+
else
|
215 |
+
$max_execute = __( 'N/A', $wd_options->prefix );
|
216 |
+
$server_info["PHP Max Script Execute Time"] = $max_execute;
|
217 |
+
|
218 |
+
|
219 |
+
// Get PHP Memory Limit
|
220 |
+
if( ini_get( 'memory_limit' ) )
|
221 |
+
$memory_limit = ini_get( 'memory_limit' );
|
222 |
+
else
|
223 |
+
$memory_limit = __( 'N/A', $wd_options->prefix );
|
224 |
+
$server_info["PHP Memory Limit"] = $memory_limit;
|
225 |
+
|
226 |
+
// Get actual memory_get_usage
|
227 |
+
if ( function_exists( 'memory_get_usage' ) )
|
228 |
+
$memory_usage = round( memory_get_usage() / 1024 / 1024, 2 ) . __( ' MByte', $wd_options->prefix );
|
229 |
+
else
|
230 |
+
$memory_usage = __( 'N/A', $wd_options->prefix );
|
231 |
+
$server_info["Memory usage"] = $memory_usage;
|
232 |
+
|
233 |
+
// required for EXIF read
|
234 |
+
if ( is_callable( 'exif_read_data' ) )
|
235 |
+
$exif = __( 'Yes', $wd_options->prefix ). " (V" . substr( phpversion( 'exif' ), 0, 4 ) . ")" ;
|
236 |
+
else
|
237 |
+
$exif = __( 'No', $wd_options->prefix );
|
238 |
+
$server_info["PHP Exif support"] = $exif;
|
239 |
+
|
240 |
+
// required for meta data
|
241 |
+
if ( is_callable( 'iptcparse' ) )
|
242 |
+
$iptc = __( 'Yes', $wd_options->prefix );
|
243 |
+
else
|
244 |
+
$iptc = __( 'No', $wd_options->prefix );
|
245 |
+
$server_info["PHP IPTC support"] = $iptc;
|
246 |
+
|
247 |
+
// required for meta data
|
248 |
+
if ( is_callable( 'xml_parser_create' ) )
|
249 |
+
$xml = __( 'Yes', $wd_options->prefix );
|
250 |
+
else
|
251 |
+
$xml = __( 'No', $wd_options->prefix );
|
252 |
+
$server_info["PHP XML support"] = $xml;
|
253 |
+
|
254 |
+
$gd_info = array( "GD support" => __( 'No', $wd_options->prefix ) );
|
255 |
+
if( function_exists( "gd_info" ) ){
|
256 |
+
$gd_info = array();
|
257 |
+
foreach( gd_info() as $key => $val ){
|
258 |
+
if( is_bool($val) ){
|
259 |
+
$gd_info[$key] = $val ? __( 'Yes', $wd_options->prefix ) : __( 'No', $wd_options->prefix );
|
260 |
+
}
|
261 |
+
else{
|
262 |
+
$gd_info[$key] = $val;
|
263 |
+
}
|
264 |
+
}
|
265 |
}
|
266 |
|
267 |
+
require_once( $wd_options->wd_dir_templates . "/display_overview_support.php" );
|
268 |
}
|
269 |
|
270 |
+
public function overview_styles() {
|
271 |
+
$wd_options = $this->config;
|
272 |
+
$version = get_option( $wd_options->prefix . "_version" );
|
273 |
+
wp_enqueue_style( $wd_options->prefix . '_overview_css', $wd_options->wd_url_css . '/overview.css', array(), $version );
|
274 |
|
275 |
+
}
|
276 |
+
public function overview_scripts() {
|
277 |
+
$wd_options = $this->config;
|
278 |
+
$version = get_option( $wd_options->prefix . "_version" );
|
279 |
+
wp_enqueue_script( $wd_options->prefix . '_overview_js', $wd_options->wd_url_js . '/overview.js', array(), $version );
|
280 |
+
|
281 |
+
}
|
282 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
283 |
+
// Getters & Setters //
|
284 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
285 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
286 |
+
// Private Methods //
|
287 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
288 |
+
private function remote_get($plugin_wp_slug){
|
289 |
+
$request = wp_remote_get(" http://api.wordpress.org/plugins/info/1.0/" . $plugin_wp_slug);
|
290 |
+
$data = array();
|
291 |
+
if (!is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200) {
|
292 |
+
$body = unserialize($request['body']);
|
293 |
+
$data["downloaded"] = $body->downloaded;
|
294 |
+
$ratings = $body->ratings;
|
295 |
+
if( $ratings[5] == 0 && $ratings[4] == 0 && $ratings[3] == 0 && $ratings[2] == 0 && $ratings[1] == 0){
|
296 |
+
$data["rating"] = 100;
|
297 |
+
}
|
298 |
+
else{
|
299 |
+
$data["rating"] = round( ( ( $ratings[5] * 5 + $ratings[4] * 4 + $ratings[3] * 3 + $ratings[2] * 2 + $ratings[1] * 1 ) / $body->num_ratings ) , 1 );
|
300 |
+
|
301 |
+
$data["rating"] = round( ( $data["rating"] / 5 ) * 100 );
|
302 |
+
}
|
303 |
+
return $data;
|
304 |
+
}
|
305 |
+
return false;
|
306 |
+
|
307 |
+
}
|
308 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
309 |
+
// Listeners //
|
310 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
311 |
+
|
312 |
+
}
|
wd/includes/subscribe.php
CHANGED
@@ -1,146 +1,138 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
|
4 |
-
}
|
5 |
-
|
6 |
-
class DoradoWebSubscribe
|
7 |
-
{
|
8 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
9 |
-
// Events //
|
10 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
12 |
-
// Constants //
|
13 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Variables //
|
16 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
public $config;
|
18 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Constructor & Destructor //
|
20 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function __construct($config = array())
|
22 |
-
{
|
23 |
-
$this->config = $config;
|
24 |
-
add_action('admin_init', array($this, 'after_subscribe'));
|
25 |
-
}
|
26 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
27 |
-
// Public Methods //
|
28 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
29 |
-
|
30 |
-
public function subscribe_scripts()
|
31 |
-
{
|
32 |
-
$wd_options = $this->config;
|
33 |
-
wp_register_script('subscribe_js', $wd_options->wd_url_js . '/subsribe.js');
|
34 |
-
wp_enqueue_script('subscribe_js');
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
public function subscribe_styles()
|
39 |
-
{
|
40 |
-
$wd_options = $this->config;
|
41 |
-
wp_enqueue_style($wd_options->prefix . 'subscribe', $wd_options->wd_url_css . '/subscribe.css');
|
42 |
-
|
43 |
}
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
$wd_options = $this->config;
|
72 |
-
if (isset($_GET[$wd_options->prefix . "_sub_action"])) {
|
73 |
-
|
74 |
-
if ($_GET[$wd_options->prefix . "_sub_action"] == "allow") {
|
75 |
-
$api = new DoradoWebApi($wd_options);
|
76 |
-
$hash = $api->get_hash();
|
77 |
-
|
78 |
-
if ($hash != null) {
|
79 |
-
$all_plugins = array();
|
80 |
-
$plugins = get_plugins();
|
81 |
-
foreach ($plugins as $slug => $data) {
|
82 |
-
$plugin = array(
|
83 |
-
"Name" => $data["Name"],
|
84 |
-
"PluginURI" => $data["PluginURI"],
|
85 |
-
"Author" => $data["Author"],
|
86 |
-
"AuthorURI" => $data["AuthorURI"]
|
87 |
-
);
|
88 |
-
$all_plugins[$slug] = $plugin;
|
89 |
-
}
|
90 |
-
|
91 |
-
$data = array();
|
92 |
-
$data["site_url"] = site_url();
|
93 |
-
|
94 |
-
$admin_data = wp_get_current_user();
|
95 |
-
|
96 |
-
$user_first_name = get_user_meta($admin_data->ID, "first_name", true);
|
97 |
-
$user_last_name = get_user_meta($admin_data->ID, "last_name", true);
|
98 |
-
|
99 |
-
$data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
|
100 |
-
|
101 |
-
$data["email"] = $admin_data->data->user_email;
|
102 |
-
$data["wp_version"] = get_bloginfo('version');
|
103 |
-
$data["plugin_id"] = $wd_options->wd_plugin_id;
|
104 |
-
$data["hash"] = $hash;
|
105 |
-
$data["all_plugins"] = $all_plugins;
|
106 |
-
|
107 |
-
|
108 |
-
$response = wp_remote_post("https://api.web-dorado.com/collectuserdata", array(
|
109 |
-
'method' => 'POST',
|
110 |
-
'timeout' => 45,
|
111 |
-
'redirection' => 5,
|
112 |
-
'httpversion' => '1.0',
|
113 |
-
'blocking' => true,
|
114 |
-
'headers' => array(),
|
115 |
-
'body' => json_encode($data),
|
116 |
-
'cookies' => array()
|
117 |
-
)
|
118 |
-
);
|
119 |
-
|
120 |
-
$response_body = (!is_wp_error($response) && isset($response["body"])) ? json_decode($response["body"], true) : null;
|
121 |
-
|
122 |
-
if (is_array($response_body) && $response_body["body"]["msg"] == "Access") {
|
123 |
-
|
124 |
-
}
|
125 |
-
}
|
126 |
-
}
|
127 |
-
if (get_option($wd_options->prefix . "_subscribe_done") != 1) {
|
128 |
-
update_option($wd_options->prefix . "_subscribe_done", 1);
|
129 |
-
} else {
|
130 |
-
add_option($wd_options->prefix . "_subscribe_done", "1", '', 'no');
|
131 |
-
}
|
132 |
-
|
133 |
-
wp_safe_redirect($wd_options->after_subscribe);
|
134 |
}
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
}
|
137 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
138 |
-
// Getters & Setters //
|
139 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
140 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
141 |
-
// Private Methods //
|
142 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
143 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
144 |
-
// Listeners //
|
145 |
-
// //////////////////////////////////////////////////////////////////////////////////////
|
146 |
-
}
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
5 |
+
class DoradoWebSubscribe {
|
6 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
// Events //
|
8 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
9 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
// Constants //
|
11 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
12 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
// Variables //
|
14 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
public $config;
|
16 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
// Constructor & Destructor //
|
18 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
public function __construct( $config = array() ){
|
20 |
+
$this->config = $config;
|
21 |
+
add_action( 'admin_init', array( $this, 'after_subscribe' ) );
|
22 |
+
}
|
23 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
24 |
+
// Public Methods //
|
25 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
26 |
+
|
27 |
+
public function subscribe_scripts() {
|
28 |
+
$wd_options = $this->config;
|
29 |
+
wp_register_script ( 'subscribe_js', $wd_options->wd_url_js . '/subsribe.js' );
|
30 |
+
wp_enqueue_script ( 'subscribe_js' );
|
31 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
+
public function subscribe_styles() {
|
34 |
+
$wd_options = $this->config;
|
35 |
+
wp_enqueue_style( $wd_options->prefix . 'subscribe', $wd_options->wd_url_css . '/subscribe.css' );
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
public function subscribe_display_page() {
|
40 |
+
$wd_options = $this->config;
|
41 |
+
$list = array(
|
42 |
+
0 => array(
|
43 |
+
"title" => __( "Your name &", $wd_options->prefix ),
|
44 |
+
"small_text" => __( "Email address", $wd_options->prefix ),
|
45 |
+
"img" => $wd_options->wd_url_img . '/sub_1.png',
|
46 |
+
),
|
47 |
+
1 => array(
|
48 |
+
"title" => __( "Site URL", $wd_options->prefix ),
|
49 |
+
"small_text" => __( "Wordpress version", $wd_options->prefix ),
|
50 |
+
"img" => $wd_options->wd_url_img . '/sub_2.png',
|
51 |
+
),
|
52 |
+
2 => array(
|
53 |
+
"title" => __( "List of plugins", $wd_options->prefix ),
|
54 |
+
"small_text" => "",
|
55 |
+
"img" => $wd_options->wd_url_img . '/sub_4.png',
|
56 |
+
),
|
57 |
+
);
|
58 |
+
|
59 |
+
require_once ( $wd_options->wd_dir_templates . "/display_subscribe.php" );
|
60 |
+
}
|
61 |
+
public function after_subscribe(){
|
62 |
+
$wd_options = $this->config;
|
63 |
+
if( isset( $_GET[ $wd_options->prefix . "_sub_action"] ) ){
|
64 |
+
|
65 |
+
if( $_GET[$wd_options->prefix . "_sub_action"] == "allow" ){
|
66 |
+
$api = new DoradoWebApi($wd_options);
|
67 |
+
$hash = $api->get_hash();
|
68 |
+
|
69 |
+
if( $hash != null ){
|
70 |
+
$all_plugins = array();
|
71 |
+
$plugins = get_plugins();
|
72 |
+
foreach ( $plugins as $slug => $data ) {
|
73 |
+
$plugin = array(
|
74 |
+
"Name" => $data["Name"],
|
75 |
+
"PluginURI" => $data["PluginURI"],
|
76 |
+
"Author" => $data["Author"],
|
77 |
+
"AuthorURI" => $data["AuthorURI"]
|
78 |
+
);
|
79 |
+
$all_plugins[$slug] = $plugin;
|
80 |
+
}
|
81 |
+
|
82 |
+
$data = array();
|
83 |
+
$data["site_url"] = site_url();
|
84 |
+
|
85 |
+
$admin_data = wp_get_current_user();
|
86 |
+
|
87 |
+
$user_first_name = get_user_meta( $admin_data->ID, "first_name", true );
|
88 |
+
$user_last_name = get_user_meta( $admin_data->ID, "last_name", true );
|
89 |
+
|
90 |
+
$data["name"] = $user_first_name || $user_last_name ? $user_first_name . " " . $user_last_name : $admin_data->data->user_login;
|
91 |
+
|
92 |
+
$data["email"] = $admin_data->data->user_email;
|
93 |
+
$data["wp_version"] = get_bloginfo( 'version' );
|
94 |
+
$data["plugin_id"] = $wd_options->wd_plugin_id;
|
95 |
+
$data["hash"] = $hash;
|
96 |
+
$data["all_plugins"] = $all_plugins;
|
97 |
+
|
98 |
+
|
99 |
+
$response = wp_remote_post( "https://api.web-dorado.com/collectuserdata", array(
|
100 |
+
'method' => 'POST',
|
101 |
+
'timeout' => 45,
|
102 |
+
'redirection' => 5,
|
103 |
+
'httpversion' => '1.0',
|
104 |
+
'blocking' => true,
|
105 |
+
'headers' => array(),
|
106 |
+
'body' => json_encode($data),
|
107 |
+
'cookies' => array()
|
108 |
+
)
|
109 |
+
);
|
110 |
+
|
111 |
+
$response_body = (!is_wp_error($response) && isset( $response["body"] )) ? json_decode( $response["body"], true ) : null;
|
112 |
+
|
113 |
+
if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
|
114 |
+
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
if ( get_option( $wd_options->prefix . "_subscribe_done" ) != 1 ) {
|
119 |
+
update_option( $wd_options->prefix . "_subscribe_done", 1 );
|
120 |
+
}
|
121 |
+
else {
|
122 |
+
add_option( $wd_options->prefix . "_subscribe_done" , "1", '', 'no');
|
123 |
+
}
|
124 |
+
|
125 |
+
wp_safe_redirect( $wd_options->after_subscribe );
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
129 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
130 |
+
// Getters & Setters //
|
131 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
132 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
133 |
+
// Private Methods //
|
134 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
135 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
136 |
+
// Listeners //
|
137 |
+
// //////////////////////////////////////////////////////////////////////////////////////
|
138 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wd/start.php
CHANGED
@@ -1,40 +1,40 @@
|
|
1 |
-
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
|
4 |
-
}
|
5 |
-
define('DORADO_WEB_API_PLUGIN_DATA_PATH', 'https://api.web-dorado.com/v2/_id_/plugindata');
|
6 |
-
require_once dirname(__FILE__) . '/config.php';
|
7 |
|
8 |
-
/**
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
function dorado_web_init($options)
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
|
34 |
-
|
35 |
-
|
36 |
|
37 |
-
}
|
38 |
|
39 |
|
40 |
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
define( 'DORADO_WEB_API_PLUGIN_DATA_PATH', 'https://api.web-dorado.com/v2/_id_/plugindata' );
|
6 |
+
require_once dirname( __FILE__ ) . '/config.php';
|
7 |
|
8 |
+
/**
|
9 |
+
* @param options for Plugin details.
|
10 |
+
* prefix;
|
11 |
+
* wd_plugin_id;
|
12 |
+
* plugin_title;
|
13 |
+
* plugin_dir;
|
14 |
+
* plugin_main_file;
|
15 |
+
* description;
|
16 |
+
* plugin_features;
|
17 |
+
* user_guide;
|
18 |
+
* video_youtube_id;
|
19 |
+
* plugin_wd_url;
|
20 |
+
* plugin_wd_demo_link;
|
21 |
+
* plugin_wd_addons_link;
|
22 |
+
* plugin_wizard_link;
|
23 |
+
* after_subscribe;
|
24 |
+
* plugin_menu_title;
|
25 |
+
* plugin_menu_icon;
|
26 |
+
* custom_post;
|
27 |
+
*/
|
28 |
+
|
29 |
+
function dorado_web_init( $options ) {
|
30 |
+
|
31 |
+
// load files
|
32 |
+
require_once dirname( __FILE__ ) . '/wd.php';
|
33 |
|
34 |
+
$wd = new DoradoWeb();
|
35 |
+
$wd->wd_init( $options );
|
36 |
|
37 |
+
}
|
38 |
|
39 |
|
40 |
|
wd/templates/display_deactivation_popup.php
CHANGED
@@ -1,37 +1,27 @@
|
|
1 |
<div class="wd-opacity wd-<?php echo $wd_options->prefix; ?>-opacity"></div>
|
2 |
<div class="wd-deactivate-popup wd-<?php echo $wd_options->prefix; ?>-deactivate-popup">
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
</div>
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
class="button button-secondary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate"
|
29 |
-
id="wd-<?php echo $wd_options->prefix; ?>-submit-and-deactivate"
|
30 |
-
style="display:none;"><?php _e("Submit and deactivate", $wd_options->prefix); ?></a>
|
31 |
-
<a href="<?php echo admin_url('plugins.php'); ?>"
|
32 |
-
class="button button-primary wd-<?php echo $wd_options->prefix; ?>-cancel"><?php _e("Cancel", $wd_options->prefix); ?></a>
|
33 |
-
</div>
|
34 |
-
<input type="hidden" name="<?php echo $wd_options->prefix . "_submit_and_deactivate"; ?>" value="">
|
35 |
-
<?php wp_nonce_field($wd_options->prefix . '_save_form', $wd_options->prefix . '_save_form_fild'); ?>
|
36 |
-
</form>
|
37 |
</div>
|
1 |
<div class="wd-opacity wd-<?php echo $wd_options->prefix; ?>-opacity"></div>
|
2 |
<div class="wd-deactivate-popup wd-<?php echo $wd_options->prefix; ?>-deactivate-popup">
|
3 |
+
<div class="wd-deactivate-popup-opacity wd-deactivate-popup-opacity-<?php echo $wd_options->prefix; ?>">
|
4 |
+
<img src="<?php echo $wd_options->wd_url_img . '/spinner.gif'; ?>" class="wd-img-loader" >
|
5 |
+
</div>
|
6 |
+
<form method="post" id="<?php echo $wd_options->prefix; ?>_deactivate_form">
|
7 |
+
<div class="wd-deactivate-popup-header">
|
8 |
+
<?php _e( "Please let us know why you are deactivating. Your answer will help us to serve you better (Optional)", $wd_options->prefix ); ?>:
|
9 |
+
</div>
|
|
|
10 |
|
11 |
+
<div class="wd-deactivate-popup-body">
|
12 |
+
<?php foreach( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
|
13 |
+
<div class="wd-<?php echo $wd_options->prefix; ?>-reasons">
|
14 |
+
<input type="radio" value="<?php echo $deactivate_reason["id"];?>" id="<?php echo $wd_options->prefix . "-" .$deactivate_reason["id"]; ?>" name="<?php echo $wd_options->prefix; ?>_reasons" >
|
15 |
+
<label for="<?php echo $wd_options->prefix . "-" . $deactivate_reason["id"]; ?>"><?php echo $deactivate_reason["text"];?></label>
|
16 |
+
</div>
|
17 |
+
<?php } ?>
|
18 |
+
<div class="<?php echo $wd_options->prefix; ?>_additional_details_wrap"></div>
|
19 |
+
</div>
|
20 |
+
<div class="wd-btns">
|
21 |
+
<a href="<?php echo $deactivate_url; ?>" data-val="1" class="button button-primary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-deactivate"><?php _e( "Skip and Deactivate" , $wd_options->prefix ); ?></a>
|
22 |
+
<a href="<?php echo $deactivate_url; ?>" data-val="2" class="button button-primary button-close wd-<?php echo $wd_options->prefix; ?>-deactivate" id="wd-<?php echo $wd_options->prefix; ?>-submit-and-deactivate" style="display:none;"><?php _e( "Submit and Deactivate" , $wd_options->prefix ); ?></a>
|
23 |
+
</div>
|
24 |
+
<input type="hidden" name="<?php echo $wd_options->prefix . "_submit_and_deactivate"; ?>" value="" >
|
25 |
+
<?php wp_nonce_field( $wd_options->prefix . '_save_form', $wd_options->prefix . '_save_form_fild'); ?>
|
26 |
+
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
</div>
|
wd/templates/display_overview.php
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
<div class="overview_welcome">
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
</div>
|
19 |
</div>
|
|
|
20 |
</div>
|
21 |
<div class="overview_wrap">
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
</div>
|
1 |
<div class="overview_welcome">
|
2 |
+
<div class="wd-cell wd-valign-middle">
|
3 |
+
<a href="<?php echo $wd_options->plugin_wd_url; ?>" target="_blank"><img
|
4 |
+
src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>"></a>
|
5 |
+
</div>
|
6 |
+
<div class="wd-cell wd-valign-middle">
|
7 |
|
8 |
+
<h2><?php echo sprintf(__("Welcome to %s", $wd_options->prefix), $wd_options->plugin_title); ?> <?php if (!empty($start_using_url)) { ?>
|
9 |
+
<div class="wd-start-using-button">
|
10 |
+
<a href="<?php echo $start_using_url; ?>" class="button button-primary button-large">Start using</a>
|
11 |
+
</div>
|
12 |
+
<?php } ?></h2>
|
13 |
|
14 |
+
<div class="overview_welcome_text">
|
15 |
|
16 |
+
<div><?php echo sprintf(__("CONGRATS! You've successfully installed %s WordPress plugin.", $wd_options->prefix), $wd_options->plugin_title); ?></div>
|
17 |
+
<div><?php echo $wd_options->description; ?></div>
|
|
|
18 |
</div>
|
19 |
+
</div>
|
20 |
</div>
|
21 |
<div class="overview_wrap">
|
22 |
+
<ul class="overview_tabs">
|
23 |
+
<?php
|
24 |
+
foreach ($tabs as $tab_key => $tab) {
|
25 |
+
$href = $tab['view'] !== false ? "#" . $tab_key : $tab_key;
|
26 |
+
$target = $tab['view'] == false ? 'target="_blank" class="not_tab"' : '';
|
27 |
+
$overview_tab_active_class = $tab_key == 'welcome' ? 'class="overview_tab_active"' : ''
|
28 |
+
?>
|
29 |
+
<li class=""><a
|
30 |
+
href="<?php echo $href; ?>" <?php echo $overview_tab_active_class; ?> <?php echo $target; ?>><?php echo esc_html($tab['name']); ?></a>
|
31 |
+
</li>
|
32 |
+
<?php } ?>
|
33 |
+
</ul>
|
34 |
+
<div class="overview_content">
|
35 |
+
<?php
|
36 |
+
foreach ($tabs as $tab_key => $tab) {
|
37 |
+
if ($tab['view'] !== false) {
|
38 |
+
echo call_user_func($tab['view']);
|
39 |
+
}
|
40 |
+
}
|
41 |
+
?>
|
42 |
+
</div>
|
43 |
</div>
|
wd/templates/display_overview_deals.php
CHANGED
@@ -2,34 +2,29 @@
|
|
2 |
|
3 |
<div id="plugins">
|
4 |
<div class="deals_header deals_header_plugins">
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
</div>
|
21 |
-
<div class="deals_save"><?php echo __("Save 80%", $wd_options->prefix); ?></div>
|
22 |
-
</div>
|
23 |
-
</div>
|
24 |
-
</a>
|
25 |
</div>
|
26 |
<div class="deals_content">
|
27 |
-
<?php foreach
|
28 |
-
|
29 |
<div class="deal_block">
|
30 |
<div class="deal_title">
|
31 |
-
<a href="<?php echo $plugin["href"]; ?>" target="_blank">
|
32 |
-
<img src="<?php echo $wd_options->wd_url_img . '/plugins/' . $wp_slug . '.png'; ?>">
|
33 |
<h2><?php echo $plugin["title"]; ?></h2>
|
34 |
</a>
|
35 |
</div>
|
@@ -37,53 +32,50 @@
|
|
37 |
<p><?php echo $plugin["content"]; ?></p>
|
38 |
<div class="deal_desc_footer">
|
39 |
<div class="download_btn">
|
40 |
-
<a href="<?php echo $plugin["href"]; ?>"
|
41 |
-
target="_blank"><?php _e("Download", $wd_options->prefix); ?></a>
|
42 |
</div>
|
43 |
</div>
|
44 |
</div>
|
45 |
-
|
46 |
</div>
|
47 |
<?php } ?>
|
48 |
</div>
|
49 |
<div class="get_all_deals">
|
50 |
-
<a href="https://web-dorado.com/wordpress-plugins-bundle.html" target="_blank">
|
51 |
-
<?php _e("Get all plugins", $wd_options->prefix); ?>
|
52 |
</a>
|
53 |
</div>
|
54 |
</div>
|
55 |
<div id="themes">
|
56 |
<div class="deals_header deals_header_themes">
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
</a>
|
72 |
-
</div>
|
73 |
<div class="deals_content">
|
74 |
-
<?php foreach
|
75 |
<div class="theme_block">
|
76 |
-
<a href="<?php echo $theme["href"]; ?>" target="_blank">
|
77 |
-
|
78 |
<div><?php echo $theme["title"]; ?></div>
|
79 |
</a>
|
80 |
</div>
|
81 |
<?php } ?>
|
82 |
</div>
|
83 |
<div class="get_all_deals">
|
84 |
-
<a href="https://web-dorado.com/wordpress-themes-bundle.html" target="_blank">
|
85 |
-
<?php _e("Find out more", $wd_options->prefix); ?>
|
86 |
</a>
|
87 |
-
</div>
|
88 |
</div>
|
89 |
</div>
|
2 |
|
3 |
<div id="plugins">
|
4 |
<div class="deals_header deals_header_plugins">
|
5 |
+
<a href="https://web-dorado.com/wordpress-plugins-bundle.html" target="_blank">
|
6 |
+
<div class="wd-table">
|
7 |
+
<div class="wd-cell wd-text-right wd-valign-middle">
|
8 |
+
<img src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>" width="100px">
|
9 |
+
</div>
|
10 |
+
<div class="wd-cell wd-valign-middle">
|
11 |
+
<div class="titles_wrap">
|
12 |
+
<div class="deals_main_title"><?php echo sprintf( __( "Get %s", $wd_options->prefix ), $wd_options->plugin_title ); ?></div>
|
13 |
+
<div class="deals_main_title"><span class="higlight">+27 </span><?php echo __( "plugins", $wd_options->prefix ); ?></div>
|
14 |
+
<div class="deals_secondary_title"><?php echo __( "for", $wd_options->prefix ); ?><span class="higlight"> $99 </span><?php echo __( "only", $wd_options->prefix ); ?></div>
|
15 |
+
</div>
|
16 |
+
<div class="deals_save"><?php echo __( "Save 80%", $wd_options->prefix ); ?></div>
|
17 |
+
</div>
|
18 |
+
</div>
|
19 |
+
</a>
|
|
|
|
|
|
|
|
|
|
|
20 |
</div>
|
21 |
<div class="deals_content">
|
22 |
+
<?php foreach( $plugins as $wp_slug => &$plugin ){ ?>
|
23 |
+
|
24 |
<div class="deal_block">
|
25 |
<div class="deal_title">
|
26 |
+
<a href="<?php echo $plugin["href"]; ?>" target="_blank" >
|
27 |
+
<img src = "<?php echo $wd_options->wd_url_img . '/plugins/' . $wp_slug . '.png'; ?>">
|
28 |
<h2><?php echo $plugin["title"]; ?></h2>
|
29 |
</a>
|
30 |
</div>
|
32 |
<p><?php echo $plugin["content"]; ?></p>
|
33 |
<div class="deal_desc_footer">
|
34 |
<div class="download_btn">
|
35 |
+
<a href="<?php echo $plugin["href"]; ?>" target="_blank" ><?php _e( "Download", $wd_options->prefix ); ?></a>
|
|
|
36 |
</div>
|
37 |
</div>
|
38 |
</div>
|
39 |
+
|
40 |
</div>
|
41 |
<?php } ?>
|
42 |
</div>
|
43 |
<div class="get_all_deals">
|
44 |
+
<a href="https://web-dorado.com/wordpress-plugins-bundle.html" target="_blank" >
|
45 |
+
<?php _e( "Get all plugins", $wd_options->prefix ); ?>
|
46 |
</a>
|
47 |
</div>
|
48 |
</div>
|
49 |
<div id="themes">
|
50 |
<div class="deals_header deals_header_themes">
|
51 |
+
<a href="https://web-dorado.com/wordpress-themes-bundle.html" target="_blank">
|
52 |
+
<div class="wd-table">
|
53 |
+
<div class="wd-cell wd-text-right wd-valign-middle">
|
54 |
+
</div>
|
55 |
+
<div class="wd-cell wd-valign-middle">
|
56 |
+
<div class="titles_wrap">
|
57 |
+
<div class="deals_main_title"><?php echo __( "Get all 11 themes", $wd_options->prefix ); ?></div>
|
58 |
+
<div class="deals_main_title"><?php echo __( "for", $wd_options->prefix ); ?><span class="higlight"> $40 </span><?php echo __( "only", $wd_options->prefix ); ?></div>
|
59 |
+
</div>
|
60 |
+
<div class="deals_save"><?php echo __( "Save 70%", $wd_options->prefix ); ?></div>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
</a>
|
64 |
+
</div>
|
|
|
|
|
65 |
<div class="deals_content">
|
66 |
+
<?php foreach( $themes as $slug => $theme ){ ?>
|
67 |
<div class="theme_block">
|
68 |
+
<a href="<?php echo $theme["href"]; ?>" target="_blank" >
|
69 |
+
<img src = "<?php echo $wd_options->wd_url_img . '/plugins/' . $slug . '.png'; ?>" width="100%;">
|
70 |
<div><?php echo $theme["title"]; ?></div>
|
71 |
</a>
|
72 |
</div>
|
73 |
<?php } ?>
|
74 |
</div>
|
75 |
<div class="get_all_deals">
|
76 |
+
<a href="https://web-dorado.com/wordpress-themes-bundle.html" target="_blank" >
|
77 |
+
<?php _e( "Find out more", $wd_options->prefix ); ?>
|
78 |
</a>
|
79 |
+
</div>
|
80 |
</div>
|
81 |
</div>
|
wd/templates/display_overview_support.php
CHANGED
@@ -1,44 +1,43 @@
|
|
1 |
<div id="support">
|
2 |
<p class="wd-support-main">
|
3 |
-
<?php echo sprintf(__("You may contact us by filling in this form or by email %s any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.", $wd_options->prefix), "<span class='support_email'>(support@web-dorado.com)</span>")
|
4 |
</p>
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
<textarea rows="10" id="wd-site-deatils-textarea"><?php
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
|
39 |
-
|
40 |
<div class="contact_us_wrap">
|
41 |
-
<a href="https://web-dorado.com/support/contact-us.html" target="_blank"
|
42 |
-
class="contact_us"><?php _e("Contact us", $wd_options->prefix); ?></a>
|
43 |
</div>
|
44 |
</div>
|
1 |
<div id="support">
|
2 |
<p class="wd-support-main">
|
3 |
+
<?php echo sprintf( __("You may contact us by filling in this form or by email %s any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.", $wd_options->prefix), "<span class='support_email'>(support@web-dorado.com)</span>") ;?>
|
4 |
</p>
|
5 |
+
<div class="wd-overview-site-deatils">
|
6 |
+
<h2><?php _e( "Site Details", $wd_options->prefix ); ?></h2>
|
7 |
+
<p>
|
8 |
+
<?php _e( "When contacting support, consider copying and pasting this information in your support request.", $wd_options->prefix ); ?>
|
9 |
+
<br>
|
10 |
+
<?php _e( "It helps us troubleshoot more quickly.", $wd_options->prefix ); ?>
|
11 |
+
</p>
|
12 |
+
<?php
|
13 |
+
if ( function_exists('current_user_can' ) ) {
|
14 |
+
if ( current_user_can('manage_options') ) {
|
15 |
+
?>
|
16 |
+
<div class="wd-site-deatils wd-table">
|
17 |
+
<button id="wd-copy"><?php _e( "Copy to Clipboard", $wd_options->prefix ); ?></button>
|
18 |
+
<div id="wd-site-deatils">
|
19 |
<textarea rows="10" id="wd-site-deatils-textarea"><?php
|
20 |
+
_e( "Server Settings", $wd_options->prefix );
|
21 |
+
echo ' ';
|
22 |
+
foreach( $server_info as $key => $val ){
|
23 |
+
echo $key . ": " . $val . ' ';
|
24 |
+
}
|
25 |
+
echo ' ';
|
26 |
+
_e( "Graphic Library", $wd_options->prefix );
|
27 |
+
echo ' ';
|
28 |
+
foreach( $gd_info as $key => $val ){
|
29 |
+
echo $key . ": " . $val . ' ';
|
30 |
+
}
|
31 |
+
?></textarea>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
<?php
|
35 |
+
}
|
36 |
+
}
|
37 |
+
?>
|
38 |
|
39 |
+
</div>
|
40 |
<div class="contact_us_wrap">
|
41 |
+
<a href="https://web-dorado.com/support/contact-us.html" target="_blank" class="contact_us"><?php _e("Contact us", $wd_options->prefix); ?></a>
|
|
|
42 |
</div>
|
43 |
</div>
|
wd/templates/display_overview_user_guide.php
CHANGED
@@ -1,51 +1,46 @@
|
|
1 |
<div id="user_guide">
|
2 |
<div class="wd-table">
|
3 |
<div class="wd-cell">
|
4 |
-
<?php for
|
5 |
<div class="user_guide_item">
|
6 |
-
<a href="<?php echo $user_guide[$i]["url"]; ?>" class="user_guide_title"
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
<?php } ?>
|
12 |
-
</div>
|
13 |
<?php } ?>
|
14 |
</div>
|
15 |
<div class="wd-cell">
|
16 |
-
<?php for
|
17 |
<div class="user_guide_item">
|
18 |
-
<a href="<?php echo $user_guide[$i]["url"]; ?>" class="user_guide_title"
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
</div>
|
25 |
-
<?php } ?>
|
26 |
</div>
|
27 |
<div class="wd-cell">
|
28 |
-
<?php if
|
29 |
<a href="<?php echo $wd_options->plugin_wd_demo_link; ?>" class="user_guide_demo" target="_blank">
|
30 |
-
<?php _e("Demo", $wd_options->prefix); ?>
|
31 |
</a>
|
32 |
<?php } ?>
|
33 |
<a href="<?php echo $wd_options->plugin_wd_url; ?>" class="user_guide_plugin" target="_blank">
|
34 |
<?php echo $wd_options->plugin_title; ?>
|
35 |
</a>
|
36 |
-
<a href="https://wordpress.org/support/plugin/<?php echo $wd_options->plugin_wordpress_slug; ?>"
|
37 |
-
|
38 |
-
<?php _e("Support Forum", $wd_options->prefix); ?>
|
39 |
</a>
|
40 |
<a href="https://web-dorado.com/support/faq.html" class="user_guide_faq" target="_blank">
|
41 |
-
<?php _e("FAQ", $wd_options->prefix); ?>
|
42 |
</a>
|
43 |
-
<?php if
|
44 |
<a href="<?php echo $wd_options->plugin_wd_addons_link; ?>" class="user_guide_addons" target="_blank">
|
45 |
-
<?php _e("Addons", $wd_options->prefix); ?>
|
46 |
</a>
|
47 |
<?php } ?>
|
48 |
-
</div>
|
49 |
</div>
|
50 |
</div>
|
51 |
|
1 |
<div id="user_guide">
|
2 |
<div class="wd-table">
|
3 |
<div class="wd-cell">
|
4 |
+
<?php for( $i = 0; $i < ceil( count($user_guide) / 2 ); $i++) { ?>
|
5 |
<div class="user_guide_item">
|
6 |
+
<a href="<?php echo $user_guide[$i]["url"]; ?>" class="user_guide_title" target="_blank"><?php echo $user_guide[$i]["main_title"]; ?></a>
|
7 |
+
<?php foreach( $user_guide[$i]["titles"] as $title ) { ?>
|
8 |
+
<div><a href="<?php echo $title["url"]; ?>" target="_blank" class="user_guide_titles"><?php echo $title["title"]; ?></a></div>
|
9 |
+
<?php } ?>
|
10 |
+
</div>
|
|
|
|
|
11 |
<?php } ?>
|
12 |
</div>
|
13 |
<div class="wd-cell">
|
14 |
+
<?php for( $i = $i; $i < count($user_guide); $i++) { ?>
|
15 |
<div class="user_guide_item">
|
16 |
+
<a href="<?php echo $user_guide[$i]["url"]; ?>" class="user_guide_title" target="_blank"><?php echo $user_guide[$i]["main_title"]; ?></a>
|
17 |
+
<?php foreach( $user_guide[$i]["titles"] as $title ) { ?>
|
18 |
+
<div><a href="<?php echo $title["url"]; ?>" target="_blank" class="user_guide_titles"><?php echo $title["title"]; ?></a></div>
|
19 |
+
<?php } ?>
|
20 |
+
</div>
|
21 |
+
<?php } ?>
|
|
|
|
|
22 |
</div>
|
23 |
<div class="wd-cell">
|
24 |
+
<?php if($wd_options->plugin_wd_demo_link) { ?>
|
25 |
<a href="<?php echo $wd_options->plugin_wd_demo_link; ?>" class="user_guide_demo" target="_blank">
|
26 |
+
<?php _e( "Demo", $wd_options->prefix ); ?>
|
27 |
</a>
|
28 |
<?php } ?>
|
29 |
<a href="<?php echo $wd_options->plugin_wd_url; ?>" class="user_guide_plugin" target="_blank">
|
30 |
<?php echo $wd_options->plugin_title; ?>
|
31 |
</a>
|
32 |
+
<a href="https://wordpress.org/support/plugin/<?php echo $wd_options->plugin_wordpress_slug; ?>" class="user_guide_support_forum" target="_blank">
|
33 |
+
<?php _e( "Support Forum", $wd_options->prefix ); ?>
|
|
|
34 |
</a>
|
35 |
<a href="https://web-dorado.com/support/faq.html" class="user_guide_faq" target="_blank">
|
36 |
+
<?php _e( "FAQ", $wd_options->prefix ); ?>
|
37 |
</a>
|
38 |
+
<?php if($wd_options->plugin_wd_addons_link) { ?>
|
39 |
<a href="<?php echo $wd_options->plugin_wd_addons_link; ?>" class="user_guide_addons" target="_blank">
|
40 |
+
<?php _e( "Addons", $wd_options->prefix ); ?>
|
41 |
</a>
|
42 |
<?php } ?>
|
43 |
+
</div>
|
44 |
</div>
|
45 |
</div>
|
46 |
|
wd/templates/display_overview_welcome.php
CHANGED
@@ -1,34 +1,31 @@
|
|
1 |
<div id="welcome">
|
2 |
<!-- display plugin video -->
|
3 |
-
<?php if
|
4 |
<div class="wd-video_container">
|
5 |
-
<iframe width="100%" height="400"
|
6 |
-
src="//www.youtube.com/embed/<?php echo $wd_options->video_youtube_id; ?>?rel=0" frameborder="0"
|
7 |
-
allowfullscreen></iframe>
|
8 |
</div>
|
9 |
-
<?php }
|
10 |
-
|
|
|
11 |
|
12 |
<?php } ?>
|
13 |
-
|
14 |
<!-- display plugin features -->
|
15 |
<div class="plugin_features">
|
16 |
<!-- if your plugin has a wizard-->
|
17 |
-
<?php if
|
18 |
<div class="wd-tour">
|
19 |
-
<a class="wd-tour-btn"
|
20 |
-
href="<?php echo $wd_options->plugin_wizard_link; ?>"><?php _e("Run Install Wizard ", $wd_options->prefix); ?></a>
|
21 |
</div>
|
22 |
-
<?php } ?>
|
23 |
-
<?php foreach
|
24 |
<h2 class="plugin_feature_title"><?php echo $feature["title"]; ?></h2>
|
25 |
<div class="plugin_feature_description"><?php echo $feature["description"]; ?></div>
|
26 |
<?php } ?>
|
27 |
<div class="more_features_wrap">
|
28 |
-
<a href="<?php echo $wd_options->plugin_wd_url; ?>" class="more_features"
|
29 |
-
target="_blank"><?php _e("More features", $wd_options->prefix); ?></a>
|
30 |
</div>
|
31 |
</div>
|
32 |
-
|
33 |
</div>
|
34 |
|
1 |
<div id="welcome">
|
2 |
<!-- display plugin video -->
|
3 |
+
<?php if( $wd_options->video_youtube_id ){ ?>
|
4 |
<div class="wd-video_container">
|
5 |
+
<iframe width="100%" height="400" src="//www.youtube.com/embed/<?php echo $wd_options->video_youtube_id; ?>?rel=0" frameborder="0" allowfullscreen></iframe>
|
|
|
|
|
6 |
</div>
|
7 |
+
<?php }
|
8 |
+
else if( $wd_options->overview_welcome_image ) { ?>
|
9 |
+
<img src="<?php echo $wd_options->overview_welcome_image; ?>" width="100%" />
|
10 |
|
11 |
<?php } ?>
|
12 |
+
|
13 |
<!-- display plugin features -->
|
14 |
<div class="plugin_features">
|
15 |
<!-- if your plugin has a wizard-->
|
16 |
+
<?php if( $wd_options->plugin_wizard_link ) { ?>
|
17 |
<div class="wd-tour">
|
18 |
+
<a class="wd-tour-btn" href="<?php echo $wd_options->plugin_wizard_link;?>"><?php _e( "Run Install Wizard ",$wd_options->prefix); ?></a>
|
|
|
19 |
</div>
|
20 |
+
<?php } ?>
|
21 |
+
<?php foreach( $wd_options->plugin_features as $feature ){ ?>
|
22 |
<h2 class="plugin_feature_title"><?php echo $feature["title"]; ?></h2>
|
23 |
<div class="plugin_feature_description"><?php echo $feature["description"]; ?></div>
|
24 |
<?php } ?>
|
25 |
<div class="more_features_wrap">
|
26 |
+
<a href="<?php echo $wd_options->plugin_wd_url; ?>" class="more_features" target="_blank"><?php _e( "More features", $wd_options->prefix ); ?></a>
|
|
|
27 |
</div>
|
28 |
</div>
|
29 |
+
|
30 |
</div>
|
31 |
|
wd/templates/display_subscribe.php
CHANGED
@@ -1,49 +1,47 @@
|
|
1 |
-
<div class="wd-subscribe">
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
</div>
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
<?php foreach ($list as $list_item) { ?>
|
24 |
-
<div class="list_item">
|
25 |
-
<div class="list_img_wrap"><img src="<?php echo $list_item["img"]; ?>"></div>
|
26 |
-
<div class="list_text_wrap">
|
27 |
-
<div class="list_title"><?php echo $list_item["title"]; ?></div>
|
28 |
-
<div class="list_text"><?php echo $list_item["small_text"]; ?></div>
|
29 |
-
</div>
|
30 |
-
</div>
|
31 |
-
<?php } ?>
|
32 |
-
</div>
|
33 |
-
</div>
|
34 |
-
<div class="wd-subscribe-footer">
|
35 |
-
<ul class="wd-footer-menu">
|
36 |
-
<li>
|
37 |
-
<a href="https://web-dorado.com/web-dorado-privacy-statement.html" target="_blank">
|
38 |
-
<?php _e("Privacy Policy", $wd_options->prefix); ?>
|
39 |
-
</a>
|
40 |
-
<span>.</span>
|
41 |
-
</li>
|
42 |
-
<li>
|
43 |
-
<a href="https://web-dorado.com/terms-of-service.html" target="_blank">
|
44 |
-
<?php _e("Terms of Use", $wd_options->prefix); ?>
|
45 |
-
</a>
|
46 |
-
</li>
|
47 |
-
</ul>
|
48 |
</div>
|
49 |
-
</div>
|
1 |
+
<div class="wd-subscribe">
|
2 |
+
<div class="wd-subscribe-content">
|
3 |
+
<div class="imgs">
|
4 |
+
<img src="<?php echo $wd_options->wd_url_img . '/wp_logo.png'; ?>">
|
5 |
+
<span>+</span>
|
6 |
+
<img src="<?php echo $wd_options->wd_url_img . '/' . $wd_options->prefix . '_main_plugin.png'; ?>">
|
7 |
+
</div>
|
8 |
+
<div class="texts">
|
9 |
+
<p><?php _e( "Hi there", $wd_options->prefix ); ?>,</p>
|
10 |
+
<p>
|
11 |
+
<?php echo sprintf( __( "Allow %s to collect some usage data. This will allow you to get more out of your plugin experience - get awesome customer support, receive exclusive deals and discounts on premium products and more. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix ), '<strong>Web-Dorado</strong>', $wd_options->plugin_title ); ?>
|
12 |
+
</p>
|
13 |
+
</div>
|
14 |
+
<div class="btns">
|
15 |
+
<a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&". $wd_options->prefix . "_sub_action=allow" ;?>" class="allow_and_continue"></a>
|
16 |
+
<img src="<?php echo $wd_options->wd_url_img . '/loader.gif';?>" class="wd_loader">
|
17 |
+
<a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&" . $wd_options->prefix . "_sub_action=skip" ;?>" class="skip" ></a>
|
18 |
+
</div>
|
19 |
+
<a href="#" class="permissions"><?php _e( "What data is being collected?" , $wd_options->prefix ); ?></a>
|
20 |
+
<div class="list">
|
21 |
+
<?php foreach( $list as $list_item ) { ?>
|
22 |
+
<div class="list_item">
|
23 |
+
<div class="list_img_wrap"><img src="<?php echo $list_item["img"]; ?>"></div>
|
24 |
+
<div class="list_text_wrap">
|
25 |
+
<div class="list_title"><?php echo $list_item["title"]; ?></div>
|
26 |
+
<div class="list_text"><?php echo $list_item["small_text"]; ?></div>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
<?php } ?>
|
30 |
+
</div>
|
31 |
</div>
|
32 |
+
<div class="wd-subscribe-footer">
|
33 |
+
<ul class="wd-footer-menu">
|
34 |
+
<li>
|
35 |
+
<a href="https://web-dorado.com/web-dorado-privacy-statement.html" target="_blank">
|
36 |
+
<?php _e( "Privacy Policy", $wd_options->prefix ); ?>
|
37 |
+
</a>
|
38 |
+
<span>.</span>
|
39 |
+
</li>
|
40 |
+
<li>
|
41 |
+
<a href="https://web-dorado.com/terms-of-service.html" target="_blank">
|
42 |
+
<?php _e( "Terms of Use", $wd_options->prefix ); ?>
|
43 |
+
</a>
|
44 |
+
</li>
|
45 |
+
</ul>
|
46 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
</div>
|
|
wd/wd.php
CHANGED
@@ -1,167 +1,156 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
|
4 |
-
}
|
5 |
-
|
6 |
-
class DoradoWeb
|
7 |
-
{
|
8 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
9 |
-
// Events //
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
12 |
-
// Constants //
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
-
// Variables //
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
public static $instance;
|
18 |
-
public $overview_instance;
|
19 |
-
public $subscribe_instance;
|
20 |
-
public $config;
|
21 |
-
private $version = "1.0.11";
|
22 |
-
|
23 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
-
// Constructor & Destructor //
|
25 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
26 |
-
public function __construct()
|
27 |
-
{
|
28 |
-
// Add menu for Overview page
|
29 |
-
add_action('admin_menu', array($this, 'wd_overview_menu_page'), 10);
|
30 |
-
|
31 |
}
|
32 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
33 |
-
// Public Methods //
|
34 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
-
if (!is_array($options)) {
|
41 |
-
return false;
|
42 |
-
}
|
43 |
-
$config = new DoradoWebConfig();
|
44 |
-
$config->set_options($options);
|
45 |
-
$this->config = $config;
|
46 |
-
if (!class_exists("DoradoWebApi")) {
|
47 |
-
$this->wd_includes();
|
48 |
}
|
|
|
|
|
|
|
49 |
|
50 |
-
|
51 |
-
$
|
52 |
-
|
53 |
-
}
|
54 |
-
|
55 |
-
// Create overview menu page
|
56 |
-
public function wd_overview_menu_page()
|
57 |
-
{
|
58 |
-
$wd_options = $this->config;
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
$
|
|
|
|
|
|
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
add_action('admin_print_styles-' . $subscribe_page, array($subscribe_instance, 'subscribe_styles'));
|
70 |
-
add_action('admin_print_scripts-' . $subscribe_page, array($subscribe_instance, 'subscribe_scripts'));
|
71 |
|
72 |
-
$parent_slug = null;
|
73 |
}
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
public function display_subscribew_page()
|
85 |
-
{
|
86 |
-
$this->subscribe_instance->subscribe_display_page();
|
87 |
-
}
|
88 |
-
|
89 |
-
// Display overview page
|
90 |
-
public function display_overview_page()
|
91 |
-
{
|
92 |
-
$this->overview_instance->display_overview_page();
|
93 |
-
}
|
94 |
-
|
95 |
-
|
96 |
-
// Includs
|
97 |
-
public function wd_includes()
|
98 |
-
{
|
99 |
-
$wd_options = $this->config;
|
100 |
|
101 |
-
|
102 |
-
// notices
|
103 |
-
require_once $wd_options->wd_dir_includes . '/api.php';
|
104 |
-
require_once $wd_options->wd_dir_includes . '/notices.php';
|
105 |
-
require_once $wd_options->wd_dir_includes . "/overview.php";
|
106 |
-
require_once $wd_options->wd_dir_includes . "/subscribe.php";
|
107 |
|
108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
-
|
111 |
-
{
|
112 |
-
$wd_options = $this->config;
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
}
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
-
return $links;
|
151 |
}
|
152 |
|
153 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
154 |
-
// Getters & Setters //
|
155 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
156 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
157 |
-
// Private Methods //
|
158 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
159 |
-
|
160 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
161 |
-
// Listeners //
|
162 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
163 |
-
|
164 |
-
}
|
165 |
-
|
166 |
|
167 |
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
|
|
|
|
|
|
5 |
|
6 |
+
class DoradoWeb {
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Events //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Constants //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Variables //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public static $instance;
|
17 |
+
public $overview_instance;
|
18 |
+
public $subscribe_instance;
|
19 |
+
public $config;
|
20 |
+
private $version = "1.0.13";
|
21 |
+
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Constructor & Destructor //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function __construct() {
|
26 |
+
// Add menu for Overview page
|
27 |
+
add_action( 'admin_menu', array( $this, 'wd_overview_menu_page' ), 10 );
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
+
// Public Methods //
|
32 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
33 |
|
34 |
+
// Init plugin data
|
35 |
+
public function wd_init( $options ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
if(!is_array($options)){
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
$config = new DoradoWebConfig();
|
41 |
+
$config->set_options( $options );
|
42 |
+
$this->config = $config;
|
43 |
+
if( !class_exists("DoradoWebApi") ){
|
44 |
+
$this->wd_includes();
|
45 |
+
}
|
46 |
|
47 |
+
$this->init_classes();
|
48 |
+
$this->register_hooks();
|
|
|
|
|
49 |
|
|
|
50 |
}
|
51 |
|
52 |
+
// Create overview menu page
|
53 |
+
public function wd_overview_menu_page() {
|
54 |
+
$wd_options = $this->config;
|
55 |
+
|
56 |
+
$capability = $wd_options->menu_capability ? $wd_options->menu_capability : "manage_options";
|
57 |
+
if( get_option( $wd_options->prefix . "_subscribe_done" ) == 1 || $wd_options->subscribe === false ){
|
58 |
+
$parent_slug = $wd_options->custom_post;
|
59 |
+
}
|
60 |
+
else{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
+
$subscribe_page = add_menu_page( $wd_options->plugin_menu_title, $wd_options->plugin_menu_title, "manage_options", $wd_options->prefix . '_subscribe' , array( $this, 'display_subscribew_page' ), $wd_options->plugin_menu_icon, $wd_options->menu_position );
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
+
$subscribe_instance = new DoradoWebSubscribe($this->config);
|
65 |
+
$this->subscribe_instance = $subscribe_instance;
|
66 |
+
add_action( 'admin_print_styles-' . $subscribe_page, array( $subscribe_instance, 'subscribe_styles' ) );
|
67 |
+
add_action( 'admin_print_scripts-' . $subscribe_page, array( $subscribe_instance, 'subscribe_scripts' ) );
|
68 |
+
|
69 |
+
$parent_slug = null;
|
70 |
+
}
|
71 |
|
72 |
+
$overview_page = add_submenu_page( $parent_slug, __( 'Overview', $wd_options->prefix ), __( 'Overview', $wd_options->prefix ), $capability, 'overview_' . $wd_options->prefix, array( $this, 'display_overview_page' ));
|
|
|
|
|
73 |
|
74 |
+
|
75 |
+
$overview_instance = new DoradoWebOverview($this->config);
|
76 |
+
$this->overview_instance = $overview_instance;
|
77 |
+
add_action( 'admin_print_styles-' . $overview_page, array( $overview_instance, 'overview_styles' ) );
|
78 |
+
add_action( 'admin_print_scripts-' . $overview_page, array( $overview_instance, 'overview_scripts' ) );
|
79 |
}
|
80 |
+
|
81 |
+
public function display_subscribew_page(){
|
82 |
+
$this->subscribe_instance->subscribe_display_page();
|
83 |
+
}
|
84 |
+
|
85 |
+
// Display overview page
|
86 |
+
public function display_overview_page() {
|
87 |
+
$this->overview_instance->display_overview_page();
|
88 |
+
}
|
89 |
+
|
90 |
+
|
91 |
+
// Includs
|
92 |
+
public function wd_includes(){
|
93 |
+
$wd_options = $this->config;
|
94 |
+
|
95 |
+
require_once $wd_options->wd_dir_includes . '/deactivate.php' ;
|
96 |
+
// notices
|
97 |
+
require_once $wd_options->wd_dir_includes . '/api.php';
|
98 |
+
require_once $wd_options->wd_dir_includes . '/notices.php';
|
99 |
+
require_once $wd_options->wd_dir_includes . "/overview.php";
|
100 |
+
require_once $wd_options->wd_dir_includes . "/subscribe.php";
|
101 |
+
|
102 |
}
|
103 |
+
public function init_classes(){
|
104 |
+
$wd_options = $this->config;
|
105 |
+
|
106 |
+
$current_url = $_SERVER['REQUEST_URI'];
|
107 |
+
if( $wd_options->deactivate === true ){
|
108 |
+
if(strpos( $current_url, "plugins.php" ) !== false ){
|
109 |
+
new DoradoWebDeactivate( $this->config );
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
new DoradoWebNotices( $this->config );
|
114 |
|
115 |
+
}
|
116 |
+
|
117 |
+
public function register_hooks(){
|
118 |
+
$wd_options = $this->config;
|
119 |
+
if( $wd_options->deactivate === true ){
|
120 |
+
add_filter( 'plugin_action_links_' . plugin_basename( $wd_options->plugin_main_file ), array( $this, 'change_deactivation_link' ) );
|
121 |
+
}
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
+
|
126 |
+
public function change_deactivation_link ( $links ) {
|
127 |
+
$wd_options = $this->config;
|
128 |
+
$deactivate_url =
|
129 |
+
add_query_arg(
|
130 |
+
array(
|
131 |
+
'action' => 'deactivate',
|
132 |
+
'plugin' => plugin_basename( $wd_options->plugin_main_file ),
|
133 |
+
'_wpnonce' => wp_create_nonce( 'deactivate-plugin_' . plugin_basename( $wd_options->plugin_main_file ) )
|
134 |
+
),
|
135 |
+
admin_url( 'plugins.php' )
|
136 |
+
);
|
137 |
+
|
138 |
+
$links["deactivate"] = '<a href="'.$deactivate_url.'" class="' . $wd_options->prefix . '_deactivate_link">Deactivate</a>';
|
139 |
+
return $links;
|
140 |
+
}
|
141 |
+
|
142 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
143 |
+
// Getters & Setters //
|
144 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
145 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
146 |
+
// Private Methods //
|
147 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
148 |
+
|
149 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
150 |
+
// Listeners //
|
151 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
152 |
|
|
|
153 |
}
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
|