Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -rupN wp-google-maps-orig/wpGoogleMaps.php wp-google-maps/wpGoogleMaps.php
- --- wp-google-maps-orig/wpGoogleMaps.php 2013-01-21 08:37:22.278997000 -0300
- +++ wp-google-maps/wpGoogleMaps.php 2013-01-22 16:47:38.254002953 -0300
- @@ -222,7 +222,10 @@ function wpgmaps_admin_edit_marker_javas
- $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
- ?>
- - <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
- + <script type="text/javascript">
- + var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
- + document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?sensor=false' type='text/javascript'%3E%3C/script%3E"));
- + </script>
- <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
- <link rel="stylesheet" type="text/css" media="all" href="<?php echo wpgmaps_get_plugin_url(); ?>/css/data_table.css" />
- <script type="text/javascript" src="<?php echo wpgmaps_get_plugin_url(); ?>/js/jquery.dataTables.js"></script>
- @@ -287,12 +290,12 @@ function wpgmaps_admin_javascript_basic(
- $ajax_nonce = wp_create_nonce("wpgmza");
- wpgmaps_debugger("admin_js_basic_start");
- - if (is_admin() && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == "edit_marker") {
- + if (is_admin() && isset( $_GET['page'] ) && $_GET['page'] == 'wp-google-maps-menu' && isset( $_GET['action'] ) && $_GET['action'] == "edit_marker") {
- wpgmaps_admin_edit_marker_javascript();
- }
- - else if (is_admin() && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == "edit") {
- + else if (is_admin() && isset( $_GET['page'] ) && $_GET['page'] == 'wp-google-maps-menu' && isset( $_GET['action'] ) && $_GET['action'] == "edit") {
- if ($debug) { echo ""; }
- @@ -326,7 +329,10 @@ function wpgmaps_admin_javascript_basic(
- ?>
- - <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
- + <script type="text/javascript">
- + var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
- + document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?sensor=false' type='text/javascript'%3E%3C/script%3E"));
- + </script>
- <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
- <link rel="stylesheet" type="text/css" media="all" href="<?php echo wpgmaps_get_plugin_url(); ?>/css/data_table.css" />
- <script type="text/javascript" src="<?php echo wpgmaps_get_plugin_url(); ?>/js/jquery.dataTables.js"></script>
- @@ -629,7 +635,10 @@ function wpgmaps_user_javascript_basic()
- if (!$wpgmza_lat || !$wpgmza_lng) { $wpgmza_lat = "51.5081290"; $wpgmza_lng = "-0.1280050"; }
- ?>
- - <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
- + <script type="text/javascript">
- + var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
- + document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?sensor=false' type='text/javascript'%3E%3C/script%3E"));
- + </script>
- <script type="text/javascript" >
- @@ -750,7 +759,7 @@ function wpgmaps_update_xml_file()
- // PREVIOUS VERSION HANDLING
- - if (function_exists(wpgmza_register_pro_version)) {
- + if (function_exists('wpgmza_register_pro_version')) {
- $prov = get_option("WPGMZA_PRO");
- $wpgmza_pro_version = $prov['version'];
- $results = $wpdb->get_results(
- @@ -828,7 +837,7 @@ function wpgmaps_update_xml_file()
- } else {
- // PREVIOUS VERSION HANDLING
- - if (function_exists(wpgmza_register_pro_version)) {
- + if (function_exists('wpgmza_register_pro_version')) {
- $prov = get_option("WPGMZA_PRO");
- $wpgmza_pro_version = $prov['version'];
- @$dom->save(WP_PLUGIN_DIR.'/'.plugin_basename(dirname(__FILE__)).'/'.$mapid.'markers.xml');
- @@ -1134,7 +1143,7 @@ function wpgmaps_head() {
- function wpgmaps_admin_menu() {
- add_menu_page('WPGoogle Maps', __('Maps','wp-google-maps'), 'manage_options', 'wp-google-maps-menu', 'wpgmaps_menu_layout', wpgmaps_get_plugin_url()."/images/map_app_small.png");
- - if (function_exists(wpgmza_pro_advanced_menu)) {
- + if (function_exists('wpgmza_pro_advanced_menu')) {
- 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');
- }
- 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');
Add Comment
Please, Sign In to add comment