Version Description
Upgrade Google Map Plugin from here to get updated features.
Download this release
Release Info
Developer | milonfci |
Plugin | WP Google Map |
Version | 1.4.3 |
Comparing to | |
See all releases |
Code changes from version 1.4.2 to 1.4.3
- assets/css/wp-gmap-style.css +41 -4
- gmap-embed.pot +2 -2
- includes/gmap.php +2 -2
- includes/wpgmap_contact.php +38 -5
- languages/gmap-embed-da_DK.po +4 -4
- languages/gmap-embed-de_DE.po +4 -4
- languages/gmap-embed-de_DE_formal.po +4 -4
- languages/gmap-embed-es_ES.po +2 -2
- readme.txt +8 -4
- srm_gmap_embed.php +41 -12
assets/css/wp-gmap-style.css
CHANGED
@@ -141,7 +141,8 @@ ul#wp-gmap-nav li a {
|
|
141 |
.gmap_properties tr {
|
142 |
height: 50px;
|
143 |
}
|
144 |
-
|
|
|
145 |
width: 24em !important;
|
146 |
}
|
147 |
|
@@ -156,17 +157,53 @@ ul#wp-gmap-nav li a {
|
|
156 |
}
|
157 |
|
158 |
/**********To view contact form ***********/
|
159 |
-
.srm_gmap_contact_area{
|
160 |
width: 50%;
|
161 |
float: left;
|
162 |
padding: 10px;
|
163 |
}
|
164 |
-
|
|
|
165 |
width: 42%;
|
166 |
float: left;
|
167 |
margin-left: 2%;
|
168 |
padding: 10px;
|
169 |
}
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
width: 100% !important;
|
172 |
}
|
141 |
.gmap_properties tr {
|
142 |
height: 50px;
|
143 |
}
|
144 |
+
|
145 |
+
.gmap_properties tr .regular-text {
|
146 |
width: 24em !important;
|
147 |
}
|
148 |
|
157 |
}
|
158 |
|
159 |
/**********To view contact form ***********/
|
160 |
+
.srm_gmap_contact_area {
|
161 |
width: 50%;
|
162 |
float: left;
|
163 |
padding: 10px;
|
164 |
}
|
165 |
+
|
166 |
+
.srm_gmap_instructions {
|
167 |
width: 42%;
|
168 |
float: left;
|
169 |
margin-left: 2%;
|
170 |
padding: 10px;
|
171 |
}
|
172 |
+
|
173 |
+
.srm_gmap_instructions ul {
|
174 |
+
padding: 0;
|
175 |
+
margin: 0;
|
176 |
+
}
|
177 |
+
|
178 |
+
.srm_gmap_instructions ul li {
|
179 |
+
background-color: #f0f0f0;
|
180 |
+
padding: 6px;
|
181 |
+
border: 1px solid #e0e0e0;
|
182 |
+
margin: 5px 0;
|
183 |
+
}
|
184 |
+
|
185 |
+
.srm_gmap_instructions ul li:before {
|
186 |
+
content: '> ';
|
187 |
+
font-weight: bold;
|
188 |
+
}
|
189 |
+
|
190 |
+
.srm_gmap_instructions ul li:hover {
|
191 |
+
|
192 |
+
}
|
193 |
+
|
194 |
+
.srm_gmap_instructions ul li a {
|
195 |
+
text-decoration: none;
|
196 |
+
}
|
197 |
+
|
198 |
+
.srm_gmap_video_area {
|
199 |
+
width: 95%;
|
200 |
+
float: left;
|
201 |
+
margin-left: 2%;
|
202 |
+
clear: both;
|
203 |
+
text-align: center;
|
204 |
+
padding-top: 35px;
|
205 |
+
}
|
206 |
+
|
207 |
+
.wp_gmap_contact_field {
|
208 |
width: 100% !important;
|
209 |
}
|
gmap-embed.pot
CHANGED
@@ -128,7 +128,7 @@ msgstr ""
|
|
128 |
#. Plugin URI of the plugin/theme
|
129 |
#. #-#-#-#-# plugin.pot (Google Map Embed 1.1.0) #-#-#-#-#
|
130 |
#. Author URI of the plugin/theme
|
131 |
-
msgid "http://www.srmilon.
|
132 |
msgstr ""
|
133 |
|
134 |
#. Description of the plugin/theme
|
@@ -138,5 +138,5 @@ msgid ""
|
|
138 |
msgstr ""
|
139 |
|
140 |
#. Author of the plugin/theme
|
141 |
-
msgid "
|
142 |
msgstr ""
|
128 |
#. Plugin URI of the plugin/theme
|
129 |
#. #-#-#-#-# plugin.pot (Google Map Embed 1.1.0) #-#-#-#-#
|
130 |
#. Author URI of the plugin/theme
|
131 |
+
msgid "http://www.srmilon.info"
|
132 |
msgstr ""
|
133 |
|
134 |
#. Description of the plugin/theme
|
138 |
msgstr ""
|
139 |
|
140 |
#. Author of the plugin/theme
|
141 |
+
msgid "srmilon.info"
|
142 |
msgstr ""
|
includes/gmap.php
CHANGED
@@ -32,14 +32,14 @@ if (isset($_GET['page'])) {
|
|
32 |
data-id="wp-gmap-settings"
|
33 |
class="media-menu-item"><?php _e('Settings', 'gmap-embed'); ?></a>
|
34 |
</li>
|
35 |
-
<li class="<?php echo $wpgmap_tag == '
|
36 |
<a href="<?php echo esc_url(admin_url() . 'admin.php?page=wpgmapembed&tag=contact'); ?>"
|
37 |
data-id="wp-gmap-settings"
|
38 |
class="media-menu-item"><?php _e('Having Problem?', 'gmap-embed'); ?></a>
|
39 |
</li>
|
40 |
<li>
|
41 |
<a target="_blank" href="https://www.youtube.com/watch?v=Lak-tJjGjl8" class="media-menu-item">
|
42 |
-
<?php _e('
|
43 |
</li>
|
44 |
<span class="spinner" style="margin-right: 20px !important;float:right"></span>
|
45 |
|
32 |
data-id="wp-gmap-settings"
|
33 |
class="media-menu-item"><?php _e('Settings', 'gmap-embed'); ?></a>
|
34 |
</li>
|
35 |
+
<li class="<?php echo $wpgmap_tag == 'contact' ? 'active' : ''; ?>">
|
36 |
<a href="<?php echo esc_url(admin_url() . 'admin.php?page=wpgmapembed&tag=contact'); ?>"
|
37 |
data-id="wp-gmap-settings"
|
38 |
class="media-menu-item"><?php _e('Having Problem?', 'gmap-embed'); ?></a>
|
39 |
</li>
|
40 |
<li>
|
41 |
<a target="_blank" href="https://www.youtube.com/watch?v=Lak-tJjGjl8" class="media-menu-item">
|
42 |
+
<?php _e('See Video', 'gmap-embed'); ?></a>
|
43 |
</li>
|
44 |
<span class="spinner" style="margin-right: 20px !important;float:right"></span>
|
45 |
|
includes/wpgmap_contact.php
CHANGED
@@ -8,14 +8,16 @@
|
|
8 |
<label for="srm_gmap_name">Name</label>
|
9 |
</th>
|
10 |
<td width="80%">
|
11 |
-
<input type="text" class="wp_gmap_contact_field" name="srm_gmap_name" id="srm_gmap_name"
|
|
|
12 |
</tr>
|
13 |
<tr>
|
14 |
<th>
|
15 |
<label for="srm_gmap_email">Email</label>
|
16 |
</th>
|
17 |
<td>
|
18 |
-
<input type="email" class="wp_gmap_contact_field" name="srm_gmap_email"
|
|
|
19 |
id="srm_gmap_email" required=""
|
20 |
placeholder="example@mail.com">
|
21 |
</td>
|
@@ -25,7 +27,8 @@
|
|
25 |
<label for="srm_gmap_website">Website</label>
|
26 |
</th>
|
27 |
<td>
|
28 |
-
<input type="text" class="wp_gmap_contact_field" name="srm_gmap_website"
|
|
|
29 |
id="srm_gmap_website"
|
30 |
placeholder="http://example.com"></td>
|
31 |
</tr>
|
@@ -57,7 +60,7 @@
|
|
57 |
</th>
|
58 |
<td>
|
59 |
<textarea name="srm_gmap_message" class="wp_gmap_contact_field" id="srm_gmap_message"
|
60 |
-
placeholder="Hello
|
61 |
rows="3" cols="50"></textarea>
|
62 |
</td>
|
63 |
</tr>
|
@@ -76,8 +79,38 @@
|
|
76 |
</form>
|
77 |
</div>
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
<div class="srm_gmap_video_area">
|
80 |
-
<iframe width="
|
81 |
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
82 |
</div>
|
83 |
|
8 |
<label for="srm_gmap_name">Name</label>
|
9 |
</th>
|
10 |
<td width="80%">
|
11 |
+
<input type="text" class="wp_gmap_contact_field" name="srm_gmap_name" id="srm_gmap_name"
|
12 |
+
required=""/></td>
|
13 |
</tr>
|
14 |
<tr>
|
15 |
<th>
|
16 |
<label for="srm_gmap_email">Email</label>
|
17 |
</th>
|
18 |
<td>
|
19 |
+
<input type="email" class="wp_gmap_contact_field" name="srm_gmap_email"
|
20 |
+
value="<?php echo get_bloginfo('admin_email'); ?>"
|
21 |
id="srm_gmap_email" required=""
|
22 |
placeholder="example@mail.com">
|
23 |
</td>
|
27 |
<label for="srm_gmap_website">Website</label>
|
28 |
</th>
|
29 |
<td>
|
30 |
+
<input type="text" class="wp_gmap_contact_field" name="srm_gmap_website"
|
31 |
+
value="<?php echo get_bloginfo('url'); ?>"
|
32 |
id="srm_gmap_website"
|
33 |
placeholder="http://example.com"></td>
|
34 |
</tr>
|
60 |
</th>
|
61 |
<td>
|
62 |
<textarea name="srm_gmap_message" class="wp_gmap_contact_field" id="srm_gmap_message"
|
63 |
+
placeholder="Hello Saidur Rahman" required=""
|
64 |
rows="3" cols="50"></textarea>
|
65 |
</td>
|
66 |
</tr>
|
79 |
</form>
|
80 |
</div>
|
81 |
|
82 |
+
<div class="srm_gmap_instructions">
|
83 |
+
<h3>Frequently asked questions</h3>
|
84 |
+
<ul>
|
85 |
+
<li>
|
86 |
+
<a href="http://srmilon.info/2019/02/18/how-to-get-google-map-api-key" target="_blank">How to get API
|
87 |
+
key?</a>
|
88 |
+
</li>
|
89 |
+
<li>
|
90 |
+
<a href="http://srmilon.info/2019/03/31/how-to-get-your-license-key" target="_blank">How to get your
|
91 |
+
License key?</a>
|
92 |
+
</li>
|
93 |
+
<li>
|
94 |
+
<a href="http://srmilon.info/2019/03/31/how-to-add-google-map-in-your-wordpress-page" target="_blank">How to
|
95 |
+
add Google Map in page?</a>
|
96 |
+
</li>
|
97 |
+
<li>
|
98 |
+
<a href="http://srmilon.info/2019/03/31/how-to-add-google-map-in-your-wordpress-post" target="_blank">How to
|
99 |
+
add Google Map in post?</a>
|
100 |
+
</li>
|
101 |
+
<li>
|
102 |
+
<a href="http://srmilon.info/2019/03/31/how-to-add-google-map-in-sidebar-as-widget" target="_blank">How to
|
103 |
+
add Google Map in Sidebar as widget?</a>
|
104 |
+
</li>
|
105 |
+
<li>
|
106 |
+
<a href="http://srmilon.info/2019/03/31/can-not-load-the-map-correctly" target="_blank">Do you see "the page
|
107 |
+
can\'t load the map correctly"?</a>
|
108 |
+
</li>
|
109 |
+
</ul>
|
110 |
+
</div>
|
111 |
+
|
112 |
<div class="srm_gmap_video_area">
|
113 |
+
<iframe width="100%" height="520" src="https://www.youtube.com/embed/Lak-tJjGjl8" frameborder="0"
|
114 |
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
115 |
</div>
|
116 |
|
languages/gmap-embed-da_DK.po
CHANGED
@@ -80,8 +80,8 @@ msgid "Disable zoom on mouse scroll"
|
|
80 |
msgstr "Deaktiver zoom med musen"
|
81 |
|
82 |
#. Author of the plugin/theme
|
83 |
-
msgid "
|
84 |
-
msgstr "
|
85 |
|
86 |
#. Description of the plugin/theme
|
87 |
msgid ""
|
@@ -95,8 +95,8 @@ msgstr ""
|
|
95 |
#. Plugin URI of the plugin/theme
|
96 |
#. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.3.0) #-#-#-#-#
|
97 |
#. Author URI of the plugin/theme
|
98 |
-
msgid "http://www.srmilon.
|
99 |
-
msgstr "http://www.srmilon.
|
100 |
|
101 |
#. Plugin Name of the plugin/theme
|
102 |
msgid "Google Map Embed"
|
80 |
msgstr "Deaktiver zoom med musen"
|
81 |
|
82 |
#. Author of the plugin/theme
|
83 |
+
msgid "srmilon.info"
|
84 |
+
msgstr "srmilon.info"
|
85 |
|
86 |
#. Description of the plugin/theme
|
87 |
msgid ""
|
95 |
#. Plugin URI of the plugin/theme
|
96 |
#. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.3.0) #-#-#-#-#
|
97 |
#. Author URI of the plugin/theme
|
98 |
+
msgid "http://www.srmilon.info"
|
99 |
+
msgstr "http://www.srmilon.info"
|
100 |
|
101 |
#. Plugin Name of the plugin/theme
|
102 |
msgid "Google Map Embed"
|
languages/gmap-embed-de_DE.po
CHANGED
@@ -80,8 +80,8 @@ msgid "The plugin will help to google map Embed in post and pages also in sideba
|
|
80 |
msgstr "Dieses Plugin hilft dabei Google Maps in Beiträgen und Seiten, sowie als Widget in der Seitenleiste, einzubinden."
|
81 |
|
82 |
#. Author of the plugin/theme
|
83 |
-
msgid "
|
84 |
-
msgstr "
|
85 |
|
86 |
#: includes/wpgmap_create.php:92 includes/wpgmap_edit.php:108
|
87 |
msgid "Show in marker infowindow"
|
@@ -135,8 +135,8 @@ msgstr "Breitengrad, Längengrad"
|
|
135 |
#. Plugin URI of the plugin/theme
|
136 |
#. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.2.5) #-#-#-#-#
|
137 |
#. Author URI of the plugin/theme
|
138 |
-
msgid "http://www.srmilon.
|
139 |
-
msgstr "http://www.srmilon.
|
140 |
|
141 |
#: includes/wpgmap_create.php:63 includes/wpgmap_edit.php:73
|
142 |
msgid "Height (px)"
|
80 |
msgstr "Dieses Plugin hilft dabei Google Maps in Beiträgen und Seiten, sowie als Widget in der Seitenleiste, einzubinden."
|
81 |
|
82 |
#. Author of the plugin/theme
|
83 |
+
msgid "srmilon.info"
|
84 |
+
msgstr "srmilon.info"
|
85 |
|
86 |
#: includes/wpgmap_create.php:92 includes/wpgmap_edit.php:108
|
87 |
msgid "Show in marker infowindow"
|
135 |
#. Plugin URI of the plugin/theme
|
136 |
#. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.2.5) #-#-#-#-#
|
137 |
#. Author URI of the plugin/theme
|
138 |
+
msgid "http://www.srmilon.info"
|
139 |
+
msgstr "http://www.srmilon.info"
|
140 |
|
141 |
#: includes/wpgmap_create.php:63 includes/wpgmap_edit.php:73
|
142 |
msgid "Height (px)"
|
languages/gmap-embed-de_DE_formal.po
CHANGED
@@ -72,8 +72,8 @@ msgid "Zoom"
|
|
72 |
msgstr "Zoom"
|
73 |
|
74 |
#. Author of the plugin/theme
|
75 |
-
msgid "
|
76 |
-
msgstr "
|
77 |
|
78 |
#: includes/wpgmap_create.php:71 includes/wpgmap_edit.php:82
|
79 |
msgid "Map Type"
|
@@ -95,8 +95,8 @@ msgstr "Einstellungen"
|
|
95 |
#. Plugin URI of the plugin/theme
|
96 |
#. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.2.5) #-#-#-#-#
|
97 |
#. Author URI of the plugin/theme
|
98 |
-
msgid "http://www.srmilon.
|
99 |
-
msgstr "http://www.srmilon.
|
100 |
|
101 |
#: includes/wpgmap_create.php:63 includes/wpgmap_edit.php:73
|
102 |
msgid "Height (px)"
|
72 |
msgstr "Zoom"
|
73 |
|
74 |
#. Author of the plugin/theme
|
75 |
+
msgid "srmilon.info"
|
76 |
+
msgstr "srmilon.info"
|
77 |
|
78 |
#: includes/wpgmap_create.php:71 includes/wpgmap_edit.php:82
|
79 |
msgid "Map Type"
|
95 |
#. Plugin URI of the plugin/theme
|
96 |
#. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.2.5) #-#-#-#-#
|
97 |
#. Author URI of the plugin/theme
|
98 |
+
msgid "http://www.srmilon.info"
|
99 |
+
msgstr "http://www.srmilon.info"
|
100 |
|
101 |
#: includes/wpgmap_create.php:63 includes/wpgmap_edit.php:73
|
102 |
msgid "Height (px)"
|
languages/gmap-embed-es_ES.po
CHANGED
@@ -72,8 +72,8 @@ msgid "Disable zoom on mouse scroll"
|
|
72 |
msgstr "Desactivar el zoom para el scroll del ratón."
|
73 |
|
74 |
#. Author of the plugin/theme
|
75 |
-
msgid "
|
76 |
-
msgstr "
|
77 |
|
78 |
#. Description of the plugin/theme
|
79 |
msgid "The plugin will help to embed Google Map in post and pages also in sidebar as widget."
|
72 |
msgstr "Desactivar el zoom para el scroll del ratón."
|
73 |
|
74 |
#. Author of the plugin/theme
|
75 |
+
msgid "srmilon.info"
|
76 |
+
msgstr "srmilon.info"
|
77 |
|
78 |
#. Description of the plugin/theme
|
79 |
msgid "The plugin will help to embed Google Map in post and pages also in sidebar as widget."
|
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.1
|
7 |
-
Version: 1.4.
|
8 |
-
Stable tag: 1.4.
|
9 |
Requires PHP: 5.3
|
10 |
Text Domain: gmap-embed
|
11 |
License: GPLv2 or later
|
@@ -66,7 +66,8 @@ https://www.youtube.com/watch?v=Lak-tJjGjl8
|
|
66 |
### USE AS SHORTCODE IN POST, PAGE, AND SIDEBAR.
|
67 |
`[gmap-embed id="<Your map ID>"]`
|
68 |
|
69 |
-
|
|
|
70 |
`<?php echo do_shortcode('[gmap-embed id="YOUR MAP ID"]');?>`
|
71 |
|
72 |
|
@@ -266,4 +267,7 @@ See the [Video](https://www.youtube.com/watch?v=Lak-tJjGjl8) ,hope you will get
|
|
266 |
* User help manual, FAQ and details description updated, also bug fixed.
|
267 |
|
268 |
= 1.4.2 =
|
269 |
-
* Bug fixing, Added instant contact form to give best experience and getting suggestion from users.
|
|
|
|
|
|
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.1
|
7 |
+
Version: 1.4.3
|
8 |
+
Stable tag: 1.4.3
|
9 |
Requires PHP: 5.3
|
10 |
Text Domain: gmap-embed
|
11 |
License: GPLv2 or later
|
66 |
### USE AS SHORTCODE IN POST, PAGE, AND SIDEBAR.
|
67 |
`[gmap-embed id="<Your map ID>"]`
|
68 |
|
69 |
+
|
70 |
+
### USE AS SHORTCODE IN PHP CODE
|
71 |
`<?php echo do_shortcode('[gmap-embed id="YOUR MAP ID"]');?>`
|
72 |
|
73 |
|
267 |
* User help manual, FAQ and details description updated, also bug fixed.
|
268 |
|
269 |
= 1.4.2 =
|
270 |
+
* Bug fixing, Added instant contact form to give best experience and getting suggestion from users.
|
271 |
+
|
272 |
+
= 1.4.3 =
|
273 |
+
* Faq and contact page updated.
|
srm_gmap_embed.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Google Map Embed
|
4 |
-
Plugin URI: http://www.srmilon.
|
5 |
Description: The plugin will help to embed Google Map in post and pages also in sidebar as widget.
|
6 |
-
Author:
|
7 |
Text Domain: gmap-embed
|
8 |
Domain Path: /languages
|
9 |
-
Author URI: http://www.srmilon.
|
10 |
-
Version: 1.4.
|
11 |
*/
|
12 |
|
13 |
if (!defined('ABSPATH')) exit;
|
@@ -59,7 +59,7 @@ if (!class_exists('srm_gmap_embed_main')) {
|
|
59 |
if ($pagenow == 'post.php' || $pagenow == 'post-new.php' || @$_GET['page'] == 'wpgmapembed') {
|
60 |
wp_enqueue_script('wp-gmap-api', 'https://maps.google.com/maps/api/js?key=' . $this->wpgmap_api_key . '&libraries=places', array('jquery'), '20161019', true);
|
61 |
wp_enqueue_script('wp-gmap-custom-js', plugins_url('assets/js/custom.js', __FILE__), array('wp-gmap-api'), '20161019', false);
|
62 |
-
wp_enqueue_style('wp-gmap-embed-css', plugins_url('assets/css/wp-gmap-style.css', __FILE__),rand(999,9999));
|
63 |
}
|
64 |
}
|
65 |
|
@@ -71,10 +71,10 @@ if (!class_exists('srm_gmap_embed_main')) {
|
|
71 |
{
|
72 |
|
73 |
//create new top-level menu
|
74 |
-
add_menu_page($this->plugin_name, $this->plugin_name, 'administrator', 'wpgmapembed', array($this, 'srm_gmap_main'), 'dashicons-location',11);
|
75 |
|
76 |
//to create sub menu
|
77 |
-
add_submenu_page('wpgmapembed', __("Add new Map","gmap-embed"), __("Add New", "gmap-embed"), 'administrator', 'wpgmapembed&tag=new', array($this, 'srm_gmap_new'), 'dashicons-location');
|
78 |
}
|
79 |
|
80 |
public function gmap_register_fields()
|
@@ -180,7 +180,7 @@ if (!class_exists('srm_gmap_embed_main')) {
|
|
180 |
$content = '';
|
181 |
$args = array(
|
182 |
'post_type' => 'wpgmapembed',
|
183 |
-
'posts_per_page'
|
184 |
);
|
185 |
$mapsList = new WP_Query($args);
|
186 |
|
@@ -200,7 +200,7 @@ if (!class_exists('srm_gmap_embed_main')) {
|
|
200 |
</div>
|
201 |
<div class="wp-gmap-single-action">
|
202 |
<a href="?page=wpgmapembed&tag=edit&id=' . get_the_ID() . '" class="button media-button button-primary button-large wpgmap-edit" data-id="' . get_the_ID() . '">
|
203 |
-
'.__('Change','gmap-embed').'
|
204 |
</a>
|
205 |
<button type="button"
|
206 |
class="button media-button button-danger button-large wpgmap-insert-delete" data-id="' . get_the_ID() . '" style="background-color: red;color: white;opacity:0.7;">
|
@@ -210,9 +210,38 @@ if (!class_exists('srm_gmap_embed_main')) {
|
|
210 |
</div>';
|
211 |
}
|
212 |
} else {
|
213 |
-
$content = __("You have not created any Map yet. ","gmap-embed");
|
214 |
-
$content .= '<a href="' . esc_url(admin_url()) . 'admin.php?page=wpgmapembed&tag=new"
|
215 |
-
data-id="wp-gmap-new" class="media-menu-item">'.__("Create New Map","gmap-embed").'</a>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
}
|
217 |
|
218 |
echo $content;
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Google Map Embed
|
4 |
+
Plugin URI: http://www.srmilon.info
|
5 |
Description: The plugin will help to embed Google Map in post and pages also in sidebar as widget.
|
6 |
+
Author: srmilon.info
|
7 |
Text Domain: gmap-embed
|
8 |
Domain Path: /languages
|
9 |
+
Author URI: http://www.srmilon.info
|
10 |
+
Version: 1.4.3
|
11 |
*/
|
12 |
|
13 |
if (!defined('ABSPATH')) exit;
|
59 |
if ($pagenow == 'post.php' || $pagenow == 'post-new.php' || @$_GET['page'] == 'wpgmapembed') {
|
60 |
wp_enqueue_script('wp-gmap-api', 'https://maps.google.com/maps/api/js?key=' . $this->wpgmap_api_key . '&libraries=places', array('jquery'), '20161019', true);
|
61 |
wp_enqueue_script('wp-gmap-custom-js', plugins_url('assets/js/custom.js', __FILE__), array('wp-gmap-api'), '20161019', false);
|
62 |
+
wp_enqueue_style('wp-gmap-embed-css', plugins_url('assets/css/wp-gmap-style.css', __FILE__), rand(999, 9999));
|
63 |
}
|
64 |
}
|
65 |
|
71 |
{
|
72 |
|
73 |
//create new top-level menu
|
74 |
+
add_menu_page($this->plugin_name, $this->plugin_name, 'administrator', 'wpgmapembed', array($this, 'srm_gmap_main'), 'dashicons-location', 11);
|
75 |
|
76 |
//to create sub menu
|
77 |
+
add_submenu_page('wpgmapembed', __("Add new Map", "gmap-embed"), __("Add New", "gmap-embed"), 'administrator', 'wpgmapembed&tag=new', array($this, 'srm_gmap_new'), 'dashicons-location');
|
78 |
}
|
79 |
|
80 |
public function gmap_register_fields()
|
180 |
$content = '';
|
181 |
$args = array(
|
182 |
'post_type' => 'wpgmapembed',
|
183 |
+
'posts_per_page' => -1
|
184 |
);
|
185 |
$mapsList = new WP_Query($args);
|
186 |
|
200 |
</div>
|
201 |
<div class="wp-gmap-single-action">
|
202 |
<a href="?page=wpgmapembed&tag=edit&id=' . get_the_ID() . '" class="button media-button button-primary button-large wpgmap-edit" data-id="' . get_the_ID() . '">
|
203 |
+
' . __('Change', 'gmap-embed') . '
|
204 |
</a>
|
205 |
<button type="button"
|
206 |
class="button media-button button-danger button-large wpgmap-insert-delete" data-id="' . get_the_ID() . '" style="background-color: red;color: white;opacity:0.7;">
|
210 |
</div>';
|
211 |
}
|
212 |
} else {
|
213 |
+
$content = __("You have not created any Map yet. ", "gmap-embed");
|
214 |
+
$content .= '<a style="padding: 9px;border-radius: 5px;background-color: #0073aa;color: white;text-decoration: none;font-weight: bold;font-size: 11px;" href="' . esc_url(admin_url()) . 'admin.php?page=wpgmapembed&tag=new"
|
215 |
+
data-id="wp-gmap-new" class="media-menu-item">' . __("Create New Map", "gmap-embed") . '</a>';
|
216 |
+
$content .= '<br/><br/><div class="srm_gmap_instructions">
|
217 |
+
<h3>Frequently asked questions</h3>
|
218 |
+
<ul>
|
219 |
+
<li>
|
220 |
+
<a href="http://srmilon.info/2019/02/18/how-to-get-google-map-api-key" target="_blank">How to get API
|
221 |
+
key?</a>
|
222 |
+
</li>
|
223 |
+
<li>
|
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>
|
230 |
+
</li>
|
231 |
+
<li>
|
232 |
+
<a href="http://srmilon.info/2019/03/31/how-to-add-google-map-in-your-wordpress-post" target="_blank">How to
|
233 |
+
add Google Map in post?</a>
|
234 |
+
</li>
|
235 |
+
<li>
|
236 |
+
<a href="http://srmilon.info/2019/03/31/how-to-add-google-map-in-sidebar-as-widget" target="_blank">How to
|
237 |
+
add Google Map in Sidebar as widget?</a>
|
238 |
+
</li>
|
239 |
+
<li>
|
240 |
+
<a href="http://srmilon.info/2019/03/31/can-not-load-the-map-correctly" target="_blank">Do you see "the page
|
241 |
+
can\'t load the map correctly"?</a>
|
242 |
+
</li>
|
243 |
+
</ul>
|
244 |
+
</div>';
|
245 |
}
|
246 |
|
247 |
echo $content;
|