Version Description
Release Date: July 31st, 2018
- Update: Security fixes.
- Update: Verified that the plugin works with newer versions of WordPress up to 4.9.7.
Download this release
Release Info
Developer | atmistinc |
Plugin | Snazzy Maps |
Version | 1.1.4 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.1.4
- admin/explore.php +3 -4
- admin/helpers.php +7 -0
- admin/index.php +5 -4
- admin/settings.php +1 -1
- admin/styles.php +10 -9
- readme.txt +8 -2
- snazzymaps.php +2 -2
admin/explore.php
CHANGED
@@ -7,9 +7,8 @@ define('PAGE_SIZE', 3);
|
|
7 |
function render_options($options, $selected){
|
8 |
foreach((array)$options as $value => $text){
|
9 |
?>
|
10 |
-
<option value="<?php echo $value;?>"
|
11 |
-
|
12 |
-
<?php echo $text;?>
|
13 |
</option>
|
14 |
<?php
|
15 |
}
|
@@ -31,7 +30,7 @@ function admin_explore_tab($tab){
|
|
31 |
<div id="explore-list">
|
32 |
<form id="search-form" class="clearfix">
|
33 |
<div class="search-box">
|
34 |
-
<input name="text" type="text" placeholder="Search..." value="<?php echo $text ?>"/>
|
35 |
<button class="button" type="submit">Search Styles</button>
|
36 |
</div>
|
37 |
</form>
|
7 |
function render_options($options, $selected){
|
8 |
foreach((array)$options as $value => $text){
|
9 |
?>
|
10 |
+
<option value="<?php echo esc_attr($value);?>" <?php echo esc_attr($value == $selected ? 'selected' : '') ?>>
|
11 |
+
<?php echo esc_html($text);?>
|
|
|
12 |
</option>
|
13 |
<?php
|
14 |
}
|
30 |
<div id="explore-list">
|
31 |
<form id="search-form" class="clearfix">
|
32 |
<div class="search-box">
|
33 |
+
<input name="text" type="text" placeholder="Search..." value="<?php echo esc_attr($text) ?>"/>
|
34 |
<button class="button" type="submit">Search Styles</button>
|
35 |
</div>
|
36 |
</form>
|
admin/helpers.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined( 'ABSPATH' ) OR exit;
|
3 |
+
|
4 |
+
function esc_rel_url($url){
|
5 |
+
return preg_replace('/^http:\/\//', '', esc_url($url));
|
6 |
+
}
|
7 |
+
?>
|
admin/index.php
CHANGED
@@ -5,6 +5,7 @@ include_once(plugin_dir_path(__FILE__) . _DS . 'styles.php');
|
|
5 |
include_once(plugin_dir_path(__FILE__) . _DS . 'explore.php');
|
6 |
include_once(plugin_dir_path(__FILE__) . _DS . 'settings.php');
|
7 |
include_once(plugin_dir_path(__FILE__) . _DS . 'help.php');
|
|
|
8 |
|
9 |
|
10 |
function admin_perform_post (){
|
@@ -95,7 +96,7 @@ function admin_add_custom_content(){
|
|
95 |
</script>
|
96 |
<?php if(!get_option('HideWelcomeMessage', false)) { ?>
|
97 |
<div id="welcome-panel" class="box-shadow-cell welcome-panel">
|
98 |
-
<a href="?page=snazzy_maps&tab
|
99 |
<div class="row">
|
100 |
<div class="col-md-10 col-lg-6">
|
101 |
<h3>Welcome!</h3>
|
@@ -114,9 +115,9 @@ function admin_add_custom_content(){
|
|
114 |
$tabs = array('Site Styles', 'Explore', 'Settings', 'Help');
|
115 |
foreach((array)$tabs as $index => $tab){
|
116 |
?>
|
117 |
-
<a href="?page=snazzy_maps&tab
|
118 |
-
class="nav-tab <?php echo $active_tab == $index ? 'nav-tab-active' : '';?>">
|
119 |
-
<?php echo $tab;?>
|
120 |
</a>
|
121 |
<?php
|
122 |
}
|
5 |
include_once(plugin_dir_path(__FILE__) . _DS . 'explore.php');
|
6 |
include_once(plugin_dir_path(__FILE__) . _DS . 'settings.php');
|
7 |
include_once(plugin_dir_path(__FILE__) . _DS . 'help.php');
|
8 |
+
include_once(plugin_dir_path(__FILE__) . _DS . 'helpers.php');
|
9 |
|
10 |
|
11 |
function admin_perform_post (){
|
96 |
</script>
|
97 |
<?php if(!get_option('HideWelcomeMessage', false)) { ?>
|
98 |
<div id="welcome-panel" class="box-shadow-cell welcome-panel">
|
99 |
+
<a href="<?php echo esc_rel_url('?page=snazzy_maps&tab=' . $active_tab . '&welcome=hide'); ?>" class="welcome-panel-close">Dismiss</a>
|
100 |
<div class="row">
|
101 |
<div class="col-md-10 col-lg-6">
|
102 |
<h3>Welcome!</h3>
|
115 |
$tabs = array('Site Styles', 'Explore', 'Settings', 'Help');
|
116 |
foreach((array)$tabs as $index => $tab){
|
117 |
?>
|
118 |
+
<a href="<?php echo esc_rel_url('?page=snazzy_maps&tab=' . $index);?>"
|
119 |
+
class="nav-tab <?php echo esc_attr($active_tab == $index ? 'nav-tab-active' : '');?>">
|
120 |
+
<?php echo esc_html($tab);?>
|
121 |
</a>
|
122 |
<?php
|
123 |
}
|
admin/settings.php
CHANGED
@@ -28,7 +28,7 @@ defined( 'ABSPATH' ) OR exit;
|
|
28 |
|
29 |
<label for="api_key"><strong>API Key</strong></label>
|
30 |
<input type="text" id="api_key" name="api_key"
|
31 |
-
placeholder="Enter your API Key" value="<?php echo $api_key; ?>"/>
|
32 |
<button type="submit" class="button button-primary">SAVE</button>
|
33 |
<?php if(!is_null($api_key)){ ?>
|
34 |
<a href="?page=snazzy_maps&tab=2&action=delete_key"
|
28 |
|
29 |
<label for="api_key"><strong>API Key</strong></label>
|
30 |
<input type="text" id="api_key" name="api_key"
|
31 |
+
placeholder="Enter your API Key" value="<?php echo esc_attr($api_key); ?>"/>
|
32 |
<button type="submit" class="button button-primary">SAVE</button>
|
33 |
<?php if(!is_null($api_key)){ ?>
|
34 |
<a href="?page=snazzy_maps&tab=2&action=delete_key"
|
admin/styles.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) OR exit;
|
|
|
3 |
|
4 |
//Removed closures for PHP 5.0.x support
|
5 |
function _getStyleIndex(&$styles, $id){
|
@@ -16,7 +17,7 @@ defined( 'ABSPATH' ) OR exit;
|
|
16 |
}
|
17 |
|
18 |
function _styleAction(&$style, $action){
|
19 |
-
return "?page=snazzy_maps&tab=0&action=$action&style=" . $style['id'];
|
20 |
};
|
21 |
|
22 |
function admin_styles_head($tab){
|
@@ -94,11 +95,11 @@ defined( 'ABSPATH' ) OR exit;
|
|
94 |
<?php foreach((array)$styles as $index => $style){
|
95 |
$isEnabled = !is_null($defaultStyle) && $defaultStyle['id'] == $style['id'];
|
96 |
?>
|
97 |
-
<div class="style col-sm-6 col-md-4 <?php echo $isEnabled ? 'enabled' : '';?>">
|
98 |
<div class="sm-style">
|
99 |
<div class="sm-map">
|
100 |
-
<img src="<?php echo $style['imageUrl']; ?>"
|
101 |
-
alt="<?php echo $style['name']; ?>"/>
|
102 |
<?php
|
103 |
if($isEnabled) {
|
104 |
?>
|
@@ -110,21 +111,21 @@ defined( 'ABSPATH' ) OR exit;
|
|
110 |
</div>
|
111 |
<div class="sm-content info">
|
112 |
<h3>
|
113 |
-
<a href="<?php echo $style['url']; ?>" class="title" target="_blank">
|
114 |
-
<?php echo $style['name']; ?>
|
115 |
</a>
|
116 |
</h3>
|
117 |
<div class="author">
|
118 |
-
by <?php echo $style['createdBy']['name'];?></span>
|
119 |
</div>
|
120 |
<div class="stats">
|
121 |
<div class="views">
|
122 |
<span class="icon-eye"></span>
|
123 |
-
<?php echo $style['views']; ?> views
|
124 |
</div>
|
125 |
<div class="favorites">
|
126 |
<span class="icon-star"></span>
|
127 |
-
<?php echo $style['favorites']; ?> favorites
|
128 |
</div>
|
129 |
</div>
|
130 |
<?php
|
1 |
<?php
|
2 |
defined( 'ABSPATH' ) OR exit;
|
3 |
+
include_once(plugin_dir_path(__FILE__) . _DS . 'helpers.php');
|
4 |
|
5 |
//Removed closures for PHP 5.0.x support
|
6 |
function _getStyleIndex(&$styles, $id){
|
17 |
}
|
18 |
|
19 |
function _styleAction(&$style, $action){
|
20 |
+
return esc_rel_url("?page=snazzy_maps&tab=0&action=$action&style=" . $style['id']);
|
21 |
};
|
22 |
|
23 |
function admin_styles_head($tab){
|
95 |
<?php foreach((array)$styles as $index => $style){
|
96 |
$isEnabled = !is_null($defaultStyle) && $defaultStyle['id'] == $style['id'];
|
97 |
?>
|
98 |
+
<div class="style col-sm-6 col-md-4 <?php echo esc_attr($isEnabled ? 'enabled' : '');?>">
|
99 |
<div class="sm-style">
|
100 |
<div class="sm-map">
|
101 |
+
<img src="<?php echo esc_url($style['imageUrl']); ?>"
|
102 |
+
alt="<?php echo esc_attr($style['name']); ?>"/>
|
103 |
<?php
|
104 |
if($isEnabled) {
|
105 |
?>
|
111 |
</div>
|
112 |
<div class="sm-content info">
|
113 |
<h3>
|
114 |
+
<a href="<?php echo esc_url($style['url']); ?>" class="title" target="_blank">
|
115 |
+
<?php echo esc_html($style['name']); ?>
|
116 |
</a>
|
117 |
</h3>
|
118 |
<div class="author">
|
119 |
+
by <?php echo esc_html($style['createdBy']['name']);?></span>
|
120 |
</div>
|
121 |
<div class="stats">
|
122 |
<div class="views">
|
123 |
<span class="icon-eye"></span>
|
124 |
+
<?php echo esc_html($style['views']); ?> views
|
125 |
</div>
|
126 |
<div class="favorites">
|
127 |
<span class="icon-star"></span>
|
128 |
+
<?php echo esc_html($style['favorites']); ?> favorites
|
129 |
</div>
|
130 |
</div>
|
131 |
<?php
|
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: 2.8
|
6 |
-
Tested up to: 4.7
|
7 |
-
Stable tag: 1.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.3 =
|
102 |
Release Date: March 10th, 2017
|
103 |
|
3 |
Donate link: https://snazzymaps.com/about
|
4 |
Tags: google,maps,google maps,styled maps,styles,color,schemes,themes
|
5 |
Requires at least: 2.8
|
6 |
+
Tested up to: 4.9.7
|
7 |
+
Stable tag: 1.1.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 1.1.4 =
|
102 |
+
Release Date: July 31st, 2018
|
103 |
+
|
104 |
+
* Update: Security fixes.
|
105 |
+
* Update: Verified that the plugin works with newer versions of WordPress up to 4.9.7.
|
106 |
+
|
107 |
= 1.1.3 =
|
108 |
Release Date: March 10th, 2017
|
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.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('API_BASE', 'https://snazzymaps.com/');
|
32 |
define('API_KEY', 'ecaccc3c-44fa-486c-9503-5d473587a493');
|
33 |
-
define('SNAZZY_VERSION_NUMBER', '1.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.1.4
|
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('API_BASE', 'https://snazzymaps.com/');
|
32 |
define('API_KEY', 'ecaccc3c-44fa-486c-9503-5d473587a493');
|
33 |
+
define('SNAZZY_VERSION_NUMBER', '1.1.4');
|
34 |
|
35 |
if(!defined('_DS')) {
|
36 |
define('_DS', '/');
|