Version Description
- Added: Multicategory markers
Download this release
Release Info
Developer | webdorado |
Plugin | WD Google Maps – Google Maps builder Plugin |
Version | 1.0.33 |
Comparing to | |
See all releases |
Code changes from version 1.0.32 to 1.0.33
- frontend/controllers/GMWDControllerFrontendMap.php +1 -3
- frontend/models/GMWDModelFrontendMap.php +4 -51
- gmwd_admin_class.php +1 -1
- readme.txt +4 -1
- sql/sql.php +1 -1
- wd-google-maps.php +1 -2
- wd/assets/css/deactivate_popup.css +1 -1
- wd/assets/css/overview.css +2 -2
- wd/config.php +0 -1
- wd/includes/deactivate.php +19 -47
- wd/includes/subscribe.php +19 -4
- wd/start.php +0 -1
- wd/templates/display_deactivation_popup.php +2 -2
- wd/templates/display_subscribe.php +2 -2
- wd/wd.php +1 -3
frontend/controllers/GMWDControllerFrontendMap.php
CHANGED
@@ -20,11 +20,9 @@ class GMWDControllerFrontendMap extends GMWDControllerFrontend{
|
|
20 |
public function get_ajax_markers(){
|
21 |
global $wpdb;
|
22 |
|
23 |
-
|
24 |
-
$searched_value = isset($_POST["search"]) && esc_html(stripslashes($_POST["search"])) != "" ? " AND (T_MARKER_CATEGORIES.title LIKE '%".esc_html(stripslashes($_POST["search"]))."%' OR T_MARKERS.title LIKE '%".esc_html(stripslashes($_POST["search"]))."%' OR T_MARKERS.description LIKE '%".esc_html(stripslashes($_POST["search"]))."%' OR T_MARKERS.address LIKE '%".esc_html(stripslashes($_POST["search"]))."%')" : "";
|
25 |
$id = (int)$_POST["map_id"];
|
26 |
|
27 |
-
$markers = $wpdb->get_results("SELECT T_MARKERS
|
28 |
$row_all_markers = array();
|
29 |
foreach($markers as $marker){
|
30 |
$row_all_markers[$marker->id] = $marker;
|
20 |
public function get_ajax_markers(){
|
21 |
global $wpdb;
|
22 |
|
|
|
|
|
23 |
$id = (int)$_POST["map_id"];
|
24 |
|
25 |
+
$markers = $wpdb->get_results("SELECT T_MARKERS.* FROM " . $wpdb->prefix . "gmwd_markers AS T_MARKERS WHERE T_MARKERS.published = '1' AND T_MARKERS.map_id= '".$id."' ORDER BY id");
|
26 |
$row_all_markers = array();
|
27 |
foreach($markers as $marker){
|
28 |
$row_all_markers[$marker->id] = $marker;
|
frontend/models/GMWDModelFrontendMap.php
CHANGED
@@ -61,19 +61,13 @@ class GMWDModelFrontendMap extends GMWDModelFrontend{
|
|
61 |
$overlays->polylines = array();
|
62 |
if($id){
|
63 |
|
64 |
-
|
65 |
-
$order_dir = isset($_POST["order_dir"]) ? esc_html(stripslashes($_POST["order_dir"])) : "";
|
66 |
-
$categories = isset($_POST["categories"]) ? esc_html(stripslashes($_POST["categories"])) : array();
|
67 |
-
array_walk($categories, create_function('&$value', '$value = (int)$value;'));
|
68 |
-
|
69 |
$radius = isset($_POST["radius"]) ? esc_html(stripslashes($_POST["radius"])) : "";
|
70 |
$lat = isset($_POST["lat"]) ? esc_html(stripslashes($_POST["lat"])) : "";
|
71 |
$lng = isset($_POST["lng"]) ? esc_html(stripslashes($_POST["lng"])) : "";
|
72 |
$distance_in = isset($_POST["distance_in"]) ? esc_html(stripslashes($_POST["distance_in"])) : "";
|
73 |
$distance_in = $distance_in == "km" ? 6371 : 3959;
|
74 |
|
75 |
-
$filter_categories = count( $categories ) > 0 ? " AND category IN (".implode(",", $categories ).")" : "";
|
76 |
-
$searched_value = isset($_POST["search"]) && $_POST["search"]!= "" ? " AND (T_MARKER_CATEGORIES.title LIKE '%".esc_html(stripslashes($_POST["search"]))."%' OR T_MARKERS.title LIKE '%".esc_html(stripslashes($_POST["search"]))."%' OR T_MARKERS.description LIKE '%".esc_html(stripslashes($_POST["search"]))."%' OR T_MARKERS.address LIKE '%".esc_html(stripslashes($_POST["search"]))."%')" : "";
|
77 |
$select_distance = "";
|
78 |
$having_distance = "";
|
79 |
if($distance_in && $radius && $lat && $lng){
|
@@ -84,7 +78,7 @@ class GMWDModelFrontendMap extends GMWDModelFrontend{
|
|
84 |
$limit = isset($_POST["limit"]) ? esc_html(stripslashes($_POST["limit"])) : 20;
|
85 |
$limit_by = " LIMIT 0, ". (int)$limit;
|
86 |
|
87 |
-
$markers = $wpdb->get_results("SELECT T_MARKERS
|
88 |
|
89 |
$row_markers = array();
|
90 |
foreach($markers as $marker){
|
@@ -92,17 +86,8 @@ class GMWDModelFrontendMap extends GMWDModelFrontend{
|
|
92 |
$row_markers[$marker->id] = $marker;
|
93 |
}
|
94 |
$overlays->markers = $row_markers;
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
$row_all_markers = array();
|
99 |
-
foreach($all_markers as $marker){
|
100 |
-
$marker->description = '';
|
101 |
-
$row_all_markers[$marker->id] = $marker;
|
102 |
-
}
|
103 |
-
$overlays->all_markers = $row_all_markers;
|
104 |
-
|
105 |
-
|
106 |
$polygons = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "gmwd_polygons WHERE map_id= '".$id."' AND published = '1' ORDER BY id ");
|
107 |
$row_polygons = array();
|
108 |
foreach($polygons as $polygon){
|
@@ -121,38 +106,6 @@ class GMWDModelFrontendMap extends GMWDModelFrontend{
|
|
121 |
return $overlays;
|
122 |
}
|
123 |
|
124 |
-
public function get_markers_page_nav(){
|
125 |
-
global $wpdb;
|
126 |
-
$params = $this->params;
|
127 |
-
$id = (int)$params["map"];
|
128 |
-
if($id){
|
129 |
-
$order_by = isset($_POST["order_by"]) ? "T_MARKERS." . esc_html(stripslashes($_POST["order_by"])) : "T_MARKERS.id";
|
130 |
-
$order_dir = isset($_POST["order_dir"]) ? esc_html(stripslashes($_POST["order_dir"])) : "";
|
131 |
-
$categories = isset($_POST["categories"]) ?esc_html(stripslashes( $_POST["categories"])) : array();
|
132 |
-
array_walk($categories, create_function('&$value', '$value = (int)$value;'));
|
133 |
-
$radius = isset($_POST["radius"]) ? esc_html(stripslashes($_POST["radius"])) : "";
|
134 |
-
$lat = isset($_POST["lat"]) ? esc_html(stripslashes($_POST["lat"])) : "";
|
135 |
-
$lng = isset($_POST["lng"]) ? esc_html(stripslashes($_POST["lng"])) : "";
|
136 |
-
$distance_in = isset($_POST["distance_in"]) ? esc_html(stripslashes($_POST["distance_in"])) : "";
|
137 |
-
$distance_in = $distance_in == "km" ? 6371 : 3959;
|
138 |
-
|
139 |
-
$filter_categories = count( $categories ) > 0 ? " AND category IN (".implode(",", $categories ).")" : "";
|
140 |
-
|
141 |
-
$searched_value = isset($_POST["search"]) && $_POST["search"]!= "" ? " AND (T_MARKER_CATEGORIES.title LIKE '%".esc_html(stripslashes($_POST["search"]))."%' OR T_MARKERS.title LIKE '%".esc_html(stripslashes($_POST["search"]))."%' OR T_MARKERS.description LIKE '%".esc_html(stripslashes($_POST["search"]))."%' OR T_MARKERS.address LIKE '%".esc_html(stripslashes($_POST["search"]))."%')" : "";
|
142 |
-
|
143 |
-
$select_distance = "";
|
144 |
-
$having_distance = "";
|
145 |
-
if($distance_in && $radius && $lat && $lng){
|
146 |
-
$select_distance = ", ( ".$distance_in." * acos( cos( radians(".$lat.") ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(".$lng.") ) + sin( radians(".$lat.") ) * sin( radians( lat ) ) ) ) AS distance";
|
147 |
-
$having_distance = "HAVING distance<".$radius;
|
148 |
-
}
|
149 |
-
|
150 |
-
$markers = $wpdb->get_results("SELECT T_MARKERS.*, T_MARKER_CATEGORIES.title AS cat_title ".$select_distance." FROM (SELECT * FROM " . $wpdb->prefix . "gmwd_markers WHERE published = '1' ) AS T_MARKERS LEFT JOIN " . $wpdb->prefix . "gmwd_markercategories AS T_MARKER_CATEGORIES ON T_MARKERS.category = T_MARKER_CATEGORIES.id WHERE T_MARKERS.map_id= '".$id."' ".$searched_value.$filter_categories. " ".$having_distance." ORDER BY ".$order_by." ".$order_dir);
|
151 |
-
return count($markers);
|
152 |
-
}
|
153 |
-
return 0;
|
154 |
-
|
155 |
-
}
|
156 |
|
157 |
public function get_theme($theme_id){
|
158 |
global $wpdb;
|
61 |
$overlays->polylines = array();
|
62 |
if($id){
|
63 |
|
64 |
+
|
|
|
|
|
|
|
|
|
65 |
$radius = isset($_POST["radius"]) ? esc_html(stripslashes($_POST["radius"])) : "";
|
66 |
$lat = isset($_POST["lat"]) ? esc_html(stripslashes($_POST["lat"])) : "";
|
67 |
$lng = isset($_POST["lng"]) ? esc_html(stripslashes($_POST["lng"])) : "";
|
68 |
$distance_in = isset($_POST["distance_in"]) ? esc_html(stripslashes($_POST["distance_in"])) : "";
|
69 |
$distance_in = $distance_in == "km" ? 6371 : 3959;
|
70 |
|
|
|
|
|
71 |
$select_distance = "";
|
72 |
$having_distance = "";
|
73 |
if($distance_in && $radius && $lat && $lng){
|
78 |
$limit = isset($_POST["limit"]) ? esc_html(stripslashes($_POST["limit"])) : 20;
|
79 |
$limit_by = " LIMIT 0, ". (int)$limit;
|
80 |
|
81 |
+
$markers = $wpdb->get_results("SELECT T_MARKERS.* ".$select_distance." FROM " . $wpdb->prefix . "gmwd_markers AS T_MARKERS WHERE T_MARKERS.published = '1' AND T_MARKERS.map_id= '".$id."' ".$having_distance." ORDER BY T_MARKERS.id");
|
82 |
|
83 |
$row_markers = array();
|
84 |
foreach($markers as $marker){
|
86 |
$row_markers[$marker->id] = $marker;
|
87 |
}
|
88 |
$overlays->markers = $row_markers;
|
89 |
+
$overlays->all_markers = $row_markers;
|
90 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
$polygons = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "gmwd_polygons WHERE map_id= '".$id."' AND published = '1' ORDER BY id ");
|
92 |
$row_polygons = array();
|
93 |
foreach($polygons as $polygon){
|
106 |
return $overlays;
|
107 |
}
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
public function get_theme($theme_id){
|
111 |
global $wpdb;
|
gmwd_admin_class.php
CHANGED
@@ -11,7 +11,7 @@ class GMWDAdmin{
|
|
11 |
// Variables //
|
12 |
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
protected static $instance = null;
|
14 |
-
private static $version = '1.0.
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
// Constructor & Destructor //
|
17 |
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
// Variables //
|
12 |
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
protected static $instance = null;
|
14 |
+
private static $version = '1.0.33';
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
// Constructor & Destructor //
|
17 |
////////////////////////////////////////////////////////////////////////////////////////
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-google-maps-plugin.html
|
|
4 |
Tags: directions, google map, google map plugin, google maps, google maps plugin, map, map markers, map plugin, map widget, maps, wp google map, wp google maps
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -113,6 +113,9 @@ After downloading the ZIP file of the Google Maps WD plugin,
|
|
113 |
|
114 |
== Changelog ==
|
115 |
|
|
|
|
|
|
|
116 |
= 1.0.32 =
|
117 |
* Fixed: Minor bug
|
118 |
|
4 |
Tags: directions, google map, google map plugin, google maps, google maps plugin, map, map markers, map plugin, map widget, maps, wp google map, wp google maps
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 1.0.33
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
+
= 1.0.33 =
|
117 |
+
* Added: Multicategory markers
|
118 |
+
|
119 |
= 1.0.32 =
|
120 |
* Fixed: Minor bug
|
121 |
|
sql/sql.php
CHANGED
@@ -107,7 +107,7 @@ function gmwd_create_tables(){
|
|
107 |
`map_id` INT(16) NOT NULL,
|
108 |
`lat` VARCHAR(256) NOT NULL,
|
109 |
`lng` VARCHAR(256) NOT NULL,
|
110 |
-
`category`
|
111 |
`title` VARCHAR(256) NOT NULL,
|
112 |
`address` VARCHAR(256) NOT NULL,
|
113 |
`animation` VARCHAR(16) NOT NULL,
|
107 |
`map_id` INT(16) NOT NULL,
|
108 |
`lat` VARCHAR(256) NOT NULL,
|
109 |
`lng` VARCHAR(256) NOT NULL,
|
110 |
+
`category` VARCHAR(256) NOT NULL,
|
111 |
`title` VARCHAR(256) NOT NULL,
|
112 |
`address` VARCHAR(256) NOT NULL,
|
113 |
`animation` VARCHAR(16) NOT NULL,
|
wd-google-maps.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Google Maps WD
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-google-maps-plugin.html
|
6 |
* Description: Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.
|
7 |
-
* Version: 1.0.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: http://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -59,7 +59,6 @@ if(!isset($_REQUEST['ajax'])){
|
|
59 |
wd_init( array (
|
60 |
"prefix" => "gmwd",
|
61 |
"wd_plugin_id" => 147,
|
62 |
-
"plugin_wd_zip_name" => "google-maps-wd.zip", // to do
|
63 |
"plugin_title" => "Google Maps WD",
|
64 |
"plugin_wordpress_slug" => "wd-google-maps",
|
65 |
"plugin_dir" => GMWD_DIR,
|
4 |
* Plugin Name: Google Maps WD
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-google-maps-plugin.html
|
6 |
* Description: Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.
|
7 |
+
* Version: 1.0.33
|
8 |
* Author: WebDorado
|
9 |
* Author URI: http://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
59 |
wd_init( array (
|
60 |
"prefix" => "gmwd",
|
61 |
"wd_plugin_id" => 147,
|
|
|
62 |
"plugin_title" => "Google Maps WD",
|
63 |
"plugin_wordpress_slug" => "wd-google-maps",
|
64 |
"plugin_dir" => GMWD_DIR,
|
wd/assets/css/deactivate_popup.css
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
background: #fff;
|
20 |
z-index: 999999;
|
21 |
width: 600px;
|
22 |
-
height:
|
23 |
margin: auto;
|
24 |
display: none;
|
25 |
box-sizing: border-box;
|
19 |
background: #fff;
|
20 |
z-index: 999999;
|
21 |
width: 600px;
|
22 |
+
height: 364px;
|
23 |
margin: auto;
|
24 |
display: none;
|
25 |
box-sizing: border-box;
|
wd/assets/css/overview.css
CHANGED
@@ -46,9 +46,9 @@ a:focus{
|
|
46 |
|
47 |
.overview_welcome h2{
|
48 |
text-transform: uppercase;
|
49 |
-
font-size:
|
50 |
margin-top: 0;
|
51 |
-
margin-bottom:
|
52 |
color: #424141;
|
53 |
}
|
54 |
.overview_welcome img{
|
46 |
|
47 |
.overview_welcome h2{
|
48 |
text-transform: uppercase;
|
49 |
+
font-size: 26px;
|
50 |
margin-top: 0;
|
51 |
+
margin-bottom: 15px;
|
52 |
color: #424141;
|
53 |
}
|
54 |
.overview_welcome img{
|
wd/config.php
CHANGED
@@ -26,7 +26,6 @@
|
|
26 |
$wd_options = new StdClass();
|
27 |
$wd_options->prefix = null;
|
28 |
$wd_options->wd_plugin_id = null;
|
29 |
-
$wd_options->plugin_wd_zip_name = null;
|
30 |
$wd_options->plugin_title = null;
|
31 |
$wd_options->plugin_wordpress_slug = null;
|
32 |
$wd_options->plugin_dir = null;
|
26 |
$wd_options = new StdClass();
|
27 |
$wd_options->prefix = null;
|
28 |
$wd_options->wd_plugin_id = null;
|
|
|
29 |
$wd_options->plugin_title = null;
|
30 |
$wd_options->plugin_wordpress_slug = null;
|
31 |
$wd_options->plugin_dir = null;
|
wd/includes/deactivate.php
CHANGED
@@ -15,61 +15,34 @@
|
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
public $deactivate_reasons = array();
|
17 |
// Reason IDs
|
18 |
-
const
|
19 |
-
const
|
20 |
-
const
|
21 |
-
const
|
22 |
-
|
23 |
-
const REASON_TECHNICAL_PROBLEMS_POOR_QUALITY = 6;
|
24 |
-
const REASON_BAD_NO_SUPPORT_BY_DEVELOPER = 7;
|
25 |
-
const REASON_OTHER = 8;
|
26 |
-
const REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION = 9;
|
27 |
-
|
28 |
-
|
29 |
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
// Constructor & Destructor //
|
31 |
////////////////////////////////////////////////////////////////////////////////////////
|
32 |
public function __construct() {
|
33 |
global $wd_options;
|
|
|
34 |
$this->deactivate_reasons = array(
|
35 |
-
|
36 |
-
'id' => self::
|
37 |
-
'text' => __( '
|
38 |
),
|
39 |
-
|
40 |
-
'id' => self::
|
41 |
-
'text' => __( '
|
42 |
),
|
43 |
-
|
44 |
-
|
45 |
-
'
|
46 |
-
'text' => __( 'Using another plugin', $wd_options->prefix ),
|
47 |
),
|
48 |
-
|
49 |
-
'id' => self::
|
50 |
-
'text' => __( '
|
51 |
),
|
52 |
-
"reason-no-longer-need-the-plugin" => array(
|
53 |
-
'id' => self::REASON_NO_LONGER_NEED_THE_PLUGIN,
|
54 |
-
'text' => __( 'No longer need the plugin', $wd_options->prefix ),
|
55 |
-
),
|
56 |
-
"reason-technical-problems-poor-quality" => array(
|
57 |
-
'id' => self::REASON_TECHNICAL_PROBLEMS_POOR_QUALITY,
|
58 |
-
'text' => __( 'Technical problems/Poor quality', $wd_options->prefix ),
|
59 |
-
),
|
60 |
-
"reason-bad-no-support-by-developer" => array(
|
61 |
-
'id' => self::REASON_BAD_NO_SUPPORT_BY_DEVELOPER,
|
62 |
-
'text' => __( 'Bad/No Support by developer', $wd_options->prefix ),
|
63 |
-
),
|
64 |
-
|
65 |
-
"reason-other" => array(
|
66 |
-
'id' => self::REASON_OTHER,
|
67 |
-
'text' => __( 'Other', $wd_options->prefix ),
|
68 |
-
),
|
69 |
-
"reason-dont-like-to-share-my-information" => array(
|
70 |
-
'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
|
71 |
-
'text' => __( 'Don\'t like to share my information', $wd_options->prefix ),
|
72 |
-
),
|
73 |
);
|
74 |
|
75 |
add_action( 'admin_footer', array( $this, 'add_deactivation_feedback_dialog_box' ) );
|
@@ -81,8 +54,7 @@
|
|
81 |
////////////////////////////////////////////////////////////////////////////////////////
|
82 |
// Public Methods //
|
83 |
////////////////////////////////////////////////////////////////////////////////////////
|
84 |
-
|
85 |
-
public function add_deactivation_feedback_dialog_box(){
|
86 |
$deactivate_reasons = $this->deactivate_reasons;
|
87 |
global $wd_options;
|
88 |
require_once( WD_DIR_TEMPLATES . '/display_deactivation_popup.php' );
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
public $deactivate_reasons = array();
|
17 |
// Reason IDs
|
18 |
+
const REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS = "reason_plugin_is_hard_to_use_technical_problems";
|
19 |
+
const REASON_FREE_VERSION_IS_LIMITED_PRO_EXPENSIVE = "reason_free_version_limited_premium_expensive";
|
20 |
+
const REASON_UPGRADING_TO_PAID_VERSION = "reason_upgrading_to_paid_version";
|
21 |
+
const REASON_TEMPORARY_DEACTIVATION = "reason_temporary_deactivation";
|
22 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
// Constructor & Destructor //
|
25 |
////////////////////////////////////////////////////////////////////////////////////////
|
26 |
public function __construct() {
|
27 |
global $wd_options;
|
28 |
+
|
29 |
$this->deactivate_reasons = array(
|
30 |
+
1 => array(
|
31 |
+
'id' => self::REASON_PLUGIN_IS_HARD_TO_USE_TECHNICAL_PROBLEMS,
|
32 |
+
'text' => __( 'Technical problems / hard to use', $wd_options->prefix ),
|
33 |
),
|
34 |
+
2 => array(
|
35 |
+
'id' => self::REASON_FREE_VERSION_IS_LIMITED_PRO_EXPENSIVE,
|
36 |
+
'text' => __( 'Free version is limited / premium is expensive', $wd_options->prefix ),
|
37 |
),
|
38 |
+
3 => array(
|
39 |
+
'id' => self::REASON_UPGRADING_TO_PAID_VERSION,
|
40 |
+
'text' => __( 'Upgrading to paid version', $wd_options->prefix ),
|
|
|
41 |
),
|
42 |
+
4 => array(
|
43 |
+
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
44 |
+
'text' => __( 'Temporary deactivation', $wd_options->prefix ),
|
45 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
);
|
47 |
|
48 |
add_action( 'admin_footer', array( $this, 'add_deactivation_feedback_dialog_box' ) );
|
54 |
////////////////////////////////////////////////////////////////////////////////////////
|
55 |
// Public Methods //
|
56 |
////////////////////////////////////////////////////////////////////////////////////////
|
57 |
+
public function add_deactivation_feedback_dialog_box(){
|
|
|
58 |
$deactivate_reasons = $this->deactivate_reasons;
|
59 |
global $wd_options;
|
60 |
require_once( WD_DIR_TEMPLATES . '/display_deactivation_popup.php' );
|
wd/includes/subscribe.php
CHANGED
@@ -48,10 +48,10 @@
|
|
48 |
"img" => WD_URL_IMG . '/sub_2.png',
|
49 |
),
|
50 |
2 => array(
|
51 |
-
"title" => __( "
|
52 |
-
"small_text" =>
|
53 |
"img" => WD_URL_IMG . '/sub_4.png',
|
54 |
-
),
|
55 |
);
|
56 |
|
57 |
require_once ( WD_DIR_TEMPLATES . "/display_subscribe.php" );
|
@@ -64,6 +64,18 @@
|
|
64 |
$hash = $api->get_hash();
|
65 |
|
66 |
if( $hash != null ){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
$data = array();
|
68 |
$data["site_url"] = site_url();
|
69 |
|
@@ -78,7 +90,9 @@
|
|
78 |
$data["wp_version"] = get_bloginfo( 'version' );
|
79 |
$data["plugin_id"] = $wd_options->wd_plugin_id;
|
80 |
$data["hash"] = $hash;
|
81 |
-
|
|
|
|
|
82 |
$response = wp_remote_post( "http://api.web-dorado.com/collectuserdata", array(
|
83 |
'method' => 'POST',
|
84 |
'timeout' => 45,
|
@@ -92,6 +106,7 @@
|
|
92 |
);
|
93 |
|
94 |
$response_body = isset( $response["body"] ) ? json_decode( $response["body"], true ) : null;
|
|
|
95 |
if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
|
96 |
|
97 |
}
|
48 |
"img" => WD_URL_IMG . '/sub_2.png',
|
49 |
),
|
50 |
2 => array(
|
51 |
+
"title" => __( "List of plugins", $wd_options->prefix ),
|
52 |
+
"small_text" => "",
|
53 |
"img" => WD_URL_IMG . '/sub_4.png',
|
54 |
+
),
|
55 |
);
|
56 |
|
57 |
require_once ( WD_DIR_TEMPLATES . "/display_subscribe.php" );
|
64 |
$hash = $api->get_hash();
|
65 |
|
66 |
if( $hash != null ){
|
67 |
+
$all_plugins = array();
|
68 |
+
$plugins = get_plugins();
|
69 |
+
foreach ( $plugins as $slug => $data ) {
|
70 |
+
$plugin = array(
|
71 |
+
"Name" => $data["Name"],
|
72 |
+
"PluginURI" => $data["PluginURI"],
|
73 |
+
"Author" => $data["Author"],
|
74 |
+
"AuthorURI" => $data["AuthorURI"]
|
75 |
+
);
|
76 |
+
$all_plugins[$slug] = $plugin;
|
77 |
+
}
|
78 |
+
|
79 |
$data = array();
|
80 |
$data["site_url"] = site_url();
|
81 |
|
90 |
$data["wp_version"] = get_bloginfo( 'version' );
|
91 |
$data["plugin_id"] = $wd_options->wd_plugin_id;
|
92 |
$data["hash"] = $hash;
|
93 |
+
$data["all_plugins"] = $all_plugins;
|
94 |
+
|
95 |
+
|
96 |
$response = wp_remote_post( "http://api.web-dorado.com/collectuserdata", array(
|
97 |
'method' => 'POST',
|
98 |
'timeout' => 45,
|
106 |
);
|
107 |
|
108 |
$response_body = isset( $response["body"] ) ? json_decode( $response["body"], true ) : null;
|
109 |
+
|
110 |
if( is_array( $response_body ) && $response_body["body"]["msg"] == "Access" ) {
|
111 |
|
112 |
}
|
wd/start.php
CHANGED
@@ -11,7 +11,6 @@
|
|
11 |
* @param options for Plugin details.
|
12 |
* prefix;
|
13 |
* wd_plugin_id;
|
14 |
-
* plugin_wd_zip_name;
|
15 |
* plugin_title;
|
16 |
* plugin_dir;
|
17 |
* plugin_url;
|
11 |
* @param options for Plugin details.
|
12 |
* prefix;
|
13 |
* wd_plugin_id;
|
|
|
14 |
* plugin_title;
|
15 |
* plugin_dir;
|
16 |
* plugin_url;
|
wd/templates/display_deactivation_popup.php
CHANGED
@@ -8,8 +8,8 @@
|
|
8 |
<div class="wd-deactivate-popup-body">
|
9 |
<?php foreach( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
|
10 |
<div class="wd-<?php echo $wd_options->prefix; ?>-reasons">
|
11 |
-
<input type="radio" value="<?php echo $deactivate_reason["id"];?>" id="<?php echo $
|
12 |
-
<label for="<?php echo $
|
13 |
</div>
|
14 |
<?php } ?>
|
15 |
<div class="additional_details_wrap">
|
8 |
<div class="wd-deactivate-popup-body">
|
9 |
<?php foreach( $deactivate_reasons as $deactivate_reason_slug => $deactivate_reason ) { ?>
|
10 |
<div class="wd-<?php echo $wd_options->prefix; ?>-reasons">
|
11 |
+
<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" >
|
12 |
+
<label for="<?php echo $wd_options->prefix . "-" . $deactivate_reason["id"]; ?>"><?php echo $deactivate_reason["text"];?></label>
|
13 |
</div>
|
14 |
<?php } ?>
|
15 |
<div class="additional_details_wrap">
|
wd/templates/display_subscribe.php
CHANGED
@@ -8,7 +8,7 @@
|
|
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
|
12 |
</p>
|
13 |
</div>
|
14 |
<div class="btns">
|
@@ -16,7 +16,7 @@
|
|
16 |
<img src="<?php echo WD_URL_IMG . '/loader.gif';?>" class="wd_loader">
|
17 |
<a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&sub_action=skip" ;?>" class="skip" ></a>
|
18 |
</div>
|
19 |
-
<a href="#" class="permissions"><?php _e( "What
|
20 |
<div class="list">
|
21 |
<?php foreach( $list as $list_item ) { ?>
|
22 |
<div class="list_item">
|
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">
|
16 |
<img src="<?php echo WD_URL_IMG . '/loader.gif';?>" class="wd_loader">
|
17 |
<a href="<?php echo "admin.php?page=" . $wd_options->prefix . "_subscribe&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">
|
wd/wd.php
CHANGED
@@ -50,9 +50,7 @@
|
|
50 |
if(isset( $options["wd_plugin_id"] )) {
|
51 |
$wd_options->wd_plugin_id = $options["wd_plugin_id"];
|
52 |
}
|
53 |
-
|
54 |
-
$wd_options->plugin_wd_zip_name = $options["plugin_wd_zip_name"];
|
55 |
-
}
|
56 |
if(isset( $options["plugin_title"] )) {
|
57 |
$wd_options->plugin_title = $options["plugin_title"];
|
58 |
}
|
50 |
if(isset( $options["wd_plugin_id"] )) {
|
51 |
$wd_options->wd_plugin_id = $options["wd_plugin_id"];
|
52 |
}
|
53 |
+
|
|
|
|
|
54 |
if(isset( $options["plugin_title"] )) {
|
55 |
$wd_options->plugin_title = $options["plugin_title"];
|
56 |
}
|