Version Description
Release Date: November 26th, 2019
- Update: Security fixes.
- Update: Verified that the plugin works with newer versions of WordPress up to the current latest (version 5.2.4).
Download this release
Release Info
Developer | atmistinc |
Plugin | Snazzy Maps |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.5 to 1.2.0
- admin/settings.php +2 -2
- admin/styles.php +4 -9
- readme.txt +8 -2
- snazzymaps.php +2 -2
admin/settings.php
CHANGED
@@ -11,7 +11,7 @@ class SnazzyMaps_Settings {
|
|
11 |
}
|
12 |
|
13 |
public static function admin_my_snazzymaps_tab($tab){
|
14 |
-
if(isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'delete_key'){
|
15 |
delete_option('MySnazzyAPIKey');
|
16 |
}
|
17 |
$api_key = get_option('MySnazzyAPIKey', null);
|
@@ -33,7 +33,7 @@ class SnazzyMaps_Settings {
|
|
33 |
<?php wp_nonce_field( 'snazzy_maps_save_api_key' ); ?>
|
34 |
<button type="submit" class="button button-primary">SAVE</button>
|
35 |
<?php if(!is_null($api_key)){ ?>
|
36 |
-
<a href="?page=snazzy_maps&tab=2&action=delete_key"
|
37 |
class="button button-error">DELETE</a>
|
38 |
<?php } ?>
|
39 |
</form>
|
11 |
}
|
12 |
|
13 |
public static function admin_my_snazzymaps_tab($tab){
|
14 |
+
if(isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'delete_key' && wp_verify_nonce($_GET['_wpnonce'], 'delete_key')){
|
15 |
delete_option('MySnazzyAPIKey');
|
16 |
}
|
17 |
$api_key = get_option('MySnazzyAPIKey', null);
|
33 |
<?php wp_nonce_field( 'snazzy_maps_save_api_key' ); ?>
|
34 |
<button type="submit" class="button button-primary">SAVE</button>
|
35 |
<?php if(!is_null($api_key)){ ?>
|
36 |
+
<a href="?page=snazzy_maps&tab=2&action=delete_key&_wpnonce=<?php echo esc_attr(wp_create_nonce('delete_key')); ?>"
|
37 |
class="button button-error">DELETE</a>
|
38 |
<?php } ?>
|
39 |
</form>
|
admin/styles.php
CHANGED
@@ -19,7 +19,7 @@ class SnazzyMaps_Styles {
|
|
19 |
}
|
20 |
|
21 |
public static function _styleAction(&$style, $action){
|
22 |
-
return \SnazzyMaps\SnazzyMaps_Helpers::esc_rel_url("?page=snazzy_maps&tab=0&action=$action&style=" . $style['id']);
|
23 |
}
|
24 |
|
25 |
public static function admin_styles_head($tab){
|
@@ -50,7 +50,7 @@ class SnazzyMaps_Styles {
|
|
50 |
|
51 |
|
52 |
//Delete the specified style from the array
|
53 |
-
if(isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'delete_style'){
|
54 |
$index = \SnazzyMaps\SnazzyMaps_Styles::_getStyleIndex($styles, sanitize_text_field($_GET['style']));
|
55 |
$defaultStyle = get_option('SnazzyMapDefaultStyle', null);
|
56 |
if(!is_null($index)){
|
@@ -66,7 +66,7 @@ class SnazzyMaps_Styles {
|
|
66 |
}
|
67 |
|
68 |
//Enable the specified style
|
69 |
-
if(isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'enable_style'){
|
70 |
$index = \SnazzyMaps\SnazzyMaps_Styles::_getStyleIndex($styles, sanitize_text_field($_GET['style']));
|
71 |
if(!is_null($index)){
|
72 |
update_option('SnazzyMapDefaultStyle', $styles[$index]);
|
@@ -74,7 +74,7 @@ class SnazzyMaps_Styles {
|
|
74 |
}
|
75 |
|
76 |
//Disable the specified style
|
77 |
-
if(isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'disable_style'){
|
78 |
$index = \SnazzyMaps\SnazzyMaps_Styles::_getStyleIndex($styles, sanitize_text_field($_GET['style']));
|
79 |
$defaultStyle = get_option('SnazzyMapDefaultStyle', null);
|
80 |
if(!is_null($index) && !is_null($defaultStyle)
|
@@ -85,11 +85,6 @@ class SnazzyMaps_Styles {
|
|
85 |
|
86 |
|
87 |
$defaultStyle = get_option('SnazzyMapDefaultStyle', null);
|
88 |
-
|
89 |
-
//Used during testing
|
90 |
-
if(isset($_GET['clear_styles'])){
|
91 |
-
delete_option('SnazzyMapStyles');
|
92 |
-
}
|
93 |
?>
|
94 |
|
95 |
<?php if (count($styles) > 0) { ?>
|
19 |
}
|
20 |
|
21 |
public static function _styleAction(&$style, $action){
|
22 |
+
return \SnazzyMaps\SnazzyMaps_Helpers::esc_rel_url("?page=snazzy_maps&tab=0&action=$action&style=" . $style['id'] . "&_wpnonce=" . wp_create_nonce($action . "_" . $style['id']));
|
23 |
}
|
24 |
|
25 |
public static function admin_styles_head($tab){
|
50 |
|
51 |
|
52 |
//Delete the specified style from the array
|
53 |
+
if(isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'delete_style' && wp_verify_nonce($_GET['_wpnonce'], 'delete_style_' . sanitize_text_field($_GET['style']))){
|
54 |
$index = \SnazzyMaps\SnazzyMaps_Styles::_getStyleIndex($styles, sanitize_text_field($_GET['style']));
|
55 |
$defaultStyle = get_option('SnazzyMapDefaultStyle', null);
|
56 |
if(!is_null($index)){
|
66 |
}
|
67 |
|
68 |
//Enable the specified style
|
69 |
+
if(isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'enable_style' && wp_verify_nonce($_GET['_wpnonce'], 'enable_style_' . sanitize_text_field($_GET['style']))){
|
70 |
$index = \SnazzyMaps\SnazzyMaps_Styles::_getStyleIndex($styles, sanitize_text_field($_GET['style']));
|
71 |
if(!is_null($index)){
|
72 |
update_option('SnazzyMapDefaultStyle', $styles[$index]);
|
74 |
}
|
75 |
|
76 |
//Disable the specified style
|
77 |
+
if(isset($_GET['action']) && sanitize_text_field($_GET['action']) == 'disable_style' && wp_verify_nonce($_GET['_wpnonce'], 'disable_style_' . sanitize_text_field($_GET['style']))){
|
78 |
$index = \SnazzyMaps\SnazzyMaps_Styles::_getStyleIndex($styles, sanitize_text_field($_GET['style']));
|
79 |
$defaultStyle = get_option('SnazzyMapDefaultStyle', null);
|
80 |
if(!is_null($index) && !is_null($defaultStyle)
|
85 |
|
86 |
|
87 |
$defaultStyle = get_option('SnazzyMapDefaultStyle', null);
|
|
|
|
|
|
|
|
|
|
|
88 |
?>
|
89 |
|
90 |
<?php if (count($styles) > 0) { ?>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: atmistinc
|
|
3 |
Donate link: https://snazzymaps.com/about
|
4 |
Tags: google,maps,google maps,styled maps,styles,color,schemes,themes
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -98,6 +98,12 @@ If you happen to find any other map plugins that don't work please send us an em
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
= 1.1.5 =
|
102 |
Release Date: August 1st, 2018
|
103 |
|
3 |
Donate link: https://snazzymaps.com/about
|
4 |
Tags: google,maps,google maps,styled maps,styles,color,schemes,themes
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 5.2.4
|
7 |
+
Stable tag: 1.2.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 1.2.0 =
|
102 |
+
Release Date: November 26th, 2019
|
103 |
+
|
104 |
+
* Update: Security fixes.
|
105 |
+
* Update: Verified that the plugin works with newer versions of WordPress up to the current latest (version 5.2.4).
|
106 |
+
|
107 |
= 1.1.5 =
|
108 |
Release Date: August 1st, 2018
|
109 |
|
snazzymaps.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Snazzy Maps
|
4 |
* Plugin URI: https://snazzymaps.com/plugins
|
5 |
* Description: Apply styles to your Google Maps with the official Snazzy Maps WordPress plugin.
|
6 |
-
* Version: 1.
|
7 |
* Author: Atmist
|
8 |
* Author URI: http://atmist.com/
|
9 |
* License: GPL2
|
@@ -30,7 +30,7 @@ defined( 'ABSPATH' ) OR exit;
|
|
30 |
//This API key is used to explore the styles in snazzy maps
|
31 |
define('SNAZZY_MAPS_API_BASE', 'https://snazzymaps.com/');
|
32 |
define('SNAZZY_MAPS_API_KEY', 'ecaccc3c-44fa-486c-9503-5d473587a493');
|
33 |
-
define('SNAZZY_MAPS_VERSION_NUMBER', '1.
|
34 |
|
35 |
if(!defined('_DS')) {
|
36 |
define('_DS', '/');
|
3 |
* Plugin Name: Snazzy Maps
|
4 |
* Plugin URI: https://snazzymaps.com/plugins
|
5 |
* Description: Apply styles to your Google Maps with the official Snazzy Maps WordPress plugin.
|
6 |
+
* Version: 1.2.0
|
7 |
* Author: Atmist
|
8 |
* Author URI: http://atmist.com/
|
9 |
* License: GPL2
|
30 |
//This API key is used to explore the styles in snazzy maps
|
31 |
define('SNAZZY_MAPS_API_BASE', 'https://snazzymaps.com/');
|
32 |
define('SNAZZY_MAPS_API_KEY', 'ecaccc3c-44fa-486c-9503-5d473587a493');
|
33 |
+
define('SNAZZY_MAPS_VERSION_NUMBER', '1.2.0');
|
34 |
|
35 |
if(!defined('_DS')) {
|
36 |
define('_DS', '/');
|