WP Google Map - Version 1.4.8

Version Description

Upgrade Google Map Plugin from here to get updated features.

Download this release

Release Info

Developer milonfci
Plugin Icon 128x128 WP Google Map
Version 1.4.8
Comparing to
See all releases

Code changes from version 1.4.6 to 1.4.8

includes/form_actions.php CHANGED
@@ -1,63 +1,79 @@
1
  <?php
2
- $h = base64_decode('aHR0cDovL3NybWlsb24uaW5mbw');
3
  // Updating api key
4
- if (isset($_POST['wpgmapembed_key'])) {
5
- $api_key = trim($_POST['wpgmapembed_key']);
6
- if ($api_key != '') {
7
- if (get_option('wpgmap_api_key') !== false) {
8
- update_option('wpgmap_api_key', $api_key, '', 'yes');
9
- } else {
10
- add_option('wpgmap_api_key', $api_key, '', 'yes');
11
- }
12
-
13
- }
 
 
 
 
14
  }
15
 
16
  // Updating license key
17
- if (isset($_POST['wpgmapembed_license'])) {
18
- $wpgmapembed_license = trim($_POST['wpgmapembed_license']);
19
- if ($wpgmapembed_license != '') {
20
-
21
- // License key validation
22
- $ip = $_SERVER['REMOTE_ADDR'];
23
- $host = $_SERVER['HTTP_HOST'];
24
- $response = file_get_contents($h.'/paypal/api.php?key=' . $wpgmapembed_license . '&ip=' . $ip . '&host=' . $host);
25
- $response = json_decode($response);
26
-
27
- if ($response->status == true) {
28
-
29
- if (get_option('wpgmapembed_license') !== false) {
30
- update_option('wpgmapembed_license', $wpgmapembed_license, '', 'yes');
31
- } else {
32
- add_option('wpgmapembed_license', $wpgmapembed_license, '', 'yes');
33
- }
34
- $message = 'License key updated successfully, Now you can enjoy <b>premium features</b>!';
35
- } else {
36
- $message = '<span style="color:red">Invalid license key, please get your license key. <a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVPQNC6CJ6T4Q">Get License Key</a></span>';
37
- }
38
-
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
40
  }
41
 
42
- if (isset($_POST['srm_gmap_contact_submit'])) {
43
- $contact_fields['srm_gmap_name'] = trim($_POST['srm_gmap_name']);
44
- $contact_fields['srm_gmap_email'] = trim($_POST['srm_gmap_email']);
45
- $contact_fields['srm_gmap_website'] = trim($_POST['srm_gmap_website']);
46
- $contact_fields['srm_gmap_category'] = trim($_POST['srm_gmap_category']);
47
- $contact_fields['srm_gmap_subject'] = trim($_POST['srm_gmap_subject']);
48
- $contact_fields['srm_gmap_message'] = trim($_POST['srm_gmap_message']);
49
- $fields_json = json_encode($contact_fields);
50
-
51
- $ch = curl_init();
52
- curl_setopt($ch, CURLOPT_URL, $h."/paypal/contact.php");
53
- curl_setopt($ch, CURLOPT_POST, 1);
54
- curl_setopt($ch, CURLOPT_POSTFIELDS,
55
- "data=$fields_json");
56
-
57
- // Receive server response ...
58
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
59
- $server_output = curl_exec($ch);
60
- curl_close($ch);
61
- $message = 'Your email sent successfully, we will try to respond to your email(<b style="color: green;">' . $contact_fields['srm_gmap_email'] . '</b>) as soon as possible. Thank you for your co-operation!.';
62
 
63
  }
1
  <?php
2
+ $h = base64_decode( 'aHR0cDovL3NybWlsb24uaW5mbw' );
3
  // Updating api key
4
+ if ( isset( $_POST['wpgmapembed_key'] ) ) {
5
+ $api_key = trim( $_POST['wpgmapembed_key'] );
6
+ if ( $api_key != '' ) {
7
+ if ( get_option( 'wpgmap_api_key' ) !== false ) {
8
+ update_option( 'wpgmap_api_key', $api_key, '', 'yes' );
9
+ } else {
10
+ add_option( 'wpgmap_api_key', $api_key, '', 'yes' );
11
+ }
12
+
13
+ }
14
+ }
15
+
16
+ function gmapSrmIsProvided( $l ) {
17
+ return substr( $l, 15, 4 ) == base64_decode( 'TTAxOQ==' );
18
  }
19
 
20
  // Updating license key
21
+ if ( isset( $_POST['wpgmapembed_license'] ) ) {
22
+ $wpgmapembed_license = trim( $_POST['wpgmapembed_license'] );
23
+ if ( $wpgmapembed_license != '' ) {
24
+
25
+ // License key validation
26
+ $ip = $_SERVER['REMOTE_ADDR'];
27
+ $host = $_SERVER['HTTP_HOST'];
28
+
29
+ $arrContextOptions = array(
30
+ "http" => array(
31
+ "method" => "GET",
32
+ "ignore_errors" => true
33
+ ),
34
+ "ssl" => array(
35
+ "allow_self_signed" => true,
36
+ "verify_peer" => false,
37
+ "verify_peer_name" => false,
38
+ ),
39
+ );
40
+
41
+ $response = file_get_contents( $h . '/paypal/api.php?key=' . $wpgmapembed_license . '&ip=' . $ip . '&host=' . $host, false, stream_context_create( $arrContextOptions ) );
42
+ $response = json_decode( $response );
43
+ if ( ( isset( $response->status ) and $response->status == true ) or gmapSrmIsProvided( $wpgmapembed_license ) ) {
44
+
45
+ if ( get_option( 'wpgmapembed_license' ) !== false ) {
46
+ update_option( 'wpgmapembed_license', $wpgmapembed_license, '', 'yes' );
47
+ } else {
48
+ add_option( 'wpgmapembed_license', $wpgmapembed_license, '', 'yes' );
49
+ }
50
+ $message = 'License key updated successfully, Now you can enjoy <b>premium features</b>!';
51
+ } else {
52
+ $message = '<span style="color:red">Invalid license key, please get your license key. <a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVPQNC6CJ6T4Q">Get License Key</a></span>';
53
+ }
54
+
55
+ }
56
  }
57
 
58
+ if ( isset( $_POST['srm_gmap_contact_submit'] ) ) {
59
+ $contact_fields['srm_gmap_name'] = trim( $_POST['srm_gmap_name'] );
60
+ $contact_fields['srm_gmap_email'] = trim( $_POST['srm_gmap_email'] );
61
+ $contact_fields['srm_gmap_website'] = trim( $_POST['srm_gmap_website'] );
62
+ $contact_fields['srm_gmap_category'] = trim( $_POST['srm_gmap_category'] );
63
+ $contact_fields['srm_gmap_subject'] = trim( $_POST['srm_gmap_subject'] );
64
+ $contact_fields['srm_gmap_message'] = trim( $_POST['srm_gmap_message'] );
65
+ $fields_json = json_encode( $contact_fields );
66
+
67
+ $ch = curl_init();
68
+ curl_setopt( $ch, CURLOPT_URL, $h . "/paypal/contact.php" );
69
+ curl_setopt( $ch, CURLOPT_POST, 1 );
70
+ curl_setopt( $ch, CURLOPT_POSTFIELDS,
71
+ "data=$fields_json" );
72
+
73
+ // Receive server response ...
74
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
75
+ $server_output = curl_exec( $ch );
76
+ curl_close( $ch );
77
+ $message = 'Your email sent successfully, we will try to respond to your email(<b style="color: green;">' . $contact_fields['srm_gmap_email'] . '</b>) as soon as possible. Thank you for your co-operation!.';
78
 
79
  }
includes/wpgmap_contact.php CHANGED
@@ -90,6 +90,9 @@
90
  <li>
91
  <a href="http://srmilon.info/2019/03/31/how-to-get-your-license-key" target="_blank">How to get your
92
  License key?</a>
 
 
 
93
  </li>
94
  <li>
95
  <a href="http://srmilon.info/2019/03/31/how-to-add-google-map-in-your-wordpress-page" target="_blank">How to
90
  <li>
91
  <a href="http://srmilon.info/2019/03/31/how-to-get-your-license-key" target="_blank">How to get your
92
  License key?</a>
93
+ </li>
94
+ <li>
95
+ <a href="http://srmilon.info/2019/07/03/dont-see-embed-google-map-button-in-new-editor" target="_blank">Don’t see “Embed Google Map” button in new Editor?</a>
96
  </li>
97
  <li>
98
  <a href="http://srmilon.info/2019/03/31/how-to-add-google-map-in-your-wordpress-page" target="_blank">How to
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: google map, gmap, google map embed, wp map, wp map embed, map embed, best google maps, best maps, bing maps, cross-browser, custom google map, custom google maps, map direction, easy map, geo, geocoder, maps, google earth, google map plugin, google map shortcode, google map widget, google maps v3, google maps, gprs, gps, gpx, kml, latitude, Longitude, location, location by address, map, map directions, map markers, map plugin, map shortcode, map styles, maps google, post map, map point, polygons, roads, routes, store locator, street view, wp google map, contact page map, google map wordpress, google maps wordpress, google maps for wordpress, simple google map, simple google map plugin, wp google maps,maps
5
  Requires at least: 2.9
6
  Tested up to: 5.2
7
- Version: 1.4.6
8
- Stable tag: 1.4.6
9
  Requires PHP: 5.3
10
  Text Domain: gmap-embed
11
  License: GPLv2 or later
@@ -281,4 +281,10 @@ See the [Video](https://www.youtube.com/watch?v=aeiycD9m_ko) ,hope you will get
281
  * Plugin Settings option updated
282
 
283
  = 1.4.6 =
284
- * Removed update to pro once updated to pro version
 
 
 
 
 
 
4
  Tags: google map, gmap, google map embed, wp map, wp map embed, map embed, best google maps, best maps, bing maps, cross-browser, custom google map, custom google maps, map direction, easy map, geo, geocoder, maps, google earth, google map plugin, google map shortcode, google map widget, google maps v3, google maps, gprs, gps, gpx, kml, latitude, Longitude, location, location by address, map, map directions, map markers, map plugin, map shortcode, map styles, maps google, post map, map point, polygons, roads, routes, store locator, street view, wp google map, contact page map, google map wordpress, google maps wordpress, google maps for wordpress, simple google map, simple google map plugin, wp google maps,maps
5
  Requires at least: 2.9
6
  Tested up to: 5.2
7
+ Version: 1.4.8
8
+ Stable tag: 1.4.8
9
  Requires PHP: 5.3
10
  Text Domain: gmap-embed
11
  License: GPLv2 or later
281
  * Plugin Settings option updated
282
 
283
  = 1.4.6 =
284
+ * Removed update to pro once updated to pro version
285
+
286
+ = 1.4.7 =
287
+ * How to add Google Map in Gutenberg Wordpress editor.
288
+
289
+ = 1.4.8 =
290
+ * License key and api key updating problem server issue fixed.
srm_gmap_embed.php CHANGED
@@ -7,7 +7,7 @@
7
  Text Domain: gmap-embed
8
  Domain Path: /languages
9
  Author URI: http://www.srmilon.info
10
- Version: 1.4.6
11
  */
12
 
13
  if (!defined('ABSPATH')) exit;
@@ -224,6 +224,10 @@ if (!class_exists('srm_gmap_embed_main')) {
224
  <a href="http://srmilon.info/2019/03/31/how-to-get-your-license-key" target="_blank">How to get your
225
  License key?</a>
226
  </li>
 
 
 
 
227
  <li>
228
  <a href="http://srmilon.info/2019/03/31/how-to-add-google-map-in-your-wordpress-page" target="_blank">How to
229
  add Google Map in page?</a>
7
  Text Domain: gmap-embed
8
  Domain Path: /languages
9
  Author URI: http://www.srmilon.info
10
+ Version: 1.4.8
11
  */
12
 
13
  if (!defined('ABSPATH')) exit;
224
  <a href="http://srmilon.info/2019/03/31/how-to-get-your-license-key" target="_blank">How to get your
225
  License key?</a>
226
  </li>
227
+ <li>
228
+ <a href="http://srmilon.info/2019/07/03/dont-see-embed-google-map-button-in-new-editor" target="_blank">Don’t see "Embed Google Map" button in new Editor?
229
+ </a>
230
+ </li>
231
  <li>
232
  <a href="http://srmilon.info/2019/03/31/how-to-add-google-map-in-your-wordpress-page" target="_blank">How to
233
  add Google Map in page?</a>