Version Description
- Added support for KML/GeoRSS layers
- Fixed the directions box styling error in Firefox
- Fixed a bug whereby the latest basic version was clashing with Pro version 3.2 and below.
- The plugin now automatically saves your last map settings as its default settings for all new maps.
- Added additional settings
Download this release
Release Info
Developer | WPGMaps |
Plugin | WP Google Maps |
Version | 4.17 |
Comparing to | |
See all releases |
Code changes from version 4.16 to 4.17
- languages/wp-google-maps-ru_RU.mo +0 -0
- languages/wp-google-maps-ru_RU.po +3 -3
- readme.txt +16 -9
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
- screenshot-3.jpg +0 -0
- screenshot-4.jpg +0 -0
- wpGoogleMaps.php +269 -82
languages/wp-google-maps-ru_RU.mo
CHANGED
Binary file
|
languages/wp-google-maps-ru_RU.po
CHANGED
@@ -3,7 +3,7 @@ msgstr ""
|
|
3 |
"Project-Id-Version: WP Google Maps v4.13\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2012-04-
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -595,10 +595,10 @@ msgid "Save Style Settings"
|
|
595 |
msgstr "Сохранить настройки стиля"
|
596 |
|
597 |
msgid "Maps"
|
598 |
-
msgstr "
|
599 |
|
600 |
msgid "Advanced"
|
601 |
-
msgstr "
|
602 |
|
603 |
msgid "Create your map"
|
604 |
msgstr "Создайте карту"
|
3 |
"Project-Id-Version: WP Google Maps v4.13\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2012-04-21 09:40+0200\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
595 |
msgstr "Сохранить настройки стиля"
|
596 |
|
597 |
msgid "Maps"
|
598 |
+
msgstr "Карты"
|
599 |
|
600 |
msgid "Advanced"
|
601 |
+
msgstr "Настройки"
|
602 |
|
603 |
msgid "Create your map"
|
604 |
msgstr "Создайте карту"
|
readme.txt
CHANGED
@@ -10,21 +10,21 @@ The easiest to use map plugin! Create custom maps with high quality markers cont
|
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
The easiest to use
|
14 |
|
15 |
= Key Features =
|
|
|
16 |
* Super easy to use, no coding required!
|
17 |
* Create as many map markers as you need by simply typing in the address
|
18 |
* Edit your markers with the click of a button
|
19 |
-
* Create a map in less than a 30 seconds!
|
20 |
* Drag markers to an exact location
|
21 |
* Google Streetview supported
|
22 |
* UTF-8 character support
|
23 |
* Can be included as a widget
|
24 |
* Support for localization
|
25 |
-
* Choose from four map
|
26 |
* Define your own width, height and zoom level for your Google Map
|
27 |
-
*
|
28 |
* WordPress 3.0 friendly
|
29 |
* No advertising or links
|
30 |
|
@@ -75,14 +75,21 @@ Previous versions may cause your blog to slow down. Upgrading to 4.5 will get ri
|
|
75 |
|
76 |
== Changelog ==
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
= 4.16 =
|
79 |
-
*
|
80 |
|
81 |
= 4.15 =
|
82 |
-
*
|
83 |
-
*
|
84 |
-
*
|
85 |
-
*
|
86 |
|
87 |
= 4.14 =
|
88 |
* We have updated our Timthumb.php file to the latest version (2.8.5 to 2.8.10) in compliance with new WordPress regulations.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
The easiest to use Google maps plugin! Create custom maps with high quality markers containing locations, descriptions, images and links and directions. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss. no iFrames and super easy to use!
|
14 |
|
15 |
= Key Features =
|
16 |
+
* Latest Google Maps API (V3)
|
17 |
* Super easy to use, no coding required!
|
18 |
* Create as many map markers as you need by simply typing in the address
|
19 |
* Edit your markers with the click of a button
|
|
|
20 |
* Drag markers to an exact location
|
21 |
* Google Streetview supported
|
22 |
* UTF-8 character support
|
23 |
* Can be included as a widget
|
24 |
* Support for localization
|
25 |
+
* Choose from four map type: roadmap, terrain, satellite and hybrid
|
26 |
* Define your own width, height and zoom level for your Google Map
|
27 |
+
* Create a map in less than a 30 seconds!
|
28 |
* WordPress 3.0 friendly
|
29 |
* No advertising or links
|
30 |
|
75 |
|
76 |
== Changelog ==
|
77 |
|
78 |
+
= 4.17 =
|
79 |
+
* Added support for KML/GeoRSS layers
|
80 |
+
* Fixed the directions box styling error in Firefox
|
81 |
+
* Fixed a bug whereby the latest basic version was clashing with Pro version 3.2 and below.
|
82 |
+
* The plugin now automatically saves your last map settings as its default settings for all new maps.
|
83 |
+
* Added additional settings
|
84 |
+
|
85 |
= 4.16 =
|
86 |
+
* Fixed a bug that caused the map to stop loading its markers if you had the latest basic version and Pro version 3.2 and below.
|
87 |
|
88 |
= 4.15 =
|
89 |
+
* Added RUSSIAN support! Thank you Sergey!
|
90 |
+
* Markers now automatically close when you click on another marker.
|
91 |
+
* More information can now be stored in the description field.
|
92 |
+
* The "To" field in the directions box now shows the address and not the GPS co-ords.
|
93 |
|
94 |
= 4.14 =
|
95 |
* We have updated our Timthumb.php file to the latest version (2.8.5 to 2.8.10) in compliance with new WordPress regulations.
|
screenshot-1.jpg
ADDED
Binary file
|
screenshot-2.jpg
ADDED
Binary file
|
screenshot-3.jpg
ADDED
Binary file
|
screenshot-4.jpg
ADDED
Binary file
|
wpGoogleMaps.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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: 4.
|
7 |
Author: WP Google Maps
|
8 |
Author URI: http://www.wpgmaps.com
|
9 |
*/
|
@@ -28,8 +28,8 @@ $wpgmza_p = false;
|
|
28 |
$wpgmza_g = false;
|
29 |
$wpgmza_tblname = $wpdb->prefix . "wpgmza";
|
30 |
$wpgmza_tblname_maps = $wpdb->prefix . "wpgmza_maps";
|
31 |
-
$wpgmza_version = "4.
|
32 |
-
$wpgmza_p_version = "4.
|
33 |
$wpgmza_t = "basic";
|
34 |
|
35 |
add_action('admin_head', 'wpgmaps_head');
|
@@ -44,6 +44,7 @@ $debug_start = (float) array_sum(explode(' ',microtime()));
|
|
44 |
|
45 |
|
46 |
|
|
|
47 |
function wpgmaps_activate() {
|
48 |
global $wpdb;
|
49 |
global $wpgmza_version;
|
@@ -145,7 +146,7 @@ function wpgmaps_reload_map_on_post() {
|
|
145 |
MYMAP.init('#wpgmza_map', myLatLng, <?php echo $start_zoom; ?>);
|
146 |
UniqueCode=Math.round(Math.random()*10010);
|
147 |
MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($_GET['map_id']); ?>?u='+UniqueCode,<?php echo $_GET['map_id']; ?>);
|
148 |
-
|
149 |
});
|
150 |
</script>
|
151 |
<?php
|
@@ -174,7 +175,7 @@ function wpgmaps_get_marker_url($mapid = false) {
|
|
174 |
if (function_exists(wpgmza_register_pro_version)) {
|
175 |
$prov = get_option("WPGMZA_PRO");
|
176 |
$wpgmza_pro_version = $prov['version'];
|
177 |
-
|
178 |
if (floatval($wpgmza_pro_version) <= 3.2 || $wpgmza_pro_version == null) {
|
179 |
return wpgmaps_get_plugin_url()."/markers.xml";
|
180 |
} else {
|
@@ -198,7 +199,8 @@ function wpgmaps_admin_edit_marker_javascript() {
|
|
198 |
$wpgmza_lat = $res->lat;
|
199 |
$wpgmza_lng = $res->lng;
|
200 |
$wpgmza_map_type = "ROADMAP";
|
201 |
-
|
|
|
202 |
|
203 |
?>
|
204 |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
@@ -226,6 +228,10 @@ function wpgmaps_admin_edit_marker_javascript() {
|
|
226 |
var myOptions = {
|
227 |
zoom:zoom,
|
228 |
center: latLng,
|
|
|
|
|
|
|
|
|
229 |
mapTypeId: google.maps.MapTypeId.<?php echo $wpgmza_map_type; ?>
|
230 |
}
|
231 |
this.map = new google.maps.Map(jQuery(selector)[0], myOptions);
|
@@ -276,7 +282,8 @@ function wpgmaps_admin_javascript_basic() {
|
|
276 |
//$wpgmza_data = get_option('WPGMZA');
|
277 |
|
278 |
$res = wpgmza_get_map_data($_GET['map_id']);
|
279 |
-
|
|
|
280 |
$wpgmza_lat = $res->map_start_lat;
|
281 |
$wpgmza_lng = $res->map_start_lng;
|
282 |
$wpgmza_width = $res->map_width;
|
@@ -288,8 +295,13 @@ function wpgmaps_admin_javascript_basic() {
|
|
288 |
else if ($wpgmza_map_type == "4") { $wpgmza_map_type = "TERRAIN"; }
|
289 |
else { $wpgmza_map_type = "ROADMAP"; }
|
290 |
$start_zoom = $res->map_start_zoom;
|
291 |
-
if ($start_zoom < 1 || !$start_zoom) {
|
292 |
-
|
|
|
|
|
|
|
|
|
|
|
293 |
|
294 |
|
295 |
?>
|
@@ -329,7 +341,7 @@ function wpgmaps_admin_javascript_basic() {
|
|
329 |
|
330 |
|
331 |
|
332 |
-
|
333 |
jQuery(".wpgmza_del_btn").live("click", function() {
|
334 |
var cur_id = jQuery(this).attr("id");
|
335 |
var wpgm_map_id = "0";
|
@@ -346,7 +358,7 @@ function wpgmaps_admin_javascript_basic() {
|
|
346 |
wpgmza_reinitialisetbl();
|
347 |
//jQuery("#wpgmza_tr_"+cur_id).css("display","none");
|
348 |
});
|
349 |
-
|
350 |
|
351 |
});
|
352 |
|
@@ -362,7 +374,7 @@ function wpgmaps_admin_javascript_basic() {
|
|
362 |
jQuery("#wpgmza_editmarker_div").show();
|
363 |
});
|
364 |
|
365 |
-
|
366 |
|
367 |
jQuery("#wpgmza_addmarker").click(function(){
|
368 |
jQuery("#wpgmza_addmarker").hide();
|
@@ -392,7 +404,7 @@ function wpgmaps_admin_javascript_basic() {
|
|
392 |
lat: wpgm_lat,
|
393 |
lng: wpgm_lng
|
394 |
};
|
395 |
-
|
396 |
jQuery.post(ajaxurl, data, function(response) {
|
397 |
wpgmza_InitMap();
|
398 |
jQuery("#wpgmza_marker_holder").html(response);
|
@@ -400,18 +412,18 @@ function wpgmaps_admin_javascript_basic() {
|
|
400 |
jQuery("#wpgmza_addmarker_loading").hide();
|
401 |
wpgmza_reinitialisetbl();
|
402 |
});
|
403 |
-
|
404 |
} else {
|
405 |
alert("Geocode was not successful for the following reason: " + status);
|
406 |
}
|
407 |
});
|
408 |
-
|
409 |
|
410 |
});
|
411 |
|
412 |
|
413 |
jQuery("#wpgmza_editmarker").click(function(){
|
414 |
-
|
415 |
jQuery("#wpgmza_editmarker_div").hide();
|
416 |
jQuery("#wpgmza_editmarker_loading").show();
|
417 |
|
@@ -424,7 +436,7 @@ function wpgmaps_admin_javascript_basic() {
|
|
424 |
if (document.getElementsByName("wpgmza_add_address").length > 0) { wpgm_address = jQuery("#wpgmza_add_address").val(); }
|
425 |
if (document.getElementsByName("wpgmza_id").length > 0) { wpgm_map_id = jQuery("#wpgmza_id").val(); }
|
426 |
|
427 |
-
|
428 |
geocoder.geocode( { 'address': wpgm_address}, function(results, status) {
|
429 |
if (status == google.maps.GeocoderStatus.OK) {
|
430 |
wpgm_gps = String(results[0].geometry.location);
|
@@ -467,8 +479,8 @@ function wpgmaps_admin_javascript_basic() {
|
|
467 |
|
468 |
});
|
469 |
|
470 |
-
|
471 |
-
|
472 |
var MYMAP = {
|
473 |
map: null,
|
474 |
bounds: null
|
@@ -477,12 +489,16 @@ function wpgmaps_admin_javascript_basic() {
|
|
477 |
var myOptions = {
|
478 |
zoom:zoom,
|
479 |
center: latLng,
|
|
|
|
|
|
|
|
|
480 |
mapTypeId: google.maps.MapTypeId.<?php echo $wpgmza_map_type; ?>
|
481 |
}
|
482 |
this.map = new google.maps.Map(jQuery(selector)[0], myOptions);
|
483 |
this.bounds = new google.maps.LatLngBounds();
|
484 |
|
485 |
-
|
486 |
google.maps.event.addListener(MYMAP.map, 'zoom_changed', function() {
|
487 |
zoomLevel = MYMAP.map.getZoom();
|
488 |
|
@@ -505,9 +521,14 @@ function wpgmaps_admin_javascript_basic() {
|
|
505 |
}
|
506 |
|
507 |
var infoWindow = new google.maps.InfoWindow();
|
508 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
|
510 |
-
|
511 |
MYMAP.placeMarkers = function(filename,map_id) {
|
512 |
marker_array = [];
|
513 |
jQuery.get(filename, function(xml){
|
@@ -525,7 +546,7 @@ function wpgmaps_admin_javascript_basic() {
|
|
525 |
|
526 |
|
527 |
});
|
528 |
-
|
529 |
var html='<strong>'+wpmgza_address+'</strong>';
|
530 |
|
531 |
google.maps.event.addListener(marker, 'click', function() {
|
@@ -542,10 +563,10 @@ function wpgmaps_admin_javascript_basic() {
|
|
542 |
});
|
543 |
}
|
544 |
|
545 |
-
|
546 |
|
547 |
|
548 |
-
|
|
|
549 |
|
550 |
</script>
|
551 |
<?php
|
@@ -560,13 +581,13 @@ function wpgmaps_user_javascript_basic() {
|
|
560 |
global $wpgmza_current_map_id;
|
561 |
wpgmaps_debugger("u_js_b_start");
|
562 |
|
563 |
-
if ($short_code_active) {
|
564 |
|
565 |
$ajax_nonce = wp_create_nonce("wpgmza");
|
566 |
|
567 |
|
568 |
$res = wpgmza_get_map_data($wpgmza_current_map_id);
|
569 |
-
|
570 |
|
571 |
$wpgmza_lat = $res->map_start_lat;
|
572 |
$wpgmza_lng = $res->map_start_lng;
|
@@ -586,7 +607,7 @@ function wpgmaps_user_javascript_basic() {
|
|
586 |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
587 |
<link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
|
588 |
<script type="text/javascript" >
|
589 |
-
|
590 |
|
591 |
jQuery(function() {
|
592 |
|
@@ -626,12 +647,17 @@ function wpgmaps_user_javascript_basic() {
|
|
626 |
google.maps.event.addListener(MYMAP.map, 'click', function() {
|
627 |
infoWindow.close();
|
628 |
});
|
629 |
-
|
630 |
|
631 |
}
|
632 |
|
633 |
-
|
634 |
-
|
|
|
|
|
|
|
|
|
|
|
635 |
|
636 |
|
637 |
MYMAP.placeMarkers = function(filename,map_id) {
|
@@ -691,14 +717,42 @@ function wpgmaps_update_xml_file($mapid = false) {
|
|
691 |
$channel = $dom->appendChild($channel_main);
|
692 |
$table_name = $wpdb->prefix . "wpgmza";
|
693 |
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
|
703 |
foreach ( $results as $result )
|
704 |
{
|
@@ -713,6 +767,7 @@ function wpgmaps_update_xml_file($mapid = false) {
|
|
713 |
$lat = $result->lat;
|
714 |
$lng = $result->lng;
|
715 |
$anim = $result->anim;
|
|
|
716 |
$mtitle = $result->title;
|
717 |
$map_id = $result->map_id;
|
718 |
|
@@ -737,15 +792,30 @@ function wpgmaps_update_xml_file($mapid = false) {
|
|
737 |
$bd->appendChild($dom->CreateTextNode($lng));
|
738 |
$bd = $channel->appendChild($dom->createElement('anim'));
|
739 |
$bd->appendChild($dom->CreateTextNode($anim));
|
|
|
|
|
|
|
740 |
|
741 |
-
|
742 |
}
|
743 |
if (is_multisite()) {
|
744 |
global $blog_id;
|
745 |
@$dom->save(WP_PLUGIN_DIR.'/'.plugin_basename(dirname(__FILE__)).'/'.$blog_id.'-'.$mapid.'markers.xml');
|
746 |
} else {
|
747 |
|
748 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
749 |
}
|
750 |
//wpgmaps_debugger("update_xml_end");
|
751 |
}
|
@@ -754,10 +824,10 @@ function wpgmaps_update_xml_file($mapid = false) {
|
|
754 |
|
755 |
function wpgmaps_update_all_xml_file() {
|
756 |
global $wpdb;
|
757 |
-
|
758 |
$table_name = $wpdb->prefix . "wpgmza_maps";
|
759 |
$results = $wpdb->get_results("SELECT `id` FROM $table_name WHERE `active` = 0");
|
760 |
-
|
761 |
foreach ( $results as $result ) {
|
762 |
$map_id = $result->id;
|
763 |
wpgmaps_update_xml_file($map_id);
|
@@ -817,7 +887,7 @@ function wpgmaps_tag_basic( $atts ) {
|
|
817 |
extract( shortcode_atts( array(
|
818 |
'id' => '1'
|
819 |
), $atts ) );
|
820 |
-
|
821 |
$wpgmza_current_map_id = $atts['id'];
|
822 |
|
823 |
$res = wpgmza_get_map_data($atts['id']);
|
@@ -825,14 +895,14 @@ function wpgmaps_tag_basic( $atts ) {
|
|
825 |
//$wpgmza_data = get_option('WPGMZA');
|
826 |
$map_align = $res->alignment;
|
827 |
|
828 |
-
|
829 |
|
830 |
if (!$map_align || $map_align == "" || $map_align == "1") { $map_align = "float:left;"; }
|
831 |
else if ($map_align == "2") { $map_align = "margin-left:auto !important; margin-right:auto; !important; align:center;"; }
|
832 |
else if ($map_align == "3") { $map_align = "float:right;"; }
|
833 |
else if ($map_align == "4") { $map_align = ""; }
|
834 |
$map_style = "style=\"display:block; width:".$res->map_width."px; height:".$res->map_height."px; $map_align\"";
|
835 |
-
|
836 |
|
837 |
$ret_msg = "
|
838 |
<style>
|
@@ -857,6 +927,15 @@ function wpgmaps_head() {
|
|
857 |
|
858 |
global $wpgmza_tblname_maps;
|
859 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
860 |
if (isset($_POST['wpgmza_savemap'])){
|
861 |
global $wpdb;
|
862 |
|
@@ -873,6 +952,18 @@ function wpgmaps_head() {
|
|
873 |
$map_start_lat = $gps[0];
|
874 |
$map_start_lng = $gps[1];
|
875 |
$map_default_marker = $_POST['upload_default_marker'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
876 |
|
877 |
|
878 |
$rows_affected = $wpdb->query( $wpdb->prepare(
|
@@ -887,7 +978,8 @@ function wpgmaps_head() {
|
|
887 |
default_marker = %s,
|
888 |
type = %d,
|
889 |
alignment = %d,
|
890 |
-
directions_enabled = %d
|
|
|
891 |
WHERE id = %d",
|
892 |
|
893 |
$map_title,
|
@@ -901,17 +993,20 @@ function wpgmaps_head() {
|
|
901 |
$type,
|
902 |
$alignment,
|
903 |
$directions_enabled,
|
|
|
904 |
$map_id)
|
905 |
);
|
906 |
|
907 |
|
908 |
|
909 |
|
910 |
-
|
|
|
|
|
911 |
echo "<div class='updated'>";
|
912 |
_e("Your settings have been saved.");
|
913 |
echo "</div>";
|
914 |
-
|
915 |
}
|
916 |
|
917 |
else if (isset($_POST['wpgmza_save_maker_location'])){
|
@@ -939,11 +1034,27 @@ function wpgmaps_head() {
|
|
939 |
echo "<div class='updated'>";
|
940 |
_e("Your marker location has been saved.");
|
941 |
echo "</div>";
|
942 |
-
|
943 |
-
|
944 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
945 |
|
946 |
|
|
|
|
|
947 |
|
948 |
wpgmaps_debugger("head_end");
|
949 |
|
@@ -959,6 +1070,7 @@ function wpgmaps_admin_menu() {
|
|
959 |
if (function_exists(wpgmza_pro_advanced_menu)) {
|
960 |
add_submenu_page('wp-google-maps-menu', 'WP Google Maps - Advanced Options', __('Advanced','wp-google-maps'), 'manage_options' , 'wp-google-maps-menu-advanced', 'wpgmaps_menu_advanced_layout');
|
961 |
}
|
|
|
962 |
|
963 |
// add_options_page('WP Google Maps', 'WP Google Maps', 'manage_options', 'wp-google-maps-menu', 'wpgmaps_menu_layout');
|
964 |
}
|
@@ -967,10 +1079,10 @@ function wpgmaps_menu_layout() {
|
|
967 |
//
|
968 |
//
|
969 |
wpgmaps_debugger("menu_start");
|
970 |
-
|
971 |
|
972 |
-
|
973 |
-
|
|
|
974 |
wpgmza_map_page();
|
975 |
|
976 |
} else {
|
@@ -1017,10 +1129,76 @@ function wpgmaps_menu_layout() {
|
|
1017 |
|
1018 |
}
|
1019 |
}
|
1020 |
-
|
1021 |
wpgmaps_debugger("menu_end");
|
1022 |
|
1023 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1024 |
function wpgmaps_menu_advanced_layout() {
|
1025 |
if (function_exists(wpgmza_register_pro_version)) {
|
1026 |
wpgmza_pro_advanced_menu();
|
@@ -1037,14 +1215,14 @@ function wpgmza_map_page() {
|
|
1037 |
wpgmaps_list_maps();
|
1038 |
} else {
|
1039 |
echo"<div class=\"wrap\"><div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br></div><h2>".__("Your Maps","wp-google-maps")."</h2>";
|
1040 |
-
echo"<p><i><a href='http://www.wpgmaps.com/purchase-professional-version
|
1041 |
wpgmaps_list_maps();
|
1042 |
|
1043 |
|
1044 |
}
|
1045 |
echo "</div>";
|
1046 |
wpgmaps_debugger("map_page_end");
|
1047 |
-
|
1048 |
}
|
1049 |
function wpgmaps_list_maps() {
|
1050 |
wpgmaps_debugger("list_maps_start");
|
@@ -1059,7 +1237,7 @@ function wpgmaps_list_maps() {
|
|
1059 |
"
|
1060 |
SELECT *
|
1061 |
FROM $table_name
|
1062 |
-
WHERE `active` = 0
|
1063 |
ORDER BY `id` DESC
|
1064 |
"
|
1065 |
);
|
@@ -1114,14 +1292,14 @@ function wpgmaps_check_versions() {
|
|
1114 |
|
1115 |
function wpgmza_basic_menu() {
|
1116 |
wpgmaps_debugger("bm_start");
|
1117 |
-
|
1118 |
global $wpgmza_tblname_maps;
|
1119 |
global $wpdb;
|
1120 |
if (!wpgmaps_check_permissions()) { wpgmaps_permission_warning(); }
|
1121 |
if ($_GET['action'] == "edit" && isset($_GET['map_id'])) {
|
1122 |
-
|
1123 |
$res = wpgmza_get_map_data($_GET['map_id']);
|
1124 |
-
|
1125 |
|
1126 |
if ($res->map_start_zoom) { $wpgmza_zoom[intval($res->map_start_zoom)] = "SELECTED"; } else { $wpgmza_zoom[8] = "SELECTED"; }
|
1127 |
if ($res->type) { $wpgmza_map_type[intval($res->type)] = "SELECTED"; } else { $wpgmza_map_type[1] = "SELECTED"; }
|
@@ -1129,11 +1307,11 @@ function wpgmza_basic_menu() {
|
|
1129 |
|
1130 |
|
1131 |
$wpgmza_act = "disabled readonly";
|
1132 |
-
$wpgmza_act_msg = "<span style=\"font-size:16px; color:#666;\">".__("Add custom icons, titles, descriptions, pictures and links to your markers with the","wp-google-maps")." \"<a href=\"http://www.wpgmaps.com/purchase-professional-version
|
1133 |
-
$wpgmza_csv = "<p><a href=\"http://www.wpgmaps.com
|
1134 |
}
|
1135 |
echo "
|
1136 |
-
|
1137 |
<div class='wrap'>
|
1138 |
<h1>WP Google Maps</h1>
|
1139 |
<div class='wide'>
|
@@ -1190,7 +1368,7 @@ function wpgmza_basic_menu() {
|
|
1190 |
|
1191 |
<tr>
|
1192 |
<td>".__("Default Marker Image","wp-google-maps").":</td>
|
1193 |
-
<td><input id=\"upload_default_marker\" name=\"upload_default_marker\" type='hidden' size='35' maxlength='700' value='' ".$wpgmza_act."/> <input id=\"upload_default_marker_btn\" type=\"button\" value=\"".__("Upload Image","wp-google-maps")."\" $wpgmza_act /><small><i> ".__("available in the","wp-google-maps")." <a href=\"http://www.wpgmaps.com/purchase-professional-version
|
1194 |
</tr>
|
1195 |
<tr>
|
1196 |
<td>".__("Map type","wp-google-maps").":</td>
|
@@ -1212,6 +1390,12 @@ function wpgmza_basic_menu() {
|
|
1212 |
</select>
|
1213 |
</td>
|
1214 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
1215 |
|
1216 |
|
1217 |
</table>
|
@@ -1278,7 +1462,7 @@ function wpgmza_basic_menu() {
|
|
1278 |
<table>
|
1279 |
<tr>
|
1280 |
<td><img src=\"".wpgmaps_get_plugin_url()."/images/custom_markers.jpg\" width=\"160\" style=\"border:3px solid #808080;\" title=\"".__("Add detailed information to your markers!")."\" alt=\"".__("Add custom markers to your map!","wp-google-maps")."\" /><br /><br /></td>
|
1281 |
-
<td valign=\"middle\"><span style=\"font-size:18px; color:#666;\">".__("Add detailed information to your markers for only","wp-google-maps")." <strong>$9.99</strong>. ".__("Click","wp-google-maps")." <a href=\"http://www.wpgmaps.com/purchase-professional-version
|
1282 |
</tr>
|
1283 |
<tr>
|
1284 |
<td><img src=\"".wpgmaps_get_plugin_url()."/images/custom_marker_icons.jpg\" width=\"160\" style=\"border:3px solid #808080;\" title=\"".__("Add custom markers to your map!","wp-google-maps")."\" alt=\"".__("Add custom markers to your map!","wp-google-maps")."\" /><br /><br /></td>
|
@@ -1286,7 +1470,7 @@ function wpgmza_basic_menu() {
|
|
1286 |
</tr>
|
1287 |
<tr>
|
1288 |
<td><img src=\"".wpgmaps_get_plugin_url()."/images/get_directions.jpg\" width=\"160\" style=\"border:3px solid #808080;\" title=\"".__("Add custom markers to your map!","wp-google-maps")."\" alt=\"".__("Add custom markers to your map!","wp-google-maps")."\" /><br /><br /></td>
|
1289 |
-
<td valign=\"middle\"><span style=\"font-size:18px; color:#666;\">".__("Allow your visitors to get directions to your markers!","wp-google-maps")." ".__("Click","wp-google-maps")." <a href=\"http://www.wpgmaps.com/purchase-professional-version
|
1290 |
</tr>
|
1291 |
</table>
|
1292 |
|
@@ -1302,7 +1486,7 @@ function wpgmza_basic_menu() {
|
|
1302 |
|
1303 |
";
|
1304 |
|
1305 |
-
|
1306 |
|
1307 |
wpgmaps_debugger("bm_end");
|
1308 |
|
@@ -1343,10 +1527,10 @@ function wpgmza_edit_marker($mid) {
|
|
1343 |
|
1344 |
|
1345 |
<div id=\"wpgmza_map\"> </div>
|
1346 |
-
|
1347 |
<p>$wpgmza_act_msg</p>
|
1348 |
-
|
1349 |
-
|
1350 |
|
1351 |
</form>
|
1352 |
</div>
|
@@ -1372,8 +1556,8 @@ function wpgmaps_admin_scripts() {
|
|
1372 |
wpgmaps_debugger("admin_scripts_start");
|
1373 |
wp_enqueue_script('media-upload');
|
1374 |
wp_enqueue_script('thickbox');
|
1375 |
-
wp_register_script('my-upload', WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)).'/upload.js', array('jquery','media-upload','thickbox'));
|
1376 |
-
wp_enqueue_script('my-upload');
|
1377 |
wpgmaps_debugger("admin_scripts_end");
|
1378 |
|
1379 |
}
|
@@ -1384,7 +1568,7 @@ function wpgmaps_admin_styles() {
|
|
1384 |
|
1385 |
if (isset($_GET['page']) && $_GET['page'] == 'wp-google-maps-menu') {
|
1386 |
wpgmaps_debugger("load_scripts_styles_start");
|
1387 |
-
|
1388 |
add_action('admin_print_scripts', 'wpgmaps_admin_scripts');
|
1389 |
add_action('admin_print_styles', 'wpgmaps_admin_styles');
|
1390 |
wpgmaps_debugger("load_scripts_styles_end");
|
@@ -1436,14 +1620,14 @@ function wpgmza_return_marker_list($map_id) {
|
|
1436 |
$img = $result->pic;
|
1437 |
$link = $result->link;
|
1438 |
$icon = $result->icon;
|
1439 |
-
|
1440 |
if (!$img) { $pic = ""; } else { $pic = "<img src=\"".$result->pic."\" width=\"40\" />"; }
|
1441 |
if (!$icon) { $icon = $default_icon; } else { $icon = "<img src='".$result->icon."' />"; }
|
1442 |
if (!$link) { $linktd = ""; } else { $linktd = "<a href=\"".$result->link."\" target=\"_BLANK\" title=\"".__("View this link","wp-google-maps")."\">>></a>"; }
|
1443 |
$wpgmza_tmp .= "
|
1444 |
<tr id=\"wpgmza_tr_".$result->id."\">
|
1445 |
<td height=\"40\">".$result->id."</td>
|
1446 |
-
<td height=\"40\">".$icon."<input type=\"hidden\" id=\"wpgmza_hid_marker_icon_".$result->id."\" value=\"".$result->icon."\" /><input type=\"hidden\" id=\"wpgmza_hid_marker_anim_".$result->id."\" value=\"".$result->anim."\" /></td>
|
1447 |
<td>".$result->title."<input type=\"hidden\" id=\"wpgmza_hid_marker_title_".$result->id."\" value=\"".$result->title."\" /></td>
|
1448 |
<td>".$result->address."<input type=\"hidden\" id=\"wpgmza_hid_marker_address_".$result->id."\" value=\"".$result->address."\" /></td>
|
1449 |
<td>".$result->desc."<input type=\"hidden\" id=\"wpgmza_hid_marker_desc_".$result->id."\" value=\"".$result->desc."\" /></td>
|
@@ -1496,7 +1680,7 @@ if (function_exists(wpgmza_register_pro_version)) {
|
|
1496 |
add_action('wp_ajax_delete_marker', 'wpgmaps_action_callback_pro');
|
1497 |
add_action('wp_ajax_edit_marker', 'wpgmaps_action_callback_pro');
|
1498 |
add_action('template_redirect','wpgmaps_check_shortcode');
|
1499 |
-
|
1500 |
if (function_exists(wpgmza_register_gold_version)) {
|
1501 |
add_action('wp_footer', 'wpgmaps_user_javascript_gold');
|
1502 |
add_action('admin_head', 'wpgmaps_admin_javascript_gold');
|
@@ -1523,12 +1707,13 @@ function wpgmaps_check_shortcode() {
|
|
1523 |
$short_code_active = false;
|
1524 |
$pattern = get_shortcode_regex();
|
1525 |
|
1526 |
-
foreach ($posts as $
|
1527 |
-
preg_match_all('/'.$pattern.'/s', $
|
1528 |
foreach ($matches as $match) {
|
1529 |
if (is_array($match)) {
|
1530 |
foreach($match as $key => $val) {
|
1531 |
$pos = strpos($val, "wpgmza");
|
|
|
1532 |
if ($pos === false) { } else { $short_code_active = true; }
|
1533 |
}
|
1534 |
}
|
@@ -1619,6 +1804,7 @@ function wpgmaps_handle_db() {
|
|
1619 |
`lng` varchar(100) NOT NULL,
|
1620 |
`anim` varchar(3) NOT NULL,
|
1621 |
`title` varchar(700) NOT NULL,
|
|
|
1622 |
PRIMARY KEY (`id`)
|
1623 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
1624 |
";
|
@@ -1648,6 +1834,7 @@ function wpgmaps_handle_db() {
|
|
1648 |
`styling_enabled` INT(10) NOT NULL,
|
1649 |
`styling_json` mediumtext NOT NULL,
|
1650 |
`active` INT(1) NOT NULL,
|
|
|
1651 |
PRIMARY KEY (`id`)
|
1652 |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
1653 |
";
|
@@ -1665,7 +1852,7 @@ function wpgmaps_handle_db() {
|
|
1665 |
function wpgmza_get_map_data($map_id) {
|
1666 |
global $wpdb;
|
1667 |
global $wpgmza_tblname_maps;
|
1668 |
-
|
1669 |
$result = $wpdb->get_results("
|
1670 |
SELECT *
|
1671 |
FROM $wpgmza_tblname_maps
|
@@ -1734,7 +1921,7 @@ function wpgmaps_trash_map($map_id) {
|
|
1734 |
}
|
1735 |
|
1736 |
function wpgmaps_debugger($section) {
|
1737 |
-
|
1738 |
global $debug;
|
1739 |
global $debug_start;
|
1740 |
global $debug_step;
|
@@ -1744,4 +1931,4 @@ function wpgmaps_debugger($section) {
|
|
1744 |
}
|
1745 |
|
1746 |
}
|
1747 |
-
?>
|
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: 4.17
|
7 |
Author: WP Google Maps
|
8 |
Author URI: http://www.wpgmaps.com
|
9 |
*/
|
28 |
$wpgmza_g = false;
|
29 |
$wpgmza_tblname = $wpdb->prefix . "wpgmza";
|
30 |
$wpgmza_tblname_maps = $wpdb->prefix . "wpgmza_maps";
|
31 |
+
$wpgmza_version = "4.17";
|
32 |
+
$wpgmza_p_version = "4.17";
|
33 |
$wpgmza_t = "basic";
|
34 |
|
35 |
add_action('admin_head', 'wpgmaps_head');
|
44 |
|
45 |
|
46 |
|
47 |
+
|
48 |
function wpgmaps_activate() {
|
49 |
global $wpdb;
|
50 |
global $wpgmza_version;
|
146 |
MYMAP.init('#wpgmza_map', myLatLng, <?php echo $start_zoom; ?>);
|
147 |
UniqueCode=Math.round(Math.random()*10010);
|
148 |
MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url($_GET['map_id']); ?>?u='+UniqueCode,<?php echo $_GET['map_id']; ?>);
|
149 |
+
|
150 |
});
|
151 |
</script>
|
152 |
<?php
|
175 |
if (function_exists(wpgmza_register_pro_version)) {
|
176 |
$prov = get_option("WPGMZA_PRO");
|
177 |
$wpgmza_pro_version = $prov['version'];
|
178 |
+
|
179 |
if (floatval($wpgmza_pro_version) <= 3.2 || $wpgmza_pro_version == null) {
|
180 |
return wpgmaps_get_plugin_url()."/markers.xml";
|
181 |
} else {
|
199 |
$wpgmza_lat = $res->lat;
|
200 |
$wpgmza_lng = $res->lng;
|
201 |
$wpgmza_map_type = "ROADMAP";
|
202 |
+
|
203 |
+
$wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
|
204 |
|
205 |
?>
|
206 |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
228 |
var myOptions = {
|
229 |
zoom:zoom,
|
230 |
center: latLng,
|
231 |
+
zoomControl: <?php if ($wpgmza_settings['wpgmza_settings_map_zoom'] == "yes") { echo "false"; } else { echo "true"; } ?>,
|
232 |
+
panControl: <?php if ($wpgmza_settings['wpgmza_settings_map_pan'] == "yes") { echo "false"; } else { echo "true"; } ?>,
|
233 |
+
mapTypeControl: <?php if ($wpgmza_settings['wpgmza_settings_map_type'] == "yes") { echo "false"; } else { echo "true"; } ?>,
|
234 |
+
streetViewControl: <?php if ($wpgmza_settings['wpgmza_settings_map_streetview'] == "yes") { echo "false"; } else { echo "true"; } ?>,
|
235 |
mapTypeId: google.maps.MapTypeId.<?php echo $wpgmza_map_type; ?>
|
236 |
}
|
237 |
this.map = new google.maps.Map(jQuery(selector)[0], myOptions);
|
282 |
//$wpgmza_data = get_option('WPGMZA');
|
283 |
|
284 |
$res = wpgmza_get_map_data($_GET['map_id']);
|
285 |
+
$wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
|
286 |
+
|
287 |
$wpgmza_lat = $res->map_start_lat;
|
288 |
$wpgmza_lng = $res->map_start_lng;
|
289 |
$wpgmza_width = $res->map_width;
|
295 |
else if ($wpgmza_map_type == "4") { $wpgmza_map_type = "TERRAIN"; }
|
296 |
else { $wpgmza_map_type = "ROADMAP"; }
|
297 |
$start_zoom = $res->map_start_zoom;
|
298 |
+
if ($start_zoom < 1 || !$start_zoom) {
|
299 |
+
$start_zoom = 5;
|
300 |
+
}
|
301 |
+
if (!$wpgmza_lat || !$wpgmza_lng) {
|
302 |
+
$wpgmza_lat = "51.5081290";
|
303 |
+
$wpgmza_lng = "-0.1280050";
|
304 |
+
}
|
305 |
|
306 |
|
307 |
?>
|
341 |
|
342 |
|
343 |
|
344 |
+
|
345 |
jQuery(".wpgmza_del_btn").live("click", function() {
|
346 |
var cur_id = jQuery(this).attr("id");
|
347 |
var wpgm_map_id = "0";
|
358 |
wpgmza_reinitialisetbl();
|
359 |
//jQuery("#wpgmza_tr_"+cur_id).css("display","none");
|
360 |
});
|
361 |
+
|
362 |
|
363 |
});
|
364 |
|
374 |
jQuery("#wpgmza_editmarker_div").show();
|
375 |
});
|
376 |
|
377 |
+
|
378 |
|
379 |
jQuery("#wpgmza_addmarker").click(function(){
|
380 |
jQuery("#wpgmza_addmarker").hide();
|
404 |
lat: wpgm_lat,
|
405 |
lng: wpgm_lng
|
406 |
};
|
407 |
+
|
408 |
jQuery.post(ajaxurl, data, function(response) {
|
409 |
wpgmza_InitMap();
|
410 |
jQuery("#wpgmza_marker_holder").html(response);
|
412 |
jQuery("#wpgmza_addmarker_loading").hide();
|
413 |
wpgmza_reinitialisetbl();
|
414 |
});
|
415 |
+
|
416 |
} else {
|
417 |
alert("Geocode was not successful for the following reason: " + status);
|
418 |
}
|
419 |
});
|
420 |
+
|
421 |
|
422 |
});
|
423 |
|
424 |
|
425 |
jQuery("#wpgmza_editmarker").click(function(){
|
426 |
+
|
427 |
jQuery("#wpgmza_editmarker_div").hide();
|
428 |
jQuery("#wpgmza_editmarker_loading").show();
|
429 |
|
436 |
if (document.getElementsByName("wpgmza_add_address").length > 0) { wpgm_address = jQuery("#wpgmza_add_address").val(); }
|
437 |
if (document.getElementsByName("wpgmza_id").length > 0) { wpgm_map_id = jQuery("#wpgmza_id").val(); }
|
438 |
|
439 |
+
|
440 |
geocoder.geocode( { 'address': wpgm_address}, function(results, status) {
|
441 |
if (status == google.maps.GeocoderStatus.OK) {
|
442 |
wpgm_gps = String(results[0].geometry.location);
|
479 |
|
480 |
});
|
481 |
|
482 |
+
|
483 |
+
|
484 |
var MYMAP = {
|
485 |
map: null,
|
486 |
bounds: null
|
489 |
var myOptions = {
|
490 |
zoom:zoom,
|
491 |
center: latLng,
|
492 |
+
zoomControl: <?php if ($wpgmza_settings['wpgmza_settings_map_zoom'] == "yes") { echo "false"; } else { echo "true"; } ?>,
|
493 |
+
panControl: <?php if ($wpgmza_settings['wpgmza_settings_map_pan'] == "yes") { echo "false"; } else { echo "true"; } ?>,
|
494 |
+
mapTypeControl: <?php if ($wpgmza_settings['wpgmza_settings_map_type'] == "yes") { echo "false"; } else { echo "true"; } ?>,
|
495 |
+
streetViewControl: <?php if ($wpgmza_settings['wpgmza_settings_map_streetview'] == "yes") { echo "false"; } else { echo "true"; } ?>,
|
496 |
mapTypeId: google.maps.MapTypeId.<?php echo $wpgmza_map_type; ?>
|
497 |
}
|
498 |
this.map = new google.maps.Map(jQuery(selector)[0], myOptions);
|
499 |
this.bounds = new google.maps.LatLngBounds();
|
500 |
|
501 |
+
|
502 |
google.maps.event.addListener(MYMAP.map, 'zoom_changed', function() {
|
503 |
zoomLevel = MYMAP.map.getZoom();
|
504 |
|
521 |
}
|
522 |
|
523 |
var infoWindow = new google.maps.InfoWindow();
|
524 |
+
<?php
|
525 |
+
$wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
|
526 |
+
$wpgmza_settings_infowindow_width = $wpgmza_settings['wpgmza_settings_infowindow_width'];
|
527 |
+
if (!$wpgmza_settings_infowindow_width || !isset($wpgmza_settings_infowindow_width)) { $wpgmza_settings_infowindow_width = "200"; }
|
528 |
+
?>
|
529 |
+
infoWindow.setOptions({maxWidth:<?php echo $wpgmza_settings_infowindow_width; ?>});
|
530 |
+
|
531 |
|
|
|
532 |
MYMAP.placeMarkers = function(filename,map_id) {
|
533 |
marker_array = [];
|
534 |
jQuery.get(filename, function(xml){
|
546 |
|
547 |
|
548 |
});
|
549 |
+
|
550 |
var html='<strong>'+wpmgza_address+'</strong>';
|
551 |
|
552 |
google.maps.event.addListener(marker, 'click', function() {
|
563 |
});
|
564 |
}
|
565 |
|
|
|
566 |
|
567 |
|
568 |
+
|
569 |
+
|
570 |
|
571 |
</script>
|
572 |
<?php
|
581 |
global $wpgmza_current_map_id;
|
582 |
wpgmaps_debugger("u_js_b_start");
|
583 |
|
584 |
+
if ($short_code_active) {
|
585 |
|
586 |
$ajax_nonce = wp_create_nonce("wpgmza");
|
587 |
|
588 |
|
589 |
$res = wpgmza_get_map_data($wpgmza_current_map_id);
|
590 |
+
|
591 |
|
592 |
$wpgmza_lat = $res->map_start_lat;
|
593 |
$wpgmza_lng = $res->map_start_lng;
|
607 |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
608 |
<link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
|
609 |
<script type="text/javascript" >
|
610 |
+
|
611 |
|
612 |
jQuery(function() {
|
613 |
|
647 |
google.maps.event.addListener(MYMAP.map, 'click', function() {
|
648 |
infoWindow.close();
|
649 |
});
|
650 |
+
|
651 |
|
652 |
}
|
653 |
|
654 |
+
var infoWindow = new google.maps.InfoWindow();
|
655 |
+
<?php
|
656 |
+
$wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
|
657 |
+
$wpgmza_settings_infowindow_width = $wpgmza_settings['wpgmza_settings_infowindow_width'];
|
658 |
+
if (!$wpgmza_settings_infowindow_width || !isset($wpgmza_settings_infowindow_width)) { $wpgmza_settings_infowindow_width = "200"; }
|
659 |
+
?>
|
660 |
+
infoWindow.setOptions({maxWidth:<?php echo $wpgmza_settings_infowindow_width; ?>});
|
661 |
|
662 |
|
663 |
MYMAP.placeMarkers = function(filename,map_id) {
|
717 |
$channel = $dom->appendChild($channel_main);
|
718 |
$table_name = $wpdb->prefix . "wpgmza";
|
719 |
|
720 |
+
|
721 |
+
// PREVIOUS VERSION HANDLING
|
722 |
+
if (function_exists(wpgmza_register_pro_version)) {
|
723 |
+
$prov = get_option("WPGMZA_PRO");
|
724 |
+
$wpgmza_pro_version = $prov['version'];
|
725 |
+
if (floatval($wpgmza_pro_version) <= 3.2 || $wpgmza_pro_version == null) {
|
726 |
+
$results = $wpdb->get_results(
|
727 |
+
"
|
728 |
+
SELECT *
|
729 |
+
FROM $table_name
|
730 |
+
"
|
731 |
+
);
|
732 |
+
} else {
|
733 |
+
$results = $wpdb->get_results(
|
734 |
+
"
|
735 |
+
SELECT *
|
736 |
+
FROM $table_name
|
737 |
+
WHERE `map_id` = '$mapid'
|
738 |
+
|
739 |
+
"
|
740 |
+
);
|
741 |
+
}
|
742 |
+
}
|
743 |
+
else {
|
744 |
+
$results = $wpdb->get_results(
|
745 |
+
"
|
746 |
+
SELECT *
|
747 |
+
FROM $table_name
|
748 |
+
WHERE `map_id` = '$mapid'
|
749 |
+
|
750 |
+
"
|
751 |
+
);
|
752 |
+
}
|
753 |
+
|
754 |
+
|
755 |
+
|
756 |
|
757 |
foreach ( $results as $result )
|
758 |
{
|
767 |
$lat = $result->lat;
|
768 |
$lng = $result->lng;
|
769 |
$anim = $result->anim;
|
770 |
+
$infoopen = $result->infoopen;
|
771 |
$mtitle = $result->title;
|
772 |
$map_id = $result->map_id;
|
773 |
|
792 |
$bd->appendChild($dom->CreateTextNode($lng));
|
793 |
$bd = $channel->appendChild($dom->createElement('anim'));
|
794 |
$bd->appendChild($dom->CreateTextNode($anim));
|
795 |
+
$bd = $channel->appendChild($dom->createElement('infoopen'));
|
796 |
+
$bd->appendChild($dom->CreateTextNode($infoopen));
|
797 |
+
|
798 |
|
|
|
799 |
}
|
800 |
if (is_multisite()) {
|
801 |
global $blog_id;
|
802 |
@$dom->save(WP_PLUGIN_DIR.'/'.plugin_basename(dirname(__FILE__)).'/'.$blog_id.'-'.$mapid.'markers.xml');
|
803 |
} else {
|
804 |
|
805 |
+
// PREVIOUS VERSION HANDLING
|
806 |
+
if (function_exists(wpgmza_register_pro_version)) {
|
807 |
+
$prov = get_option("WPGMZA_PRO");
|
808 |
+
$wpgmza_pro_version = $prov['version'];
|
809 |
+
if (floatval($wpgmza_pro_version) <= 3.2 || $wpgmza_pro_version == null) {
|
810 |
+
@$dom->save(WP_PLUGIN_DIR.'/'.plugin_basename(dirname(__FILE__)).'/markers.xml');
|
811 |
+
} else {
|
812 |
+
@$dom->save(WP_PLUGIN_DIR.'/'.plugin_basename(dirname(__FILE__)).'/'.$mapid.'markers.xml');
|
813 |
+
}
|
814 |
+
}
|
815 |
+
else {
|
816 |
+
@$dom->save(WP_PLUGIN_DIR.'/'.plugin_basename(dirname(__FILE__)).'/'.$mapid.'markers.xml');
|
817 |
+
}
|
818 |
+
|
819 |
}
|
820 |
//wpgmaps_debugger("update_xml_end");
|
821 |
}
|
824 |
|
825 |
function wpgmaps_update_all_xml_file() {
|
826 |
global $wpdb;
|
827 |
+
|
828 |
$table_name = $wpdb->prefix . "wpgmza_maps";
|
829 |
$results = $wpdb->get_results("SELECT `id` FROM $table_name WHERE `active` = 0");
|
830 |
+
|
831 |
foreach ( $results as $result ) {
|
832 |
$map_id = $result->id;
|
833 |
wpgmaps_update_xml_file($map_id);
|
887 |
extract( shortcode_atts( array(
|
888 |
'id' => '1'
|
889 |
), $atts ) );
|
890 |
+
|
891 |
$wpgmza_current_map_id = $atts['id'];
|
892 |
|
893 |
$res = wpgmza_get_map_data($atts['id']);
|
895 |
//$wpgmza_data = get_option('WPGMZA');
|
896 |
$map_align = $res->alignment;
|
897 |
|
898 |
+
|
899 |
|
900 |
if (!$map_align || $map_align == "" || $map_align == "1") { $map_align = "float:left;"; }
|
901 |
else if ($map_align == "2") { $map_align = "margin-left:auto !important; margin-right:auto; !important; align:center;"; }
|
902 |
else if ($map_align == "3") { $map_align = "float:right;"; }
|
903 |
else if ($map_align == "4") { $map_align = ""; }
|
904 |
$map_style = "style=\"display:block; width:".$res->map_width."px; height:".$res->map_height."px; $map_align\"";
|
905 |
+
|
906 |
|
907 |
$ret_msg = "
|
908 |
<style>
|
927 |
|
928 |
global $wpgmza_tblname_maps;
|
929 |
|
930 |
+
if (isset($_POST['wpgmza_savesettings'])) {
|
931 |
+
global $wpdb;
|
932 |
+
|
933 |
+
|
934 |
+
|
935 |
+
|
936 |
+
}
|
937 |
+
|
938 |
+
|
939 |
if (isset($_POST['wpgmza_savemap'])){
|
940 |
global $wpdb;
|
941 |
|
952 |
$map_start_lat = $gps[0];
|
953 |
$map_start_lng = $gps[1];
|
954 |
$map_default_marker = $_POST['upload_default_marker'];
|
955 |
+
$kml = attribute_escape($_POST['wpgmza_kml']);
|
956 |
+
|
957 |
+
$data['map_default_starting_lat'] = $map_start_lat;
|
958 |
+
$data['map_default_starting_lng'] = $map_start_lng;
|
959 |
+
$data['map_default_height'] = $map_height;
|
960 |
+
$data['map_default_width'] = $map_width;
|
961 |
+
$data['map_default_zoom'] = $map_start_zoom;
|
962 |
+
$data['map_default_type'] = $type;
|
963 |
+
$data['map_default_alignment'] = $alignment;
|
964 |
+
$data['map_default_directions'] = $directions_enabled;
|
965 |
+
$data['map_default_marker'] = $map_default_marker;
|
966 |
+
|
967 |
|
968 |
|
969 |
$rows_affected = $wpdb->query( $wpdb->prepare(
|
978 |
default_marker = %s,
|
979 |
type = %d,
|
980 |
alignment = %d,
|
981 |
+
directions_enabled = %d,
|
982 |
+
kml = %s
|
983 |
WHERE id = %d",
|
984 |
|
985 |
$map_title,
|
993 |
$type,
|
994 |
$alignment,
|
995 |
$directions_enabled,
|
996 |
+
$kml,
|
997 |
$map_id)
|
998 |
);
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 |
+
update_option('WPGMZA_SETTINGS', $data);
|
1004 |
+
|
1005 |
+
|
1006 |
echo "<div class='updated'>";
|
1007 |
_e("Your settings have been saved.");
|
1008 |
echo "</div>";
|
1009 |
+
|
1010 |
}
|
1011 |
|
1012 |
else if (isset($_POST['wpgmza_save_maker_location'])){
|
1034 |
echo "<div class='updated'>";
|
1035 |
_e("Your marker location has been saved.");
|
1036 |
echo "</div>";
|
1037 |
+
|
1038 |
+
|
1039 |
}
|
1040 |
+
else if (isset($_POST['wpgmza_save_settings'])){
|
1041 |
+
global $wpdb;
|
1042 |
+
$wpgmza_data['wpgmza_settings_image_width'] = attribute_escape($_POST['wpgmza_settings_image_width']);
|
1043 |
+
$wpgmza_data['wpgmza_settings_image_height'] = attribute_escape($_POST['wpgmza_settings_image_height']);
|
1044 |
+
$wpgmza_data['wpgmza_settings_use_timthumb'] = attribute_escape($_POST['wpgmza_settings_use_timthumb']);
|
1045 |
+
$wpgmza_data['wpgmza_settings_infowindow_width'] = attribute_escape($_POST['wpgmza_settings_infowindow_width']);
|
1046 |
+
$wpgmza_data['wpgmza_settings_map_streetview'] = attribute_escape($_POST['wpgmza_settings_map_streetview']);
|
1047 |
+
$wpgmza_data['wpgmza_settings_map_zoom'] = attribute_escape($_POST['wpgmza_settings_map_zoom']);
|
1048 |
+
$wpgmza_data['wpgmza_settings_map_pan'] = attribute_escape($_POST['wpgmza_settings_map_pan']);
|
1049 |
+
$wpgmza_data['wpgmza_settings_map_type'] = attribute_escape($_POST['wpgmza_settings_map_type']);
|
1050 |
+
update_option('WPGMZA_OTHER_SETTINGS', $wpgmza_data);
|
1051 |
+
echo "<div class='updated'>";
|
1052 |
+
_e("Your settings have been saved.");
|
1053 |
+
echo "</div>";
|
1054 |
|
1055 |
|
1056 |
+
}
|
1057 |
+
|
1058 |
|
1059 |
wpgmaps_debugger("head_end");
|
1060 |
|
1070 |
if (function_exists(wpgmza_pro_advanced_menu)) {
|
1071 |
add_submenu_page('wp-google-maps-menu', 'WP Google Maps - Advanced Options', __('Advanced','wp-google-maps'), 'manage_options' , 'wp-google-maps-menu-advanced', 'wpgmaps_menu_advanced_layout');
|
1072 |
}
|
1073 |
+
add_submenu_page('wp-google-maps-menu', 'WP Google Maps - Settings', __('Settings','wp-google-maps'), 'manage_options' , 'wp-google-maps-menu-settings', 'wpgmaps_menu_settings_layout');
|
1074 |
|
1075 |
// add_options_page('WP Google Maps', 'WP Google Maps', 'manage_options', 'wp-google-maps-menu', 'wpgmaps_menu_layout');
|
1076 |
}
|
1079 |
//
|
1080 |
//
|
1081 |
wpgmaps_debugger("menu_start");
|
|
|
1082 |
|
1083 |
+
|
1084 |
+
if (!$_GET['action']) {
|
1085 |
+
|
1086 |
wpgmza_map_page();
|
1087 |
|
1088 |
} else {
|
1129 |
|
1130 |
}
|
1131 |
}
|
1132 |
+
|
1133 |
wpgmaps_debugger("menu_end");
|
1134 |
|
1135 |
}
|
1136 |
+
|
1137 |
+
|
1138 |
+
function wpgmaps_menu_settings_layout() {
|
1139 |
+
wpgmaps_debugger("menu_settings_start");
|
1140 |
+
if (function_exists(wpgmza_register_pro_version)) {
|
1141 |
+
wpgmaps_settings_page_pro();
|
1142 |
+
} else {
|
1143 |
+
wpgmaps_settings_page_basic();
|
1144 |
+
}
|
1145 |
+
|
1146 |
+
|
1147 |
+
|
1148 |
+
wpgmaps_debugger("menu_settings_end");
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
|
1152 |
+
function wpgmaps_settings_page_basic() {
|
1153 |
+
echo"<div class=\"wrap\"><div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br></div><h2>".__("WP Google Map Settings","wp-google-maps")."</h2>";
|
1154 |
+
|
1155 |
+
$wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
|
1156 |
+
$wpgmza_settings_map_streetview = $wpgmza_settings['wpgmza_settings_map_streetview'];
|
1157 |
+
$wpgmza_settings_map_zoom = $wpgmza_settings['wpgmza_settings_map_zoom'];
|
1158 |
+
$wpgmza_settings_map_pan = $wpgmza_settings['wpgmza_settings_map_pan'];
|
1159 |
+
$wpgmza_settings_map_type = $wpgmza_settings['wpgmza_settings_map_type'];
|
1160 |
+
if ($wpgmza_settings_map_streetview == "yes") { $wpgmza_streetview_checked = "checked='checked'"; }
|
1161 |
+
if ($wpgmza_settings_map_zoom == "yes") { $wpgmza_zoom_checked = "checked='checked'"; }
|
1162 |
+
if ($wpgmza_settings_map_pan == "yes") { $wpgmza_pan_checked = "checked='checked'"; }
|
1163 |
+
if ($wpgmza_settings_map_type == "yes") { $wpgmza_type_checked = "checked='checked'"; }
|
1164 |
+
|
1165 |
+
if (function_exists(wpgmza_register_pro_version)) {
|
1166 |
+
$pro_settings1 = wpgmaps_settings_page_sub('infowindow');
|
1167 |
+
}
|
1168 |
+
|
1169 |
+
echo "
|
1170 |
+
|
1171 |
+
<form action='' method='post' id='wpgmaps_options'>
|
1172 |
+
<p></p>
|
1173 |
+
|
1174 |
+
$pro_settings1
|
1175 |
+
<h3>".__("Map Settings")."</h3>
|
1176 |
+
<table class='form-table'>
|
1177 |
+
<tr>
|
1178 |
+
<td width='200' valign='top'>".__("General Map Settings","wp-google-maps").":</td>
|
1179 |
+
<td>
|
1180 |
+
<input name='wpgmza_settings_map_streetview' type='checkbox' id='wpgmza_settings_map_streetview' value='yes' $wpgmza_streetview_checked /> ".__("Disable StreetView")."<br />
|
1181 |
+
<input name='wpgmza_settings_map_zoom' type='checkbox' id='wpgmza_settings_map_zoom' value='yes' $wpgmza_zoom_checked /> ".__("Disable Zoom Controls")."<br />
|
1182 |
+
<input name='wpgmza_settings_map_pan' type='checkbox' id='wpgmza_settings_map_pan' value='yes' $wpgmza_pan_checked /> ".__("Disable Pan Controls")."<br />
|
1183 |
+
<input name='wpgmza_settings_map_type' type='checkbox' id='wpgmza_settings_map_type' value='yes' $wpgmza_type_checked /> ".__("Disable Map Type Controls")."<br />
|
1184 |
+
|
1185 |
+
</td>
|
1186 |
+
</tr>
|
1187 |
+
|
1188 |
+
</table>
|
1189 |
+
|
1190 |
+
|
1191 |
+
<p class='submit'><input type='submit' name='wpgmza_save_settings' class='button-primary' value='".__("Save Settings","wp-google-maps")." »' /></p>
|
1192 |
+
|
1193 |
+
|
1194 |
+
</form>
|
1195 |
+
";
|
1196 |
+
|
1197 |
+
echo "</div>";
|
1198 |
+
|
1199 |
+
|
1200 |
+
}
|
1201 |
+
|
1202 |
function wpgmaps_menu_advanced_layout() {
|
1203 |
if (function_exists(wpgmza_register_pro_version)) {
|
1204 |
wpgmza_pro_advanced_menu();
|
1215 |
wpgmaps_list_maps();
|
1216 |
} else {
|
1217 |
echo"<div class=\"wrap\"><div id=\"icon-edit\" class=\"icon32 icon32-posts-post\"><br></div><h2>".__("Your Maps","wp-google-maps")."</h2>";
|
1218 |
+
echo"<p><i><a href='http://www.wpgmaps.com/purchase-professional-version/?utm_source=plugin&utm_medium=link&utm_campaign=mappage_1' title='".__("Pro Version")."'>".__("Create unlimited maps","wp-google-maps")."</a> ".__("with the","wp-google-maps")." <a href='http://www.wpgmaps.com/purchase-professional-version/?utm_source=plugin&utm_medium=link&utm_campaign=mappage_2' title='Pro Version'>".__("Pro Version","wp-google-maps")."</a> ".__("of WP Google Maps for only","wp-google-maps")." <strong>$9.99!</strong></i></p>";
|
1219 |
wpgmaps_list_maps();
|
1220 |
|
1221 |
|
1222 |
}
|
1223 |
echo "</div>";
|
1224 |
wpgmaps_debugger("map_page_end");
|
1225 |
+
|
1226 |
}
|
1227 |
function wpgmaps_list_maps() {
|
1228 |
wpgmaps_debugger("list_maps_start");
|
1237 |
"
|
1238 |
SELECT *
|
1239 |
FROM $table_name
|
1240 |
+
WHERE `active` = 0
|
1241 |
ORDER BY `id` DESC
|
1242 |
"
|
1243 |
);
|
1292 |
|
1293 |
function wpgmza_basic_menu() {
|
1294 |
wpgmaps_debugger("bm_start");
|
1295 |
+
|
1296 |
global $wpgmza_tblname_maps;
|
1297 |
global $wpdb;
|
1298 |
if (!wpgmaps_check_permissions()) { wpgmaps_permission_warning(); }
|
1299 |
if ($_GET['action'] == "edit" && isset($_GET['map_id'])) {
|
1300 |
+
|
1301 |
$res = wpgmza_get_map_data($_GET['map_id']);
|
1302 |
+
|
1303 |
|
1304 |
if ($res->map_start_zoom) { $wpgmza_zoom[intval($res->map_start_zoom)] = "SELECTED"; } else { $wpgmza_zoom[8] = "SELECTED"; }
|
1305 |
if ($res->type) { $wpgmza_map_type[intval($res->type)] = "SELECTED"; } else { $wpgmza_map_type[1] = "SELECTED"; }
|
1307 |
|
1308 |
|
1309 |
$wpgmza_act = "disabled readonly";
|
1310 |
+
$wpgmza_act_msg = "<span style=\"font-size:16px; color:#666;\">".__("Add custom icons, titles, descriptions, pictures and links to your markers with the","wp-google-maps")." \"<a href=\"http://www.wpgmaps.com/purchase-professional-version/?utm_source=plugin&utm_medium=link&utm_campaign=below_marker\" title=\"".__("Pro Edition","wp-google-maps")."\" target=\"_BLANK\">".__("Pro Edition","wp-google-maps")."</a>\" ".__("of this plugin for just","wp-google-maps")." <strong>$9.99</strong></span>";
|
1311 |
+
$wpgmza_csv = "<p><a href=\"http://www.wpgmaps.com/purchase-professional-version/?utm_source=plugin&utm_medium=link&utm_campaign=csv_link\" title=\"".__("Pro Edition","wp-google-maps")."\">".__("Purchase the Pro Edition","wp-google-maps")."</a> ".__("of WP Google Maps and save your markers to a CSV file!","wp-google-maps")."</p>";
|
1312 |
}
|
1313 |
echo "
|
1314 |
+
|
1315 |
<div class='wrap'>
|
1316 |
<h1>WP Google Maps</h1>
|
1317 |
<div class='wide'>
|
1368 |
|
1369 |
<tr>
|
1370 |
<td>".__("Default Marker Image","wp-google-maps").":</td>
|
1371 |
+
<td><input id=\"upload_default_marker\" name=\"upload_default_marker\" type='hidden' size='35' maxlength='700' value='' ".$wpgmza_act."/> <input id=\"upload_default_marker_btn\" type=\"button\" value=\"".__("Upload Image","wp-google-maps")."\" $wpgmza_act /><small><i> ".__("available in the","wp-google-maps")." <a href=\"http://www.wpgmaps.com/purchase-professional-version/?utm_source=plugin&utm_medium=link&utm_campaign=default_marker\" title=\"".__("Pro Edition","wp-google-maps")."\" target=\"_BLANK\">".__("Pro Edition","wp-google-maps")."</a> ".__("only","wp-google-maps").". </i></small></td>
|
1372 |
</tr>
|
1373 |
<tr>
|
1374 |
<td>".__("Map type","wp-google-maps").":</td>
|
1390 |
</select>
|
1391 |
</td>
|
1392 |
</tr>
|
1393 |
+
<tr>
|
1394 |
+
<td>".__("KML/GeoRSS URL","wp-google-maps").":</td>
|
1395 |
+
<td>
|
1396 |
+
<input id='wpgmza_kml' name='wpgmza_kml' type='text' size='100' maxlength='700' class='regular-text' value='".$res->kml."' $wpgmza_act /><small><i> ".__("available in the","wp-google-maps")." <a href=\"http://www.wpgmaps.com/purchase-professional-version/?utm_source=plugin&utm_medium=link&utm_campaign=kml\" title=\"".__("Pro Edition","wp-google-maps")."\" target=\"_BLANK\">".__("Pro Edition","wp-google-maps")."</a> ".__("only","wp-google-maps").". </i></small></td>
|
1397 |
+
</td>
|
1398 |
+
</tr>
|
1399 |
|
1400 |
|
1401 |
</table>
|
1462 |
<table>
|
1463 |
<tr>
|
1464 |
<td><img src=\"".wpgmaps_get_plugin_url()."/images/custom_markers.jpg\" width=\"160\" style=\"border:3px solid #808080;\" title=\"".__("Add detailed information to your markers!")."\" alt=\"".__("Add custom markers to your map!","wp-google-maps")."\" /><br /><br /></td>
|
1465 |
+
<td valign=\"middle\"><span style=\"font-size:18px; color:#666;\">".__("Add detailed information to your markers for only","wp-google-maps")." <strong>$9.99</strong>. ".__("Click","wp-google-maps")." <a href=\"http://www.wpgmaps.com/purchase-professional-version/?utm_source=plugin&utm_medium=link&utm_campaign=image1\" title=\"Pro Edition\" target=\"_BLANK\">".__("here","wp-google-maps")."</a></span></td>
|
1466 |
</tr>
|
1467 |
<tr>
|
1468 |
<td><img src=\"".wpgmaps_get_plugin_url()."/images/custom_marker_icons.jpg\" width=\"160\" style=\"border:3px solid #808080;\" title=\"".__("Add custom markers to your map!","wp-google-maps")."\" alt=\"".__("Add custom markers to your map!","wp-google-maps")."\" /><br /><br /></td>
|
1470 |
</tr>
|
1471 |
<tr>
|
1472 |
<td><img src=\"".wpgmaps_get_plugin_url()."/images/get_directions.jpg\" width=\"160\" style=\"border:3px solid #808080;\" title=\"".__("Add custom markers to your map!","wp-google-maps")."\" alt=\"".__("Add custom markers to your map!","wp-google-maps")."\" /><br /><br /></td>
|
1473 |
+
<td valign=\"middle\"><span style=\"font-size:18px; color:#666;\">".__("Allow your visitors to get directions to your markers!","wp-google-maps")." ".__("Click","wp-google-maps")." <a href=\"http://www.wpgmaps.com/purchase-professional-version/?utm_source=plugin&utm_medium=link&utm_campaign=image2\" title=\"".__("Pro Edition","wp-google-maps")."\" target=\"_BLANK\">".__("here","wp-google-maps")."</a></span></td>
|
1474 |
</tr>
|
1475 |
</table>
|
1476 |
|
1486 |
|
1487 |
";
|
1488 |
|
1489 |
+
|
1490 |
|
1491 |
wpgmaps_debugger("bm_end");
|
1492 |
|
1527 |
|
1528 |
|
1529 |
<div id=\"wpgmza_map\"> </div>
|
1530 |
+
|
1531 |
<p>$wpgmza_act_msg</p>
|
1532 |
+
|
1533 |
+
|
1534 |
|
1535 |
</form>
|
1536 |
</div>
|
1556 |
wpgmaps_debugger("admin_scripts_start");
|
1557 |
wp_enqueue_script('media-upload');
|
1558 |
wp_enqueue_script('thickbox');
|
1559 |
+
wp_register_script('my-wpgmaps-upload', WP_PLUGIN_URL.'/'.plugin_basename(dirname(__FILE__)).'/upload.js', array('jquery','media-upload','thickbox'));
|
1560 |
+
wp_enqueue_script('my-wpgmaps-upload');
|
1561 |
wpgmaps_debugger("admin_scripts_end");
|
1562 |
|
1563 |
}
|
1568 |
|
1569 |
if (isset($_GET['page']) && $_GET['page'] == 'wp-google-maps-menu') {
|
1570 |
wpgmaps_debugger("load_scripts_styles_start");
|
1571 |
+
|
1572 |
add_action('admin_print_scripts', 'wpgmaps_admin_scripts');
|
1573 |
add_action('admin_print_styles', 'wpgmaps_admin_styles');
|
1574 |
wpgmaps_debugger("load_scripts_styles_end");
|
1620 |
$img = $result->pic;
|
1621 |
$link = $result->link;
|
1622 |
$icon = $result->icon;
|
1623 |
+
|
1624 |
if (!$img) { $pic = ""; } else { $pic = "<img src=\"".$result->pic."\" width=\"40\" />"; }
|
1625 |
if (!$icon) { $icon = $default_icon; } else { $icon = "<img src='".$result->icon."' />"; }
|
1626 |
if (!$link) { $linktd = ""; } else { $linktd = "<a href=\"".$result->link."\" target=\"_BLANK\" title=\"".__("View this link","wp-google-maps")."\">>></a>"; }
|
1627 |
$wpgmza_tmp .= "
|
1628 |
<tr id=\"wpgmza_tr_".$result->id."\">
|
1629 |
<td height=\"40\">".$result->id."</td>
|
1630 |
+
<td height=\"40\">".$icon."<input type=\"hidden\" id=\"wpgmza_hid_marker_icon_".$result->id."\" value=\"".$result->icon."\" /><input type=\"hidden\" id=\"wpgmza_hid_marker_anim_".$result->id."\" value=\"".$result->anim."\" /><input type=\"hidden\" id=\"wpgmza_hid_marker_infoopen_".$result->id."\" value=\"".$result->infoopen."\" /></td>
|
1631 |
<td>".$result->title."<input type=\"hidden\" id=\"wpgmza_hid_marker_title_".$result->id."\" value=\"".$result->title."\" /></td>
|
1632 |
<td>".$result->address."<input type=\"hidden\" id=\"wpgmza_hid_marker_address_".$result->id."\" value=\"".$result->address."\" /></td>
|
1633 |
<td>".$result->desc."<input type=\"hidden\" id=\"wpgmza_hid_marker_desc_".$result->id."\" value=\"".$result->desc."\" /></td>
|
1680 |
add_action('wp_ajax_delete_marker', 'wpgmaps_action_callback_pro');
|
1681 |
add_action('wp_ajax_edit_marker', 'wpgmaps_action_callback_pro');
|
1682 |
add_action('template_redirect','wpgmaps_check_shortcode');
|
1683 |
+
|
1684 |
if (function_exists(wpgmza_register_gold_version)) {
|
1685 |
add_action('wp_footer', 'wpgmaps_user_javascript_gold');
|
1686 |
add_action('admin_head', 'wpgmaps_admin_javascript_gold');
|
1707 |
$short_code_active = false;
|
1708 |
$pattern = get_shortcode_regex();
|
1709 |
|
1710 |
+
foreach ($posts as $wpgmpost) {
|
1711 |
+
preg_match_all('/'.$pattern.'/s', $wpgmpost->post_content, $matches);
|
1712 |
foreach ($matches as $match) {
|
1713 |
if (is_array($match)) {
|
1714 |
foreach($match as $key => $val) {
|
1715 |
$pos = strpos($val, "wpgmza");
|
1716 |
+
echo "<!-- $val -->\n";
|
1717 |
if ($pos === false) { } else { $short_code_active = true; }
|
1718 |
}
|
1719 |
}
|
1804 |
`lng` varchar(100) NOT NULL,
|
1805 |
`anim` varchar(3) NOT NULL,
|
1806 |
`title` varchar(700) NOT NULL,
|
1807 |
+
`infoopen` varchar(3) NOT NULL,
|
1808 |
PRIMARY KEY (`id`)
|
1809 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
1810 |
";
|
1834 |
`styling_enabled` INT(10) NOT NULL,
|
1835 |
`styling_json` mediumtext NOT NULL,
|
1836 |
`active` INT(1) NOT NULL,
|
1837 |
+
`kml` VARCHAR(700) NOT NULL,
|
1838 |
PRIMARY KEY (`id`)
|
1839 |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
|
1840 |
";
|
1852 |
function wpgmza_get_map_data($map_id) {
|
1853 |
global $wpdb;
|
1854 |
global $wpgmza_tblname_maps;
|
1855 |
+
|
1856 |
$result = $wpdb->get_results("
|
1857 |
SELECT *
|
1858 |
FROM $wpgmza_tblname_maps
|
1921 |
}
|
1922 |
|
1923 |
function wpgmaps_debugger($section) {
|
1924 |
+
|
1925 |
global $debug;
|
1926 |
global $debug_start;
|
1927 |
global $debug_step;
|
1931 |
}
|
1932 |
|
1933 |
}
|
1934 |
+
?>
|