Version Description
- HTML content support in Google Map InfoWindow
- Added select drop-down in Google map SRM widget instead of text box for ShortCode.
- Disable admin notice for language based google setup.
Download this release
Release Info
Developer | milonfci |
Plugin | WP Google Map |
Version | 1.7.1 |
Comparing to | |
See all releases |
Code changes from version 1.7.0 to 1.7.1
- includes/shortcodes.php +3 -2
- includes/widget.php +24 -6
- readme.txt +6 -1
- srm_gmap_embed.php +3 -2
includes/shortcodes.php
CHANGED
@@ -96,7 +96,7 @@ if ( ! function_exists( 'srm_gmap_embed_shortcode' ) ) {
|
|
96 |
if($wpgmap_show_infowindow){
|
97 |
?>
|
98 |
var infowindow = new google.maps.InfoWindow({
|
99 |
-
content: "<?php echo $wpgmap_map_address;?>"
|
100 |
});
|
101 |
infowindow.open(map, marker);
|
102 |
google.maps.event.addListener(marker, 'click', function () {
|
@@ -161,6 +161,7 @@ if ( ! function_exists( 'srm_gmap_embed_shortcode' ) ) {
|
|
161 |
<option value="DRIVING"><?php _e( 'Driving', 'gmap-embed' ) ?></option>
|
162 |
<option value="WALKING"><?php _e( 'Walking', 'gmap-embed' ) ?></option>
|
163 |
<option value="BICYCLING"><?php _e( 'Bicycling', 'gmap-embed' ) ?></option>
|
|
|
164 |
</select>
|
165 |
</div>
|
166 |
<button type="button" data-icon="search" data-role="button" href="#"
|
@@ -185,4 +186,4 @@ if ( ! function_exists( 'srm_gmap_embed_shortcode' ) ) {
|
|
185 |
}
|
186 |
|
187 |
//******* Defining Shortcode for Google Map SRM
|
188 |
-
add_shortcode( 'gmap-embed', 'srm_gmap_embed_shortcode' );
|
96 |
if($wpgmap_show_infowindow){
|
97 |
?>
|
98 |
var infowindow = new google.maps.InfoWindow({
|
99 |
+
content: "<?php echo html_entity_decode($wpgmap_map_address);?>"
|
100 |
});
|
101 |
infowindow.open(map, marker);
|
102 |
google.maps.event.addListener(marker, 'click', function () {
|
161 |
<option value="DRIVING"><?php _e( 'Driving', 'gmap-embed' ) ?></option>
|
162 |
<option value="WALKING"><?php _e( 'Walking', 'gmap-embed' ) ?></option>
|
163 |
<option value="BICYCLING"><?php _e( 'Bicycling', 'gmap-embed' ) ?></option>
|
164 |
+
<option value="TRANSIT"><?php _e( 'Transit', 'gmap-embed' ) ?></option>
|
165 |
</select>
|
166 |
</div>
|
167 |
<button type="button" data-icon="search" data-role="button" href="#"
|
186 |
}
|
187 |
|
188 |
//******* Defining Shortcode for Google Map SRM
|
189 |
+
add_shortcode( 'gmap-embed', 'srm_gmap_embed_shortcode' );
|
includes/widget.php
CHANGED
@@ -45,7 +45,24 @@ class srmgmap_widget extends WP_Widget
|
|
45 |
public function form( $instance )
|
46 |
{
|
47 |
$title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( '', 'text_domain' );
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
?>
|
50 |
<p>
|
51 |
<label for="<?php echo $this->get_field_id( 'title' ); ?>">Title: </label>
|
@@ -54,12 +71,13 @@ class srmgmap_widget extends WP_Widget
|
|
54 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name('title');?>" type="text" value="<?php echo esc_attr($title); ?>" />
|
55 |
</p>
|
56 |
<p>
|
57 |
-
<label for="<?php echo $this->get_field_id( 'srmgmap_shortcode' ); ?>">
|
58 |
</p>
|
59 |
<p>
|
60 |
-
<
|
61 |
-
|
62 |
-
|
|
|
63 |
</p>
|
64 |
|
65 |
<?php
|
@@ -74,4 +92,4 @@ class srmgmap_widget extends WP_Widget
|
|
74 |
|
75 |
}
|
76 |
|
77 |
-
$srmgmap = new srmgmap_widget();
|
45 |
public function form( $instance )
|
46 |
{
|
47 |
$title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( '', 'text_domain' );
|
48 |
+
$map_shortcodes_list = '';
|
49 |
+
$args = array(
|
50 |
+
'post_type' => 'wpgmapembed',
|
51 |
+
'posts_per_page' => - 1
|
52 |
+
);
|
53 |
+
$mapsList = new WP_Query( $args );
|
54 |
+
|
55 |
+
if ( $mapsList->have_posts() ) {
|
56 |
+
while ( $mapsList->have_posts() ) {
|
57 |
+
$mapsList->the_post();
|
58 |
+
$gmap_title = get_post_meta( get_the_ID(), 'wpgmap_title', true );
|
59 |
+
if($gmap_title==''){
|
60 |
+
$gmap_title = 'No title';
|
61 |
+
}
|
62 |
+
$option_value = esc_attr( '[gmap-embed id="' . get_the_ID() . '"]' );
|
63 |
+
$map_shortcodes_list .= '<option value="' . $option_value . '" '.(($instance['srmgmap_shortcode']==html_entity_decode($option_value))?'selected':'').'>' . $gmap_title.' '.esc_attr( '[gmap-embed id="' . get_the_ID() . '"]' ).'</option>';
|
64 |
+
}
|
65 |
+
}
|
66 |
?>
|
67 |
<p>
|
68 |
<label for="<?php echo $this->get_field_id( 'title' ); ?>">Title: </label>
|
71 |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name('title');?>" type="text" value="<?php echo esc_attr($title); ?>" />
|
72 |
</p>
|
73 |
<p>
|
74 |
+
<label for="<?php echo $this->get_field_id( 'srmgmap_shortcode' ); ?>"> Select Google Map Shortcode:</label><br/>
|
75 |
</p>
|
76 |
<p>
|
77 |
+
<select id="<?php echo $this->get_field_id( 'srmgmap_shortcode' ); ?>"
|
78 |
+
name="<?php echo $this->get_field_name( 'srmgmap_shortcode' ); ?>" class="widefat">
|
79 |
+
<?php echo $map_shortcodes_list;?>
|
80 |
+
</select>
|
81 |
</p>
|
82 |
|
83 |
<?php
|
92 |
|
93 |
}
|
94 |
|
95 |
+
$srmgmap = new srmgmap_widget();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.6
|
7 |
-
Version: 1.7.
|
8 |
Requires PHP: 5.3
|
9 |
Text Domain: gmap-embed
|
10 |
License: GPLv2 or later
|
@@ -136,6 +136,11 @@ See the [Video](https://www.youtube.com/watch?v=o90H34eacHg) ,hope you will get
|
|
136 |
|
137 |
== Changelog ==
|
138 |
|
|
|
|
|
|
|
|
|
|
|
139 |
= 1.7.0 =
|
140 |
* Browser geolocation timeout related problem solved, youtube video updated.
|
141 |
|
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.6
|
7 |
+
Version: 1.7.1
|
8 |
Requires PHP: 5.3
|
9 |
Text Domain: gmap-embed
|
10 |
License: GPLv2 or later
|
136 |
|
137 |
== Changelog ==
|
138 |
|
139 |
+
= 1.7.1 =
|
140 |
+
* HTML content support in Google Map InfoWindow
|
141 |
+
* Added select drop-down in Google map SRM widget instead of text box for ShortCode.
|
142 |
+
* Disable admin notice for language based google setup.
|
143 |
+
|
144 |
= 1.7.0 =
|
145 |
* Browser geolocation timeout related problem solved, youtube video updated.
|
146 |
|
srm_gmap_embed.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
Text Domain: gmap-embed
|
8 |
Domain Path: /languages
|
9 |
Author URI: https://www.srmilon.info
|
10 |
-
Version: 1.7.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -389,7 +389,8 @@ if ( ! class_exists( 'srm_gmap_embed_main' ) ) {
|
|
389 |
$this->gmap_embed_generate_admin_review_notice();
|
390 |
|
391 |
// Generate new feature admin notice
|
392 |
-
|
|
|
393 |
}
|
394 |
|
395 |
private function gmap_embed_generate_admin_review_notice(){
|
7 |
Text Domain: gmap-embed
|
8 |
Domain Path: /languages
|
9 |
Author URI: https://www.srmilon.info
|
10 |
+
Version: 1.7.1
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) {
|
389 |
$this->gmap_embed_generate_admin_review_notice();
|
390 |
|
391 |
// Generate new feature admin notice
|
392 |
+
//TODO:: ajax based admin notice
|
393 |
+
//$this->gmap_embed_new_feature_admin_notice();
|
394 |
}
|
395 |
|
396 |
private function gmap_embed_generate_admin_review_notice(){
|