Version Description
- Fixes a javascript parser error when the user leave in blank the zoom attribute in the map's settings.
Download this release
Release Info
Developer | codepeople |
Plugin | Google Maps CP |
Version | 1.0.14 |
Comparing to | |
See all releases |
Code changes from version 1.0.13 to 1.0.14
- codepeople-post-map.php +1 -1
- include/functions.php +4 -3
- readme.txt +4 -0
codepeople-post-map.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Google Maps CP
|
4 |
Text Domain: codepeople-post-map
|
5 |
-
Version: 1.0.
|
6 |
Author: CodePeople
|
7 |
Author URI: http://wordpress.dwbooster.com/content-tools/codepeople-post-map
|
8 |
Plugin URI: http://wordpress.dwbooster.com/content-tools/codepeople-post-map
|
2 |
/*
|
3 |
Plugin Name: Google Maps CP
|
4 |
Text Domain: codepeople-post-map
|
5 |
+
Version: 1.0.14
|
6 |
Author: CodePeople
|
7 |
Author URI: http://wordpress.dwbooster.com/content-tools/codepeople-post-map
|
8 |
Plugin URI: http://wordpress.dwbooster.com/content-tools/codepeople-post-map
|
include/functions.php
CHANGED
@@ -145,8 +145,8 @@ class CPM {
|
|
145 |
/**
|
146 |
* Get default configuration options
|
147 |
*/
|
148 |
-
function _default_configuration(){
|
149 |
-
|
150 |
'zoom' => '10',
|
151 |
'dynamic_zoom' => false,
|
152 |
'width' => '450',
|
@@ -181,6 +181,7 @@ class CPM {
|
|
181 |
<div style='clear:both;'></div>
|
182 |
</div>"
|
183 |
);
|
|
|
184 |
} // End _default_configuration
|
185 |
|
186 |
/**
|
@@ -1210,7 +1211,7 @@ class CPM {
|
|
1210 |
|
1211 |
$output .= "var cpm_global = cpm_global || {};\n";
|
1212 |
$output .= "cpm_global['$this->map_id'] = {}; \n";
|
1213 |
-
$output .= "cpm_global['$this->map_id']['zoom'] = $zoom;\n";
|
1214 |
$output .= "cpm_global['$this->map_id']['dynamic_zoom'] = ".((isset($dynamic_zoom) && $dynamic_zoom) ? 'true' : 'false').";\n";
|
1215 |
$output .= "cpm_global['$this->map_id']['markers'] = new Array();\n";
|
1216 |
$output .= "cpm_global['$this->map_id']['display'] = '$display';\n";
|
145 |
/**
|
146 |
* Get default configuration options
|
147 |
*/
|
148 |
+
function _default_configuration( $attr = '' ){
|
149 |
+
$default = array(
|
150 |
'zoom' => '10',
|
151 |
'dynamic_zoom' => false,
|
152 |
'width' => '450',
|
181 |
<div style='clear:both;'></div>
|
182 |
</div>"
|
183 |
);
|
184 |
+
return (!empty($attr) && isset($default[$attr])) ? $default[$attr] : $default;
|
185 |
} // End _default_configuration
|
186 |
|
187 |
/**
|
1211 |
|
1212 |
$output .= "var cpm_global = cpm_global || {};\n";
|
1213 |
$output .= "cpm_global['$this->map_id'] = {}; \n";
|
1214 |
+
$output .= "cpm_global['$this->map_id']['zoom'] = ".((!empty($zoom)) ? @intval($zoom) : $this->_default_configuration('zoom')).";\n";
|
1215 |
$output .= "cpm_global['$this->map_id']['dynamic_zoom'] = ".((isset($dynamic_zoom) && $dynamic_zoom) ? 'true' : 'false').";\n";
|
1216 |
$output .= "cpm_global['$this->map_id']['markers'] = new Array();\n";
|
1217 |
$output .= "cpm_global['$this->map_id']['display'] = '$display';\n";
|
readme.txt
CHANGED
@@ -517,6 +517,10 @@ Now the most important part create the shape's area. To create the shape's area
|
|
517 |
|
518 |
== Changelog ==
|
519 |
|
|
|
|
|
|
|
|
|
520 |
= 1.0.13 =
|
521 |
|
522 |
* Fixes the issue in the plugin that clears the general settings when the updates are installed.
|
517 |
|
518 |
== Changelog ==
|
519 |
|
520 |
+
= 1.0.14 =
|
521 |
+
|
522 |
+
* Fixes a javascript parser error when the user leave in blank the zoom attribute in the map's settings.
|
523 |
+
|
524 |
= 1.0.13 =
|
525 |
|
526 |
* Fixes the issue in the plugin that clears the general settings when the updates are installed.
|