Version Description
- Code improvements
- Added option for selecting Celsius or Fahrenheit with the Google Maps weather layer
Download this release
Release Info
Developer | WPGMaps |
Plugin | WP Google Maps |
Version | 6.0.14 |
Comparing to | |
See all releases |
Code changes from version 6.0.13 to 6.0.14
- readme.txt +11 -7
- wpGoogleMaps.php +77 -31
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== WP Google Maps ===
|
2 |
Contributors: WPGMaps
|
3 |
Donate link: http://www.wpgmaps.com
|
4 |
-
Tags: google maps, maps, map, map markers, google, google map, wp maps, wp google maps, wp google map, easy map, store locator, map plugin, directions, map directions, google map plugin, polygons, polylines, streetview, location, marker, latitude, longitude
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.9.1
|
7 |
Stable tag: trunk
|
@@ -75,12 +75,12 @@ Once installed and activated, a link should appear in your left navigation panel
|
|
75 |
|
76 |
1. The "Lite" version of WP Google Maps.
|
77 |
2. The "Pro" version of WP Google Maps.
|
78 |
-
3. Pro version: Users can get directions to your map markers
|
79 |
-
4. Pro version: Add custom markers to your Google map
|
80 |
-
5. Lite version: General settings page
|
81 |
-
6. Pro version: General settings page
|
82 |
-
7. Pro version: Export/Import your map markers
|
83 |
-
8. Pro version: Advanced Google
|
84 |
|
85 |
== Upgrade Notice ==
|
86 |
|
@@ -89,6 +89,10 @@ This is a must for users on IIS. Older WP Google Maps versions will not be compa
|
|
89 |
|
90 |
== Changelog ==
|
91 |
|
|
|
|
|
|
|
|
|
92 |
= 6.0.13 =
|
93 |
* Fixed PHP warnings and the plugin is now PHP 5.5 compatible
|
94 |
|
1 |
=== WP Google Maps ===
|
2 |
Contributors: WPGMaps
|
3 |
Donate link: http://www.wpgmaps.com
|
4 |
+
Tags: google maps, maps, map, map markers, google, google map, wp maps, wp google maps, wp google map, easy map, store locator, map plugin, directions, map directions, google map plugin, routes, polygons, polylines, streetview, location, marker, latitude, longitude
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.9.1
|
7 |
Stable tag: trunk
|
75 |
|
76 |
1. The "Lite" version of WP Google Maps.
|
77 |
2. The "Pro" version of WP Google Maps.
|
78 |
+
3. WP Google Maps Pro version: Users can get directions to your map markers
|
79 |
+
4. WP Google Maps Pro version: Add custom markers to your Google map
|
80 |
+
5. WP Google Maps Lite version: General settings page
|
81 |
+
6. WP Google Maps Pro version: General settings page
|
82 |
+
7. WP Google Maps Pro version: Export/Import your map markers
|
83 |
+
8. WP Google Maps Pro version: Advanced Google map options.
|
84 |
|
85 |
== Upgrade Notice ==
|
86 |
|
89 |
|
90 |
== Changelog ==
|
91 |
|
92 |
+
= 6.0.14 =
|
93 |
+
* Code improvements
|
94 |
+
* Added option for selecting Celsius or Fahrenheit with the Google Maps weather layer
|
95 |
+
|
96 |
= 6.0.13 =
|
97 |
* Fixed PHP warnings and the plugin is now PHP 5.5 compatible
|
98 |
|
wpGoogleMaps.php
CHANGED
@@ -3,12 +3,15 @@
|
|
3 |
Plugin Name: WP Google Maps
|
4 |
Plugin URI: http://www.wpgmaps.com
|
5 |
Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
|
6 |
-
Version: 6.0.
|
7 |
Author: WP Google Maps
|
8 |
Author URI: http://www.wpgmaps.com
|
9 |
*/
|
10 |
|
11 |
/*
|
|
|
|
|
|
|
12 |
* 6.0.13
|
13 |
* Fixed PHP Warnings
|
14 |
* Plugin is now PHP 5.5 compatible
|
@@ -103,8 +106,8 @@ $wpgmza_tblname_poly = $wpdb->prefix . "wpgmza_polygon";
|
|
103 |
$wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
|
104 |
$wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
|
105 |
$wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
|
106 |
-
$wpgmza_version = "6.0.
|
107 |
-
$wpgmza_p_version = "6.0.
|
108 |
$wpgmza_t = "basic";
|
109 |
define("WPGMAPS", $wpgmza_version);
|
110 |
define("WPGMAPS_DIR",plugin_dir_url(__FILE__));
|
@@ -230,9 +233,10 @@ function wpgmaps_activate() {
|
|
230 |
delete_option("WPGMZA");
|
231 |
|
232 |
}
|
|
|
233 |
// load first marker as an example marker
|
234 |
$results = $wpdb->get_results("SELECT * FROM $table_name WHERE `map_id` = '1'");
|
235 |
-
if (!$results) { $rows_affected = $wpdb->insert( $table_name, array( 'map_id' => '1', 'address' => 'London', 'lat' => '51.5081290', 'lng' => '-0.1280050', 'pic' => '', 'link' => '', 'icon' => '', 'anim' => '', 'title' => '', 'infoopen' => '', 'description' => '') ); }
|
236 |
|
237 |
wpgmaps_update_all_xml_file();
|
238 |
add_option("wpgmaps_current_version",$wpgmza_version);
|
@@ -520,9 +524,10 @@ function wpgmaps_admin_javascript_basic() {
|
|
520 |
$wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
|
521 |
|
522 |
$map_other_settings = maybe_unserialize($res->other_settings);
|
523 |
-
$weather_layer = $map_other_settings['weather_layer'];
|
524 |
-
$
|
525 |
-
$
|
|
|
526 |
|
527 |
|
528 |
|
@@ -1018,8 +1023,18 @@ function wpgmaps_admin_javascript_basic() {
|
|
1018 |
trafficLayer.setMap(MYMAP.map);
|
1019 |
<?php } ?>
|
1020 |
<?php if ($weather_layer == 1) { ?>
|
1021 |
-
|
1022 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1023 |
<?php } ?>
|
1024 |
<?php if ($cloud_layer == 1) { ?>
|
1025 |
var cloudLayer = new google.maps.weather.CloudLayer();
|
@@ -1147,9 +1162,10 @@ function wpgmaps_user_javascript_basic() {
|
|
1147 |
}
|
1148 |
|
1149 |
$map_other_settings = maybe_unserialize($res->other_settings);
|
1150 |
-
$weather_layer = $map_other_settings['weather_layer'];
|
1151 |
-
$
|
1152 |
-
$
|
|
|
1153 |
|
1154 |
$wpgmza_lat = $res->map_start_lat;
|
1155 |
$wpgmza_lng = $res->map_start_lng;
|
@@ -1364,8 +1380,18 @@ function wpgmaps_user_javascript_basic() {
|
|
1364 |
trafficLayer.setMap(this.map);
|
1365 |
<?php } ?>
|
1366 |
<?php if ($weather_layer == 1) { ?>
|
1367 |
-
|
1368 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1369 |
<?php } ?>
|
1370 |
<?php if ($cloud_layer == 1) { ?>
|
1371 |
var cloudLayer = new google.maps.weather.CloudLayer();
|
@@ -1829,6 +1855,7 @@ function wpgmaps_tag_basic( $atts ) {
|
|
1829 |
$wpgmza_current_map_id = $atts['id'];
|
1830 |
|
1831 |
$res = wpgmza_get_map_data($atts['id']);
|
|
|
1832 |
$short_code_active = true;
|
1833 |
//$wpgmza_data = get_option('WPGMZA');
|
1834 |
$map_align = $res->alignment;
|
@@ -1852,7 +1879,7 @@ function wpgmaps_tag_basic( $atts ) {
|
|
1852 |
|
1853 |
$map_other_settings = maybe_unserialize($res->other_settings);
|
1854 |
$sl_data = "";
|
1855 |
-
if ($map_other_settings['store_locator_enabled'] == 1) {
|
1856 |
$sl_data = wpgmaps_sl_user_output_basic($wpgmza_current_map_id);
|
1857 |
} else { $sl_data = ""; }
|
1858 |
|
@@ -1980,6 +2007,7 @@ function wpgmaps_head() {
|
|
1980 |
global $wpdb;
|
1981 |
|
1982 |
//var_dump($_POST);
|
|
|
1983 |
|
1984 |
$map_id = esc_attr($_POST['wpgmza_id']);
|
1985 |
$map_title = esc_attr($_POST['wpgmza_title']);
|
@@ -2005,6 +2033,7 @@ function wpgmaps_head() {
|
|
2005 |
$other_settings['store_locator_distance'] = intval($_POST['wpgmza_store_locator_distance']);
|
2006 |
|
2007 |
$other_settings['weather_layer'] = intval($_POST['wpgmza_weather']);
|
|
|
2008 |
$other_settings['cloud_layer'] = intval($_POST['wpgmza_cloud']);
|
2009 |
$other_settings['transport_layer'] = intval($_POST['wpgmza_transport']);
|
2010 |
|
@@ -2864,7 +2893,7 @@ function wpgmaps_settings_page_basic() {
|
|
2864 |
<h3>".__("WP Google Maps Error log","wp-google-maps")."</h3>
|
2865 |
<p>".__("Having issues? Perhaps something below can give you a clue as to what's wrong. Alternatively, email this through to nick@wpgmaps.com for help!","wp-google-maps")."</p>
|
2866 |
<textarea style='width:100%; height:600px;' readonly>
|
2867 |
-
|
2868 |
</textarea>
|
2869 |
|
2870 |
|
@@ -2942,8 +2971,8 @@ function wpgmaps_list_maps() {
|
|
2942 |
echo "<tr id=\"record_".$result->id."\">";
|
2943 |
echo "<td class='id column-id'>".$result->id."</td>";
|
2944 |
echo "<td class='map_title column-map_title'><strong><big><a href=\"?page=wp-google-maps-menu&action=edit&map_id=".$result->id."\" title=\"".__("Edit","wp-google-maps")."\">".$result->map_title."</a></big></strong><br /><a href=\"?page=wp-google-maps-menu&action=edit&map_id=".$result->id."\" title=\"".__("Edit","wp-google-maps")."\">".__("Edit","wp-google-maps")."</a> $trashlink</td>";
|
2945 |
-
echo "<td class='map_width column-map_width'>".$result->map_width."</td>";
|
2946 |
-
echo "<td class='map_width column-map_height'>".$result->map_height."</td>";
|
2947 |
echo "<td class='type column-type'>".$map_type."</td>";
|
2948 |
echo "</tr>";
|
2949 |
|
@@ -3033,12 +3062,14 @@ function wpgmza_basic_menu() {
|
|
3033 |
|
3034 |
|
3035 |
$other_settings_data = maybe_unserialize($res->other_settings);
|
3036 |
-
$wpgmza_store_locator_enabled = $other_settings_data['store_locator_enabled'];
|
3037 |
-
$wpgmza_store_locator_distance = $other_settings_data['store_locator_distance'];
|
|
|
3038 |
|
3039 |
-
$wpgmza_weather_option = $other_settings_data['weather_layer'];
|
3040 |
-
$
|
3041 |
-
$
|
|
|
3042 |
|
3043 |
|
3044 |
|
@@ -3088,6 +3119,11 @@ function wpgmza_basic_menu() {
|
|
3088 |
|
3089 |
$wpgmza_weather_layer_checked[0] = '';
|
3090 |
$wpgmza_weather_layer_checked[1] = '';
|
|
|
|
|
|
|
|
|
|
|
3091 |
$wpgmza_cloud_layer_checked[0] = '';
|
3092 |
$wpgmza_cloud_layer_checked[1] = '';
|
3093 |
$wpgmza_transport_layer_checked[0] = '';
|
@@ -3099,6 +3135,11 @@ function wpgmza_basic_menu() {
|
|
3099 |
} else {
|
3100 |
$wpgmza_weather_layer_checked[1] = 'selected';
|
3101 |
}
|
|
|
|
|
|
|
|
|
|
|
3102 |
if ($wpgmza_cloud_option == 1) {
|
3103 |
$wpgmza_cloud_layer_checked[0] = 'selected';
|
3104 |
} else {
|
@@ -3340,10 +3381,15 @@ function wpgmza_basic_menu() {
|
|
3340 |
</tr>
|
3341 |
<tr>
|
3342 |
<td width='320'>".__("Enable Weather Layer?","wp-google-maps").":</td>
|
3343 |
-
<td
|
|
|
3344 |
<option value=\"1\" ".$wpgmza_weather_layer_checked[0].">".__("Yes","wp-google-maps")."</option>
|
3345 |
<option value=\"2\" ".$wpgmza_weather_layer_checked[1].">".__("No","wp-google-maps")."</option>
|
3346 |
</select>
|
|
|
|
|
|
|
|
|
3347 |
</td>
|
3348 |
</tr>
|
3349 |
<tr>
|
@@ -4330,9 +4376,9 @@ function wpgmza_get_map_data($map_id) {
|
|
4330 |
WHERE `id` = '".$map_id."' LIMIT 1
|
4331 |
");
|
4332 |
|
4333 |
-
$
|
4334 |
|
4335 |
-
|
4336 |
|
4337 |
}
|
4338 |
function wpgmza_get_marker_data($mid) {
|
@@ -4443,11 +4489,11 @@ function wpgmza_write_to_error_log($data) {
|
|
4443 |
if (is_multisite()) {
|
4444 |
$upload_dir = wp_upload_dir();
|
4445 |
$content = "\r\n".date("Y-m-d H:i:s").": ".$data->get_error_message() . " -> ". $data->get_error_data();
|
4446 |
-
$fp = fopen($upload_dir['basedir'].'/wp-google-maps'."/error_log.txt","a+");
|
4447 |
fwrite($fp,$content);
|
4448 |
} else {
|
4449 |
$content = "\r\n".date("Y-m-d H:i:s").": ".$data->get_error_message() . " -> ". $data->get_error_data();
|
4450 |
-
$fp = fopen(ABSPATH.'wp-content/uploads/wp-google-maps'."/error_log.txt","a+");
|
4451 |
fwrite($fp,$content);
|
4452 |
}
|
4453 |
}
|
@@ -4462,14 +4508,14 @@ function wpgmza_error_directory() {
|
|
4462 |
if (!file_exists($upload_dir['basedir'].'/wp-google-maps')) {
|
4463 |
wp_mkdir_p($upload_dir['basedir'].'/wp-google-maps');
|
4464 |
$content = "Error log created";
|
4465 |
-
$fp = fopen($upload_dir['basedir'].'/wp-google-maps'."/error_log.txt","w+");
|
4466 |
fwrite($fp,$content);
|
4467 |
}
|
4468 |
} else {
|
4469 |
if (!file_exists(ABSPATH.'wp-content/uploads/wp-google-maps')) {
|
4470 |
wp_mkdir_p(ABSPATH.'wp-content/uploads/wp-google-maps');
|
4471 |
$content = "Error log created";
|
4472 |
-
$fp = fopen(ABSPATH.'wp-content/uploads/wp-google-maps'."/error_log.txt","w+");
|
4473 |
fwrite($fp,$content);
|
4474 |
}
|
4475 |
|
@@ -4479,7 +4525,7 @@ function wpgmza_error_directory() {
|
|
4479 |
}
|
4480 |
|
4481 |
function wpgmza_return_error_log() {
|
4482 |
-
$fh = fopen(ABSPATH.'wp-content/uploads/wp-google-maps'."/error_log.txt","r");
|
4483 |
$ret = "";
|
4484 |
if ($fh) {
|
4485 |
for ($i=0;$i<10;$i++) {
|
3 |
Plugin Name: WP Google Maps
|
4 |
Plugin URI: http://www.wpgmaps.com
|
5 |
Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
|
6 |
+
Version: 6.0.14
|
7 |
Author: WP Google Maps
|
8 |
Author URI: http://www.wpgmaps.com
|
9 |
*/
|
10 |
|
11 |
/*
|
12 |
+
* 6.0.14
|
13 |
+
* Fixed PHP warnings
|
14 |
+
*
|
15 |
* 6.0.13
|
16 |
* Fixed PHP Warnings
|
17 |
* Plugin is now PHP 5.5 compatible
|
106 |
$wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
|
107 |
$wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
|
108 |
$wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
|
109 |
+
$wpgmza_version = "6.0.14";
|
110 |
+
$wpgmza_p_version = "6.0.14";
|
111 |
$wpgmza_t = "basic";
|
112 |
define("WPGMAPS", $wpgmza_version);
|
113 |
define("WPGMAPS_DIR",plugin_dir_url(__FILE__));
|
233 |
delete_option("WPGMZA");
|
234 |
|
235 |
}
|
236 |
+
|
237 |
// load first marker as an example marker
|
238 |
$results = $wpdb->get_results("SELECT * FROM $table_name WHERE `map_id` = '1'");
|
239 |
+
if (!$results) { $rows_affected = $wpdb->insert( $table_name, array( 'map_id' => '1', 'address' => 'London', 'lat' => '51.5081290', 'lng' => '-0.1280050', 'pic' => '', 'link' => '', 'icon' => '', 'anim' => '', 'title' => '', 'infoopen' => '', 'description' => '', 'category' => 0) ); }
|
240 |
|
241 |
wpgmaps_update_all_xml_file();
|
242 |
add_option("wpgmaps_current_version",$wpgmza_version);
|
524 |
$wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
|
525 |
|
526 |
$map_other_settings = maybe_unserialize($res->other_settings);
|
527 |
+
if (isset($map_other_settings['weather_layer'])) { $weather_layer = $map_other_settings['weather_layer']; } else { $weather_layer = 0; }
|
528 |
+
if (isset($map_other_settings['weather_layer_temp_type'])) { $weather_layer_temp_type = $map_other_settings['weather_layer_temp_type']; } else { $weather_layer_temp_type = 0; }
|
529 |
+
if (isset($map_other_settings['cloud_layer'])) { $cloud_layer = $map_other_settings['cloud_layer']; } else { $cloud_layer = 0; }
|
530 |
+
if (isset($map_other_settings['transport_layer'])) { $transport_layer = $map_other_settings['transport_layer']; } else { $transport_layer = 0; }
|
531 |
|
532 |
|
533 |
|
1023 |
trafficLayer.setMap(MYMAP.map);
|
1024 |
<?php } ?>
|
1025 |
<?php if ($weather_layer == 1) { ?>
|
1026 |
+
<?php if($weather_layer_temp_type == 2) { ?>
|
1027 |
+
var weatherLayer = new google.maps.weather.WeatherLayer({
|
1028 |
+
temperatureUnits: google.maps.weather.TemperatureUnit.FAHRENHEIT
|
1029 |
+
});
|
1030 |
+
weatherLayer.setMap(MYMAP.map);
|
1031 |
+
<?php } else { ?>
|
1032 |
+
var weatherLayer = new google.maps.weather.WeatherLayer({
|
1033 |
+
temperatureUnits: google.maps.weather.TemperatureUnit.CELSIUS
|
1034 |
+
});
|
1035 |
+
weatherLayer.setMap(MYMAP.map);
|
1036 |
+
|
1037 |
+
<?php } ?>
|
1038 |
<?php } ?>
|
1039 |
<?php if ($cloud_layer == 1) { ?>
|
1040 |
var cloudLayer = new google.maps.weather.CloudLayer();
|
1162 |
}
|
1163 |
|
1164 |
$map_other_settings = maybe_unserialize($res->other_settings);
|
1165 |
+
if (isset($map_other_settings['weather_layer'])) { $weather_layer = $map_other_settings['weather_layer']; }
|
1166 |
+
if (isset($map_other_settings['weather_layer_temp_type'])) { $weather_layer_temp_type = $map_other_settings['weather_layer_temp_type']; } else { $weather_layer_temp_type = 0; }
|
1167 |
+
if (isset($map_other_settings['cloud_layer'])) { $cloud_layer = $map_other_settings['cloud_layer']; }
|
1168 |
+
if (isset($map_other_settings['transport_layer'])) { $transport_layer = $map_other_settings['transport_layer']; }
|
1169 |
|
1170 |
$wpgmza_lat = $res->map_start_lat;
|
1171 |
$wpgmza_lng = $res->map_start_lng;
|
1380 |
trafficLayer.setMap(this.map);
|
1381 |
<?php } ?>
|
1382 |
<?php if ($weather_layer == 1) { ?>
|
1383 |
+
<?php if($weather_layer_temp_type == 2) { ?>
|
1384 |
+
var weatherLayer = new google.maps.weather.WeatherLayer({
|
1385 |
+
temperatureUnits: google.maps.weather.TemperatureUnit.FAHRENHEIT
|
1386 |
+
});
|
1387 |
+
weatherLayer.setMap(MYMAP.map);
|
1388 |
+
<?php } else { ?>
|
1389 |
+
var weatherLayer = new google.maps.weather.WeatherLayer({
|
1390 |
+
temperatureUnits: google.maps.weather.TemperatureUnit.CELSIUS
|
1391 |
+
});
|
1392 |
+
weatherLayer.setMap(MYMAP.map);
|
1393 |
+
|
1394 |
+
<?php } ?>
|
1395 |
<?php } ?>
|
1396 |
<?php if ($cloud_layer == 1) { ?>
|
1397 |
var cloudLayer = new google.maps.weather.CloudLayer();
|
1855 |
$wpgmza_current_map_id = $atts['id'];
|
1856 |
|
1857 |
$res = wpgmza_get_map_data($atts['id']);
|
1858 |
+
if (!isset($res)) { echo __("Error: The map ID","wp-google-maps")." (".$wpgmza_current_map_id.") ".__("does not exist","wp-google-maps"); return; }
|
1859 |
$short_code_active = true;
|
1860 |
//$wpgmza_data = get_option('WPGMZA');
|
1861 |
$map_align = $res->alignment;
|
1879 |
|
1880 |
$map_other_settings = maybe_unserialize($res->other_settings);
|
1881 |
$sl_data = "";
|
1882 |
+
if (isset($map_other_settings['store_locator_enabled']) && $map_other_settings['store_locator_enabled'] == 1) {
|
1883 |
$sl_data = wpgmaps_sl_user_output_basic($wpgmza_current_map_id);
|
1884 |
} else { $sl_data = ""; }
|
1885 |
|
2007 |
global $wpdb;
|
2008 |
|
2009 |
//var_dump($_POST);
|
2010 |
+
|
2011 |
|
2012 |
$map_id = esc_attr($_POST['wpgmza_id']);
|
2013 |
$map_title = esc_attr($_POST['wpgmza_title']);
|
2033 |
$other_settings['store_locator_distance'] = intval($_POST['wpgmza_store_locator_distance']);
|
2034 |
|
2035 |
$other_settings['weather_layer'] = intval($_POST['wpgmza_weather']);
|
2036 |
+
$other_settings['weather_layer_temp_type'] = intval($_POST['wpgmza_weather_temp_type']);
|
2037 |
$other_settings['cloud_layer'] = intval($_POST['wpgmza_cloud']);
|
2038 |
$other_settings['transport_layer'] = intval($_POST['wpgmza_transport']);
|
2039 |
|
2893 |
<h3>".__("WP Google Maps Error log","wp-google-maps")."</h3>
|
2894 |
<p>".__("Having issues? Perhaps something below can give you a clue as to what's wrong. Alternatively, email this through to nick@wpgmaps.com for help!","wp-google-maps")."</p>
|
2895 |
<textarea style='width:100%; height:600px;' readonly>
|
2896 |
+
".wpgmza_return_error_log()."
|
2897 |
</textarea>
|
2898 |
|
2899 |
|
2971 |
echo "<tr id=\"record_".$result->id."\">";
|
2972 |
echo "<td class='id column-id'>".$result->id."</td>";
|
2973 |
echo "<td class='map_title column-map_title'><strong><big><a href=\"?page=wp-google-maps-menu&action=edit&map_id=".$result->id."\" title=\"".__("Edit","wp-google-maps")."\">".$result->map_title."</a></big></strong><br /><a href=\"?page=wp-google-maps-menu&action=edit&map_id=".$result->id."\" title=\"".__("Edit","wp-google-maps")."\">".__("Edit","wp-google-maps")."</a> $trashlink</td>";
|
2974 |
+
echo "<td class='map_width column-map_width'>".$result->map_width."".stripslashes($result->map_width_type)."</td>";
|
2975 |
+
echo "<td class='map_width column-map_height'>".$result->map_height."".stripslashes($result->map_height_type)."</td>";
|
2976 |
echo "<td class='type column-type'>".$map_type."</td>";
|
2977 |
echo "</tr>";
|
2978 |
|
3062 |
|
3063 |
|
3064 |
$other_settings_data = maybe_unserialize($res->other_settings);
|
3065 |
+
if (isset($other_settings_data['store_locator_enabled'])) { $wpgmza_store_locator_enabled = $other_settings_data['store_locator_enabled']; } else { $wpgmza_store_locator_enabled = 0; }
|
3066 |
+
if (isset($other_settings_data['store_locator_distance'])) { $wpgmza_store_locator_distance = $other_settings_data['store_locator_distance']; } else { $wpgmza_store_locator_distance = 0; }
|
3067 |
+
|
3068 |
|
3069 |
+
if (isset($other_settings_data['weather_layer'])) { $wpgmza_weather_option = $other_settings_data['weather_layer']; } else { $wpgmza_weather_option = 2; }
|
3070 |
+
if (isset($other_settings_data['weather_layer_temp_type'])) { $wpgmza_weather_option_temp_type = $other_settings_data['weather_layer_temp_type']; } else { $wpgmza_weather_option_temp_type = 1; }
|
3071 |
+
if (isset($other_settings_data['cloud_layer'])) { $wpgmza_cloud_option = $other_settings_data['cloud_layer']; } else { $wpgmza_cloud_option = 2; }
|
3072 |
+
if (isset($other_settings_data['transport_layer'])) { $wpgmza_transport_option = $other_settings_data['transport_layer']; } else { $wpgmza_transport_option = 2; }
|
3073 |
|
3074 |
|
3075 |
|
3119 |
|
3120 |
$wpgmza_weather_layer_checked[0] = '';
|
3121 |
$wpgmza_weather_layer_checked[1] = '';
|
3122 |
+
|
3123 |
+
$wpgmza_weather_layer_temp_type_checked[0] = '';
|
3124 |
+
$wpgmza_weather_layer_temp_type_checked[1] = '';
|
3125 |
+
|
3126 |
+
|
3127 |
$wpgmza_cloud_layer_checked[0] = '';
|
3128 |
$wpgmza_cloud_layer_checked[1] = '';
|
3129 |
$wpgmza_transport_layer_checked[0] = '';
|
3135 |
} else {
|
3136 |
$wpgmza_weather_layer_checked[1] = 'selected';
|
3137 |
}
|
3138 |
+
if ($wpgmza_weather_option_temp_type == 1) {
|
3139 |
+
$wpgmza_weather_layer_temp_type_checked[0] = 'selected';
|
3140 |
+
} else {
|
3141 |
+
$wpgmza_weather_layer_temp_type_checked[1] = 'selected';
|
3142 |
+
}
|
3143 |
if ($wpgmza_cloud_option == 1) {
|
3144 |
$wpgmza_cloud_layer_checked[0] = 'selected';
|
3145 |
} else {
|
3381 |
</tr>
|
3382 |
<tr>
|
3383 |
<td width='320'>".__("Enable Weather Layer?","wp-google-maps").":</td>
|
3384 |
+
<td>
|
3385 |
+
<select id='wpgmza_weather' name='wpgmza_weather' class='postform'>
|
3386 |
<option value=\"1\" ".$wpgmza_weather_layer_checked[0].">".__("Yes","wp-google-maps")."</option>
|
3387 |
<option value=\"2\" ".$wpgmza_weather_layer_checked[1].">".__("No","wp-google-maps")."</option>
|
3388 |
</select>
|
3389 |
+
<select id='wpgmza_weather_temp_type' name='wpgmza_weather_temp_type' class='postform'>
|
3390 |
+
<option value=\"1\" ".$wpgmza_weather_layer_temp_type_checked[0].">".__("Show in Degrees Celsius","wp-google-maps")."</option>
|
3391 |
+
<option value=\"2\" ".$wpgmza_weather_layer_temp_type_checked[1].">".__("Show in Degrees Fahrenheit","wp-google-maps")."</option>
|
3392 |
+
</select>
|
3393 |
</td>
|
3394 |
</tr>
|
3395 |
<tr>
|
4376 |
WHERE `id` = '".$map_id."' LIMIT 1
|
4377 |
");
|
4378 |
|
4379 |
+
if (isset($result[0])) { return $result[0]; }
|
4380 |
|
4381 |
+
|
4382 |
|
4383 |
}
|
4384 |
function wpgmza_get_marker_data($mid) {
|
4489 |
if (is_multisite()) {
|
4490 |
$upload_dir = wp_upload_dir();
|
4491 |
$content = "\r\n".date("Y-m-d H:i:s").": ".$data->get_error_message() . " -> ". $data->get_error_data();
|
4492 |
+
$fp = @fopen($upload_dir['basedir'].'/wp-google-maps'."/error_log.txt","a+");
|
4493 |
fwrite($fp,$content);
|
4494 |
} else {
|
4495 |
$content = "\r\n".date("Y-m-d H:i:s").": ".$data->get_error_message() . " -> ". $data->get_error_data();
|
4496 |
+
$fp = @fopen(ABSPATH.'wp-content/uploads/wp-google-maps'."/error_log.txt","a+");
|
4497 |
fwrite($fp,$content);
|
4498 |
}
|
4499 |
}
|
4508 |
if (!file_exists($upload_dir['basedir'].'/wp-google-maps')) {
|
4509 |
wp_mkdir_p($upload_dir['basedir'].'/wp-google-maps');
|
4510 |
$content = "Error log created";
|
4511 |
+
$fp = @fopen($upload_dir['basedir'].'/wp-google-maps'."/error_log.txt","w+");
|
4512 |
fwrite($fp,$content);
|
4513 |
}
|
4514 |
} else {
|
4515 |
if (!file_exists(ABSPATH.'wp-content/uploads/wp-google-maps')) {
|
4516 |
wp_mkdir_p(ABSPATH.'wp-content/uploads/wp-google-maps');
|
4517 |
$content = "Error log created";
|
4518 |
+
$fp = @fopen(ABSPATH.'wp-content/uploads/wp-google-maps'."/error_log.txt","w+");
|
4519 |
fwrite($fp,$content);
|
4520 |
}
|
4521 |
|
4525 |
}
|
4526 |
|
4527 |
function wpgmza_return_error_log() {
|
4528 |
+
$fh = @fopen(ABSPATH.'wp-content/uploads/wp-google-maps'."/error_log.txt","r");
|
4529 |
$ret = "";
|
4530 |
if ($fh) {
|
4531 |
for ($i=0;$i<10;$i++) {
|