WP Google Map - Version 1.3.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.3.8
Comparing to
See all releases

Code changes from version 1.3.7 to 1.3.8

assets/css/wp-gmap-style.css CHANGED
@@ -1,156 +1,156 @@
1
- /******* For Google Map Rendering ******/
2
- .wp-gmap-preview .controls {
3
- margin-top: 10px;
4
- border: 1px solid transparent;
5
- border-radius: 2px 0 0 2px;
6
- box-sizing: border-box;
7
- -moz-box-sizing: border-box;
8
- height: 32px;
9
- outline: none;
10
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
11
- }
12
-
13
- .wp-gmap-preview #pac-input {
14
- background-color: #fff;
15
- font-family: Roboto;
16
- font-size: 15px;
17
- font-weight: 300;
18
- margin-left: 12px;
19
- padding: 0 11px 0 13px;
20
- text-overflow: ellipsis;
21
- width: 300px;
22
- }
23
-
24
- .wp-gmap-preview #pac-input:focus {
25
- border-color: #4d90fe;
26
- }
27
-
28
- .pac-container {
29
- font-family: Roboto;
30
- z-index: 99999;
31
- }
32
-
33
- #type-selector {
34
- color: #fff;
35
- background-color: #4d90fe;
36
- padding: 5px 11px 0px 11px;
37
- }
38
-
39
- #type-selector label {
40
- font-family: Roboto;
41
- font-size: 13px;
42
- font-weight: 300;
43
- }
44
-
45
- #target {
46
- width: 345px;
47
- }
48
-
49
- /******* Google Map Settings ******/
50
- #gmap_container_inner {
51
- background-color: white;
52
- float: left;
53
- width: 100%;
54
- }
55
-
56
- .popup-content {
57
- position: relative;
58
- width: 60%;
59
- }
60
-
61
- /******* Map Nav Related ********/
62
- ul#wp-gmap-nav {
63
- list-style-type: none;
64
- padding: 0;
65
- margin: 0px;
66
- }
67
-
68
- ul#wp-gmap-nav li {
69
- display: inline-block;
70
- background-color: #32c896;
71
- border-bottom: solid 5px #238b68;
72
- color: #fff;
73
- cursor: pointer;
74
- }
75
-
76
- ul#wp-gmap-nav li:hover, ul#wp-gmap-nav .active {
77
- background-color: #238b68;
78
- }
79
-
80
- ul#wp-gmap-nav li a {
81
- color: white;
82
- text-decoration: none;
83
- display: block;
84
- padding: 5px 20px;
85
- font-weight: bold;
86
- }
87
-
88
- /******* Map Tab Related ******/
89
- #wp-gmap-tabs .wp-gmap-tab-content {
90
- display: none;
91
- }
92
-
93
- #wp-gmap-tabs .active {
94
- display: block;
95
- }
96
-
97
- /******* Map List Related ******/
98
- .wp-gmap-list {
99
- padding: 1%;
100
- float: left;
101
- width: 97%;
102
- }
103
-
104
- .wp-gmap-single {
105
- padding: .2% 1%;
106
- float: left;
107
- width: 97%;
108
- border: 1px #ccc solid;
109
- margin: 7px 0px;
110
- background-color: #f3f3f3;
111
- }
112
-
113
- .wp-gmap-single-left {
114
- width: 80%;
115
- float: left;
116
- }
117
-
118
- .wp-gmap-single-title {
119
- font-size: 18px;
120
- font-weight: 600;
121
- padding: 5px 0;
122
- }
123
-
124
- .wp-gmap-single-action {
125
- width: 20%;
126
- padding: 13px 0;
127
- float: left;
128
- text-align: right;
129
- }
130
-
131
- /******* Map Properties ******/
132
- .wp-gmap-properties {
133
- width: 30%;
134
- padding: 1%;
135
- border: 1px #ccc solid;
136
- background-color: #f3f3f3;
137
- margin: 9px;
138
- float: left;
139
- }
140
-
141
- .gmap_properties tr {
142
- height: 50px;
143
- }
144
- .gmap_properties tr .regular-text{
145
- width: 24em !important;
146
- }
147
-
148
- /******* To Preview Map ******/
149
- .wp-gmap-preview {
150
- width: 62%;
151
- padding: 1%;
152
- border: 1px #ccc solid;
153
- background-color: #f3f3f3;
154
- margin: 9px;
155
- float: left;
156
  }
1
+ /******* For Google Map Rendering ******/
2
+ .wp-gmap-preview .controls {
3
+ margin-top: 10px;
4
+ border: 1px solid transparent;
5
+ border-radius: 2px 0 0 2px;
6
+ box-sizing: border-box;
7
+ -moz-box-sizing: border-box;
8
+ height: 32px;
9
+ outline: none;
10
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
11
+ }
12
+
13
+ .wp-gmap-preview #pac-input {
14
+ background-color: #fff;
15
+ font-family: Roboto;
16
+ font-size: 15px;
17
+ font-weight: 300;
18
+ margin-left: 12px;
19
+ padding: 0 11px 0 13px;
20
+ text-overflow: ellipsis;
21
+ width: 300px;
22
+ }
23
+
24
+ .wp-gmap-preview #pac-input:focus {
25
+ border-color: #4d90fe;
26
+ }
27
+
28
+ .pac-container {
29
+ font-family: Roboto;
30
+ z-index: 99999;
31
+ }
32
+
33
+ #type-selector {
34
+ color: #fff;
35
+ background-color: #4d90fe;
36
+ padding: 5px 11px 0px 11px;
37
+ }
38
+
39
+ #type-selector label {
40
+ font-family: Roboto;
41
+ font-size: 13px;
42
+ font-weight: 300;
43
+ }
44
+
45
+ #target {
46
+ width: 345px;
47
+ }
48
+
49
+ /******* Google Map Settings ******/
50
+ #gmap_container_inner {
51
+ background-color: white;
52
+ float: left;
53
+ width: 100%;
54
+ }
55
+
56
+ .popup-content {
57
+ position: relative;
58
+ width: 60%;
59
+ }
60
+
61
+ /******* Map Nav Related ********/
62
+ ul#wp-gmap-nav {
63
+ list-style-type: none;
64
+ padding: 0;
65
+ margin: 0px;
66
+ }
67
+
68
+ ul#wp-gmap-nav li {
69
+ display: inline-block;
70
+ background-color: #32c896;
71
+ border-bottom: solid 5px #238b68;
72
+ color: #fff;
73
+ cursor: pointer;
74
+ }
75
+
76
+ ul#wp-gmap-nav li:hover, ul#wp-gmap-nav .active {
77
+ background-color: #238b68;
78
+ }
79
+
80
+ ul#wp-gmap-nav li a {
81
+ color: white;
82
+ text-decoration: none;
83
+ display: block;
84
+ padding: 5px 20px;
85
+ font-weight: bold;
86
+ }
87
+
88
+ /******* Map Tab Related ******/
89
+ #wp-gmap-tabs .wp-gmap-tab-content {
90
+ display: none;
91
+ }
92
+
93
+ #wp-gmap-tabs .active {
94
+ display: block;
95
+ }
96
+
97
+ /******* Map List Related ******/
98
+ .wp-gmap-list {
99
+ padding: 1%;
100
+ float: left;
101
+ width: 97%;
102
+ }
103
+
104
+ .wp-gmap-single {
105
+ padding: .2% 1%;
106
+ float: left;
107
+ width: 97%;
108
+ border: 1px #ccc solid;
109
+ margin: 7px 0px;
110
+ background-color: #f3f3f3;
111
+ }
112
+
113
+ .wp-gmap-single-left {
114
+ width: 80%;
115
+ float: left;
116
+ }
117
+
118
+ .wp-gmap-single-title {
119
+ font-size: 18px;
120
+ font-weight: 600;
121
+ padding: 5px 0;
122
+ }
123
+
124
+ .wp-gmap-single-action {
125
+ width: 20%;
126
+ padding: 13px 0;
127
+ float: left;
128
+ text-align: right;
129
+ }
130
+
131
+ /******* Map Properties ******/
132
+ .wp-gmap-properties {
133
+ width: 30%;
134
+ padding: 1%;
135
+ border: 1px #ccc solid;
136
+ background-color: #f3f3f3;
137
+ margin: 9px;
138
+ float: left;
139
+ }
140
+
141
+ .gmap_properties tr {
142
+ height: 50px;
143
+ }
144
+ .gmap_properties tr .regular-text{
145
+ width: 24em !important;
146
+ }
147
+
148
+ /******* To Preview Map ******/
149
+ .wp-gmap-preview {
150
+ width: 62%;
151
+ padding: 1%;
152
+ border: 1px #ccc solid;
153
+ background-color: #f3f3f3;
154
+ margin: 9px;
155
+ float: left;
156
  }
assets/js/custom.js CHANGED
@@ -1,181 +1,181 @@
1
- (function ($) {
2
- $(function () {
3
-
4
- //******* On Open Button Click *******
5
- //$('body #srm_gmap_embed,body #srm_gmap_embed1').on('click', openSrmGmapPopup);
6
-
7
- //******* On Close Button Click*******
8
- $(document.body).on('click', '.wp_gmap_close_btn', removeSrmGmapPopup);
9
-
10
- //******* On Escape Button Click *******
11
- $(document).keyup(function (e) {
12
- if (e.which == 27) {
13
- removeSrmGmapPopup();
14
- }
15
- });
16
-
17
- //******* To Open Gmap Popup *******
18
- function openSrmGmapPopup() {
19
- $("body #cboxOverlay,#wp_gmap_popup_container").css('display', 'block');
20
- readyGmapPopupWindow();
21
- }
22
-
23
- //******* Removing Popup Box *******
24
- function removeSrmGmapPopup() {
25
- self.parent.tb_remove();
26
- }
27
-
28
- //******* To load Maps List *******
29
- function loadSrmGmapsList() {
30
- $("#wp-gmap-all").find(".spinner").addClass('is-active');
31
- $("#wpgmapembed_list").html('');
32
- var data = {
33
- 'action': 'wpgmapembed_popup_load_map_data',
34
- 'data': ''
35
- };
36
- jQuery.post(ajaxurl, data, function (response) {
37
- $("#wp-gmap-all").find(".spinner").removeClass('is-active');
38
- $("#wpgmapembed_list").html(response);
39
- });
40
- }
41
-
42
- //******* Initiate Google Map/List *******
43
- function readyGmapPopupWindow() {
44
- loadSrmGmapsList();
45
- }
46
- window.onload = readyGmapPopupWindow;
47
-
48
- //******* To insert ShortCode From List *******
49
- $(document.body).on('click', ".wpgmap-insert-shortcode", function () {
50
-
51
- var shortcode = $(this).parent().parent().find('.wpgmap-shortcode').val();
52
- if (!tinyMCE.activeEditor || tinyMCE.activeEditor.isHidden()) {
53
- $('textarea#content').val(shortcode);
54
- } else {
55
- tinyMCE.execCommand('mceInsertContent', false, shortcode);
56
- }
57
- removeSrmGmapPopup();
58
- });
59
-
60
- //******* To Edit/Update Map Data *******
61
- $(document.body).on('click', ".wpgmap-insert-delete", function () {
62
- if (!confirm("Are you sure to Delete")) {
63
- return false;
64
- }
65
- $("#wp-gmap-nav").find('.spinner').addClass('is-active');
66
- var btn_class = $(this);
67
- btn_class.prop('disabled', true);
68
- var post_id = $(this).data('id');
69
- var data = {
70
- 'action': 'wpgmapembed_remove_wpgmap',
71
- 'post_id': post_id
72
- };
73
-
74
- jQuery.post(ajaxurl, data, function (response) {
75
- response = JSON.parse(response);
76
- btn_class.prop('disabled', false);
77
- window.location.reload();
78
- });
79
- });
80
-
81
- //************** On Save, Update and Insert Button on Click
82
- $(document.body).on('click', "#wp-gmap-embed-save,#wp-gmap-embed-save-and-insert,#wp-gmap-embed-update", function () {
83
-
84
- $(this).prop('disabled', true);
85
-
86
- var btn_id = $(this).attr('id');
87
-
88
- if (btn_id == 'wp-gmap-embed-save') {
89
- var parent = $("body #wp-gmap-new");
90
- } else if (btn_id == 'wp-gmap-embed-update') {
91
- var parent = $("body #wp-gmap-edit");
92
- }
93
-
94
-
95
- $(this).parent().find(".spinner").addClass('is-active');
96
-
97
- // getting checkbox value
98
- if (parent.find("#wpgmap_show_heading").is(':checked') === true) {
99
- var wpgmap_show_heading = 1;
100
- } else {
101
- var wpgmap_show_heading = 0;
102
- }
103
-
104
- if (parent.find("#wpgmap_show_infowindow").is(':checked') === true) {
105
- var wpgmap_show_infowindow = 1;
106
- } else {
107
- var wpgmap_show_infowindow = 0;
108
- }
109
- if (parent.find("#wpgmap_disable_zoom_scroll").is(':checked') === true) {
110
- var wpgmap_disable_zoom_scroll = 1;
111
- } else {
112
- var wpgmap_disable_zoom_scroll = 0;
113
- }
114
- if (parent.find("#wpgmap_enable_direction").is(':checked') === true) {
115
- var wpgmap_enable_direction = 1;
116
- } else {
117
- var wpgmap_enable_direction = 0;
118
- }
119
-
120
- var wpgmap_title = parent.find("#wpgmap_title").val();
121
- var wpgmap_heading_class = parent.find("#wpgmap_heading_class").val();
122
- var wpgmap_latlng = parent.find("#wpgmap_latlng").val();
123
- var wpgmap_map_zoom = parent.find("#wpgmap_map_zoom").val();
124
- var wpgmap_map_width = parent.find("#wpgmap_map_width").val();
125
- var wpgmap_map_height = parent.find("#wpgmap_map_height").val();
126
- var wpgmap_map_type = parent.find("#wpgmap_map_type").val();
127
- var wpgmap_map_address = parent.find("#wpgmap_map_address").val();
128
-
129
- var map_data = {
130
- wpgmap_title: wpgmap_title,
131
- wpgmap_heading_class: wpgmap_heading_class,
132
- wpgmap_show_heading: wpgmap_show_heading,
133
- wpgmap_latlng: wpgmap_latlng,
134
- wpgmap_map_zoom: wpgmap_map_zoom,
135
- wpgmap_disable_zoom_scroll: wpgmap_disable_zoom_scroll,
136
- wpgmap_map_width: wpgmap_map_width,
137
- wpgmap_map_height: wpgmap_map_height,
138
- wpgmap_map_type: wpgmap_map_type,
139
- wpgmap_map_address: wpgmap_map_address,
140
- wpgmap_show_infowindow: wpgmap_show_infowindow,
141
- wpgmap_enable_direction: wpgmap_enable_direction
142
- };
143
-
144
- if (btn_id == 'wp-gmap-embed-save') {
145
- map_data.action_type = 'save';
146
- } else if (btn_id == 'wp-gmap-embed-update') {
147
- map_data.action_type = 'update';
148
- map_data.post_id = parent.find("#wpgmap_map_id").val();
149
- }
150
-
151
- var data = {
152
- 'action': 'wpgmapembed_save_map_data',
153
- 'map_data': map_data
154
- };
155
-
156
-
157
- // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
158
- jQuery.post(ajaxurl, data, function (response) {
159
- $("#" + btn_id).parent().find(".spinner").removeClass('is-active');
160
- response = JSON.parse(response);
161
- if (response.responseCode == 0) {
162
- $("#" + btn_id).prop('disabled', false);
163
- parent.find('.wpgmap_msg_error').html('<div class="error bellow-h2 notice notice-error is-dismissible"><p>' + response.message + '</p></div>');
164
- } else {
165
-
166
- if (btn_id == 'wp-gmap-embed-save' || btn_id == 'wp-gmap-embed-update') {
167
-
168
- $("#" + btn_id).prop('disabled', false);
169
- var redirectTo = (btn_id == 'wp-gmap-embed-save')?1:2;
170
- window.location.href = '?page=wpgmapembed&message='+redirectTo;
171
- $('body #wp-gmap-all .wpgmap_msg_error').html('<div class="success bellow-h2 notice notice-success is-dismissible"><p>' + response.message + '</p></div>');
172
- }
173
- $("#wpgmap_title,#wpgmap_latlng, #wpgmap_map_address").val("");
174
- $("#wpgmap_show_heading,#wpgmap_show_infowindow").prop("checked", false);
175
-
176
- }
177
- });
178
- });
179
-
180
- });
181
  })(jQuery);
1
+ (function ($) {
2
+ $(function () {
3
+
4
+ //******* On Open Button Click *******
5
+ //$('body #srm_gmap_embed,body #srm_gmap_embed1').on('click', openSrmGmapPopup);
6
+
7
+ //******* On Close Button Click*******
8
+ $(document.body).on('click', '.wp_gmap_close_btn', removeSrmGmapPopup);
9
+
10
+ //******* On Escape Button Click *******
11
+ $(document).keyup(function (e) {
12
+ if (e.which == 27) {
13
+ removeSrmGmapPopup();
14
+ }
15
+ });
16
+
17
+ //******* To Open Gmap Popup *******
18
+ function openSrmGmapPopup() {
19
+ $("body #cboxOverlay,#wp_gmap_popup_container").css('display', 'block');
20
+ readyGmapPopupWindow();
21
+ }
22
+
23
+ //******* Removing Popup Box *******
24
+ function removeSrmGmapPopup() {
25
+ self.parent.tb_remove();
26
+ }
27
+
28
+ //******* To load Maps List *******
29
+ function loadSrmGmapsList() {
30
+ $("#wp-gmap-all").find(".spinner").addClass('is-active');
31
+ $("#wpgmapembed_list").html('');
32
+ var data = {
33
+ 'action': 'wpgmapembed_popup_load_map_data',
34
+ 'data': ''
35
+ };
36
+ jQuery.post(ajaxurl, data, function (response) {
37
+ $("#wp-gmap-all").find(".spinner").removeClass('is-active');
38
+ $("#wpgmapembed_list").html(response);
39
+ });
40
+ }
41
+
42
+ //******* Initiate Google Map/List *******
43
+ function readyGmapPopupWindow() {
44
+ loadSrmGmapsList();
45
+ }
46
+ window.onload = readyGmapPopupWindow;
47
+
48
+ //******* To insert ShortCode From List *******
49
+ $(document.body).on('click', ".wpgmap-insert-shortcode", function () {
50
+
51
+ var shortcode = $(this).parent().parent().find('.wpgmap-shortcode').val();
52
+ if (!tinyMCE.activeEditor || tinyMCE.activeEditor.isHidden()) {
53
+ $('textarea#content').val(shortcode);
54
+ } else {
55
+ tinyMCE.execCommand('mceInsertContent', false, shortcode);
56
+ }
57
+ removeSrmGmapPopup();
58
+ });
59
+
60
+ //******* To Edit/Update Map Data *******
61
+ $(document.body).on('click', ".wpgmap-insert-delete", function () {
62
+ if (!confirm("Are you sure to Delete")) {
63
+ return false;
64
+ }
65
+ $("#wp-gmap-nav").find('.spinner').addClass('is-active');
66
+ var btn_class = $(this);
67
+ btn_class.prop('disabled', true);
68
+ var post_id = $(this).data('id');
69
+ var data = {
70
+ 'action': 'wpgmapembed_remove_wpgmap',
71
+ 'post_id': post_id
72
+ };
73
+
74
+ jQuery.post(ajaxurl, data, function (response) {
75
+ response = JSON.parse(response);
76
+ btn_class.prop('disabled', false);
77
+ window.location.reload();
78
+ });
79
+ });
80
+
81
+ //************** On Save, Update and Insert Button on Click
82
+ $(document.body).on('click', "#wp-gmap-embed-save,#wp-gmap-embed-save-and-insert,#wp-gmap-embed-update", function () {
83
+
84
+ $(this).prop('disabled', true);
85
+
86
+ var btn_id = $(this).attr('id');
87
+
88
+ if (btn_id == 'wp-gmap-embed-save') {
89
+ var parent = $("body #wp-gmap-new");
90
+ } else if (btn_id == 'wp-gmap-embed-update') {
91
+ var parent = $("body #wp-gmap-edit");
92
+ }
93
+
94
+
95
+ $(this).parent().find(".spinner").addClass('is-active');
96
+
97
+ // getting checkbox value
98
+ if (parent.find("#wpgmap_show_heading").is(':checked') === true) {
99
+ var wpgmap_show_heading = 1;
100
+ } else {
101
+ var wpgmap_show_heading = 0;
102
+ }
103
+
104
+ if (parent.find("#wpgmap_show_infowindow").is(':checked') === true) {
105
+ var wpgmap_show_infowindow = 1;
106
+ } else {
107
+ var wpgmap_show_infowindow = 0;
108
+ }
109
+ if (parent.find("#wpgmap_disable_zoom_scroll").is(':checked') === true) {
110
+ var wpgmap_disable_zoom_scroll = 1;
111
+ } else {
112
+ var wpgmap_disable_zoom_scroll = 0;
113
+ }
114
+ if (parent.find("#wpgmap_enable_direction").is(':checked') === true) {
115
+ var wpgmap_enable_direction = 1;
116
+ } else {
117
+ var wpgmap_enable_direction = 0;
118
+ }
119
+
120
+ var wpgmap_title = parent.find("#wpgmap_title").val();
121
+ var wpgmap_heading_class = parent.find("#wpgmap_heading_class").val();
122
+ var wpgmap_latlng = parent.find("#wpgmap_latlng").val();
123
+ var wpgmap_map_zoom = parent.find("#wpgmap_map_zoom").val();
124
+ var wpgmap_map_width = parent.find("#wpgmap_map_width").val();
125
+ var wpgmap_map_height = parent.find("#wpgmap_map_height").val();
126
+ var wpgmap_map_type = parent.find("#wpgmap_map_type").val();
127
+ var wpgmap_map_address = parent.find("#wpgmap_map_address").val();
128
+
129
+ var map_data = {
130
+ wpgmap_title: wpgmap_title,
131
+ wpgmap_heading_class: wpgmap_heading_class,
132
+ wpgmap_show_heading: wpgmap_show_heading,
133
+ wpgmap_latlng: wpgmap_latlng,
134
+ wpgmap_map_zoom: wpgmap_map_zoom,
135
+ wpgmap_disable_zoom_scroll: wpgmap_disable_zoom_scroll,
136
+ wpgmap_map_width: wpgmap_map_width,
137
+ wpgmap_map_height: wpgmap_map_height,
138
+ wpgmap_map_type: wpgmap_map_type,
139
+ wpgmap_map_address: wpgmap_map_address,
140
+ wpgmap_show_infowindow: wpgmap_show_infowindow,
141
+ wpgmap_enable_direction: wpgmap_enable_direction
142
+ };
143
+
144
+ if (btn_id == 'wp-gmap-embed-save') {
145
+ map_data.action_type = 'save';
146
+ } else if (btn_id == 'wp-gmap-embed-update') {
147
+ map_data.action_type = 'update';
148
+ map_data.post_id = parent.find("#wpgmap_map_id").val();
149
+ }
150
+
151
+ var data = {
152
+ 'action': 'wpgmapembed_save_map_data',
153
+ 'map_data': map_data
154
+ };
155
+
156
+
157
+ // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
158
+ jQuery.post(ajaxurl, data, function (response) {
159
+ $("#" + btn_id).parent().find(".spinner").removeClass('is-active');
160
+ response = JSON.parse(response);
161
+ if (response.responseCode == 0) {
162
+ $("#" + btn_id).prop('disabled', false);
163
+ parent.find('.wpgmap_msg_error').html('<div class="error bellow-h2 notice notice-error is-dismissible"><p>' + response.message + '</p></div>');
164
+ } else {
165
+
166
+ if (btn_id == 'wp-gmap-embed-save' || btn_id == 'wp-gmap-embed-update') {
167
+
168
+ $("#" + btn_id).prop('disabled', false);
169
+ var redirectTo = (btn_id == 'wp-gmap-embed-save')?1:2;
170
+ window.location.href = '?page=wpgmapembed&message='+redirectTo;
171
+ $('body #wp-gmap-all .wpgmap_msg_error').html('<div class="success bellow-h2 notice notice-success is-dismissible"><p>' + response.message + '</p></div>');
172
+ }
173
+ $("#wpgmap_title,#wpgmap_latlng, #wpgmap_map_address").val("");
174
+ $("#wpgmap_show_heading,#wpgmap_show_infowindow").prop("checked", false);
175
+
176
+ }
177
+ });
178
+ });
179
+
180
+ });
181
  })(jQuery);
assets/js/geo_based_map.js CHANGED
@@ -1,45 +1,45 @@
1
- function initWpGmap(lat, lng) {
2
- initAutocomplete('map', 'pac-input', lat, lng, 'roadmap', 13);
3
- }
4
- var tryAPIGeolocation = function () {
5
- jQuery.post("https://www.googleapis.com/geolocation/v1/geolocate?key=AIzaSyBcVcz5OZ6eNBi5d7CFYHIdtsEI5BQlm68", function (success) {
6
- initWpGmap(success.location.lat, success.location.lng);
7
- })
8
- .fail(function (err) {
9
- console.log("API Geolocation error! \n\n" + err);
10
- });
11
- };
12
- var browserGeolocationSuccess = function (position) {
13
- initWpGmap(position.coords.latitude, position.coords.longitude);
14
- };
15
-
16
- var browserGeolocationFail = function (error) {
17
- switch (error.code) {
18
- case error.TIMEOUT:
19
- console.log("Browser geolocation error !\n\nTimeout.");
20
- initWpGmap(40.73359922990751, -74.02791395625002);
21
- break;
22
- case error.PERMISSION_DENIED:
23
- tryAPIGeolocation();
24
- break;
25
- case error.POSITION_UNAVAILABLE:
26
- console.log("Browser geolocation error !\n\nPosition unavailable.");
27
- initWpGmap(40.73359922990751, -74.02791395625002);
28
- break;
29
-
30
- }
31
- };
32
-
33
- var tryGeolocation = function () {
34
- initWpGmap(40.73359922990751, -74.02791395625002);
35
- if (navigator.geolocation) {
36
- navigator.geolocation.getCurrentPosition(
37
- browserGeolocationSuccess,
38
- browserGeolocationFail,
39
- {maximumAge: 50000, timeout: 20000, enableHighAccuracy: true});
40
- } else {
41
- initWpGmap(40.73359922990751, -74.02791395625002);
42
- }
43
- };
44
-
45
  tryGeolocation();
1
+ function initWpGmap(lat, lng) {
2
+ initAutocomplete('map', 'pac-input', lat, lng, 'roadmap', 13);
3
+ }
4
+ var tryAPIGeolocation = function () {
5
+ jQuery.post("https://www.googleapis.com/geolocation/v1/geolocate?key=AIzaSyBcVcz5OZ6eNBi5d7CFYHIdtsEI5BQlm68", function (success) {
6
+ initWpGmap(success.location.lat, success.location.lng);
7
+ })
8
+ .fail(function (err) {
9
+ console.log("API Geolocation error! \n\n" + err);
10
+ });
11
+ };
12
+ var browserGeolocationSuccess = function (position) {
13
+ initWpGmap(position.coords.latitude, position.coords.longitude);
14
+ };
15
+
16
+ var browserGeolocationFail = function (error) {
17
+ switch (error.code) {
18
+ case error.TIMEOUT:
19
+ console.log("Browser geolocation error !\n\nTimeout.");
20
+ initWpGmap(40.73359922990751, -74.02791395625002);
21
+ break;
22
+ case error.PERMISSION_DENIED:
23
+ tryAPIGeolocation();
24
+ break;
25
+ case error.POSITION_UNAVAILABLE:
26
+ console.log("Browser geolocation error !\n\nPosition unavailable.");
27
+ initWpGmap(40.73359922990751, -74.02791395625002);
28
+ break;
29
+
30
+ }
31
+ };
32
+
33
+ var tryGeolocation = function () {
34
+ initWpGmap(40.73359922990751, -74.02791395625002);
35
+ if (navigator.geolocation) {
36
+ navigator.geolocation.getCurrentPosition(
37
+ browserGeolocationSuccess,
38
+ browserGeolocationFail,
39
+ {maximumAge: 50000, timeout: 20000, enableHighAccuracy: true});
40
+ } else {
41
+ initWpGmap(40.73359922990751, -74.02791395625002);
42
+ }
43
+ };
44
+
45
  tryGeolocation();
assets/js/srm_gmap_loader.js CHANGED
@@ -1,106 +1,106 @@
1
- function wpgmapSetAddressByLatLng(lat, lng, id) {
2
- jQuery.getJSON('https://maps.googleapis.com/maps/api/geocode/json?latlng=' + lat + ',' + lng + '&sensor=true')
3
- .done(function (location) {
4
-
5
- document.getElementById('wpgmap_map_address').value = location.results[0].formatted_address;
6
-
7
- });
8
-
9
- }
10
- var map;
11
- var marker1;
12
- // to render Google Map
13
- function initAutocomplete(id, input, center_lat, center_lng, map_type, zoom) {
14
- if (typeof map == 'object') {
15
- map.setCenter({lat: center_lat, lng: center_lng});
16
- marker1 = new google.maps.Marker({
17
- position: new google.maps.LatLng(center_lat, center_lng),
18
- title: "",
19
- draggable: true,
20
- animation: google.maps.Animation.DROP
21
- });
22
- marker1.setMap(map);
23
- marker1.addListener('dragend', function (markerLocation) {
24
- document.getElementById("wpgmap_latlng").value = markerLocation.latLng.lat() + "," + markerLocation.latLng.lng();
25
- wpgmapSetAddressByLatLng(markerLocation.latLng.lat(), markerLocation.latLng.lng());
26
- });
27
- return;
28
- }
29
- document.getElementById("wpgmap_latlng").value = center_lat + "," + center_lng;
30
-
31
- wpgmapSetAddressByLatLng(center_lat, center_lng);
32
-
33
- map = new google.maps.Map(document.getElementById(id), {
34
- center: {lat: center_lat, lng: center_lng},
35
- zoom: zoom,
36
- mapTypeId: map_type
37
- });
38
- marker1 = new google.maps.Marker({
39
- position: new google.maps.LatLng(center_lat, center_lng),
40
- title: "",
41
- draggable: true,
42
- animation: google.maps.Animation.DROP
43
- });
44
- marker1.setMap(map);
45
- // Create the search box and link it to the UI element.
46
- var input = document.getElementById(input);
47
- var searchBox = new google.maps.places.SearchBox(input);
48
- map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
49
-
50
- // Bias the SearchBox results towards current map's viewport.
51
- map.addListener('bounds_changed', function () {
52
- searchBox.setBounds(map.getBounds());
53
- });
54
-
55
- var markers = [];
56
- // Listen for the event fired when the user selects a prediction and retrieve
57
- // more details for that place.
58
- searchBox.addListener('places_changed', function () {
59
- marker1.setMap(null);
60
- console.log(marker1);
61
- var places = searchBox.getPlaces();
62
-
63
- if (places.length == 0) {
64
- return;
65
- }
66
- marker1.setMap(null);
67
- // Clear out the old markers.
68
- markers.forEach(function (marker) {
69
- marker.setMap(null);
70
- });
71
- markers = [];
72
-
73
- // For each place, get the icon, name and location.
74
- var bounds = new google.maps.LatLngBounds();
75
- places.forEach(function (place) {
76
- if (!place.geometry) {
77
- console.log("Returned place contains no geometry");
78
- return;
79
- }
80
- // Create a marker for each place.
81
- markers.push(new google.maps.Marker({
82
- map: map,
83
- title: place.name,
84
- draggable: true,
85
- position: place.geometry.location
86
- }));
87
-
88
- document.getElementById("wpgmap_latlng").value = place.geometry.location.lat() + "," + place.geometry.location.lng();
89
- wpgmapSetAddressByLatLng(place.geometry.location.lat(), place.geometry.location.lng());
90
-
91
- if (place.geometry.viewport) {
92
- // Only geocodes have viewport.
93
- bounds.union(place.geometry.viewport);
94
- } else {
95
- bounds.extend(place.geometry.location);
96
- }
97
- });
98
- map.fitBounds(bounds);
99
- markers[0].addListener('dragend', function (markerLocation) {
100
- document.getElementById("wpgmap_latlng").value = markerLocation.latLng.lat() + "," + markerLocation.latLng.lng();
101
- wpgmapSetAddressByLatLng(markerLocation.latLng.lat(), markerLocation.latLng.lng());
102
- });
103
-
104
- });
105
-
106
  }
1
+ function wpgmapSetAddressByLatLng(lat, lng, id) {
2
+ jQuery.getJSON('https://maps.googleapis.com/maps/api/geocode/json?latlng=' + lat + ',' + lng + '&sensor=true')
3
+ .done(function (location) {
4
+
5
+ document.getElementById('wpgmap_map_address').value = location.results[0].formatted_address;
6
+
7
+ });
8
+
9
+ }
10
+ var map;
11
+ var marker1;
12
+ // to render Google Map
13
+ function initAutocomplete(id, input, center_lat, center_lng, map_type, zoom) {
14
+ if (typeof map == 'object') {
15
+ map.setCenter({lat: center_lat, lng: center_lng});
16
+ marker1 = new google.maps.Marker({
17
+ position: new google.maps.LatLng(center_lat, center_lng),
18
+ title: "",
19
+ draggable: true,
20
+ animation: google.maps.Animation.DROP
21
+ });
22
+ marker1.setMap(map);
23
+ marker1.addListener('dragend', function (markerLocation) {
24
+ document.getElementById("wpgmap_latlng").value = markerLocation.latLng.lat() + "," + markerLocation.latLng.lng();
25
+ wpgmapSetAddressByLatLng(markerLocation.latLng.lat(), markerLocation.latLng.lng());
26
+ });
27
+ return;
28
+ }
29
+ document.getElementById("wpgmap_latlng").value = center_lat + "," + center_lng;
30
+
31
+ wpgmapSetAddressByLatLng(center_lat, center_lng);
32
+
33
+ map = new google.maps.Map(document.getElementById(id), {
34
+ center: {lat: center_lat, lng: center_lng},
35
+ zoom: zoom,
36
+ mapTypeId: map_type
37
+ });
38
+ marker1 = new google.maps.Marker({
39
+ position: new google.maps.LatLng(center_lat, center_lng),
40
+ title: "",
41
+ draggable: true,
42
+ animation: google.maps.Animation.DROP
43
+ });
44
+ marker1.setMap(map);
45
+ // Create the search box and link it to the UI element.
46
+ var input = document.getElementById(input);
47
+ var searchBox = new google.maps.places.SearchBox(input);
48
+ map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
49
+
50
+ // Bias the SearchBox results towards current map's viewport.
51
+ map.addListener('bounds_changed', function () {
52
+ searchBox.setBounds(map.getBounds());
53
+ });
54
+
55
+ var markers = [];
56
+ // Listen for the event fired when the user selects a prediction and retrieve
57
+ // more details for that place.
58
+ searchBox.addListener('places_changed', function () {
59
+ marker1.setMap(null);
60
+ console.log(marker1);
61
+ var places = searchBox.getPlaces();
62
+
63
+ if (places.length == 0) {
64
+ return;
65
+ }
66
+ marker1.setMap(null);
67
+ // Clear out the old markers.
68
+ markers.forEach(function (marker) {
69
+ marker.setMap(null);
70
+ });
71
+ markers = [];
72
+
73
+ // For each place, get the icon, name and location.
74
+ var bounds = new google.maps.LatLngBounds();
75
+ places.forEach(function (place) {
76
+ if (!place.geometry) {
77
+ console.log("Returned place contains no geometry");
78
+ return;
79
+ }
80
+ // Create a marker for each place.
81
+ markers.push(new google.maps.Marker({
82
+ map: map,
83
+ title: place.name,
84
+ draggable: true,
85
+ position: place.geometry.location
86
+ }));
87
+
88
+ document.getElementById("wpgmap_latlng").value = place.geometry.location.lat() + "," + place.geometry.location.lng();
89
+ wpgmapSetAddressByLatLng(place.geometry.location.lat(), place.geometry.location.lng());
90
+
91
+ if (place.geometry.viewport) {
92
+ // Only geocodes have viewport.
93
+ bounds.union(place.geometry.viewport);
94
+ } else {
95
+ bounds.extend(place.geometry.location);
96
+ }
97
+ });
98
+ map.fitBounds(bounds);
99
+ markers[0].addListener('dragend', function (markerLocation) {
100
+ document.getElementById("wpgmap_latlng").value = markerLocation.latLng.lat() + "," + markerLocation.latLng.lng();
101
+ wpgmapSetAddressByLatLng(markerLocation.latLng.lat(), markerLocation.latLng.lng());
102
+ });
103
+
104
+ });
105
+
106
  }
includes/gmap.php CHANGED
@@ -1,144 +1,145 @@
1
- <?php
2
- if (!defined('ABSPATH')) exit;
3
- if (isset($_GET['page'])) {
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
- $wpgmap_page = esc_html($_GET['page']);
17
- $wpgmap_tag = '';
18
- if (isset($_GET['tag'])) {
19
- $wpgmap_tag = esc_html($_GET['tag']);
20
- }
21
- ?>
22
- <div class="wrap">
23
- <script type="text/javascript"
24
- src="<?php echo esc_url(plugins_url("../assets/js/srm_gmap_loader.js", __FILE__)); ?>"></script>
25
- <div id="gmap_container_inner">
26
- <!--modal contents-->
27
- <div class="error">
28
- <p style="font-size:17px;"><strong><?php _e('Notice: If it seems Direction option is not working properly, Please take api key again from settings tab.','gmap-embed');?></strong></p>
29
- </div>
30
- <ul id="wp-gmap-nav">
31
- <li class="<?php echo ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == '') ? 'active' : ''; ?>">
32
- <a href="<?php echo admin_url(); ?>admin.php?page=wpgmapembed" data-id="wp-gmap-all"
33
- class="media-menu-item"><?php _e('All Maps','gmap-embed');?></a>
34
- </li>
35
- <li class="<?php echo $wpgmap_tag == 'new' ? 'active' : ''; ?>">
36
- <a href="<?php echo esc_url(admin_url() . 'admin.php?page=wpgmapembed&tag=new'); ?>"
37
- data-id="wp-gmap-new"
38
- class="media-menu-item"><?php _e('Create New Map','gmap-embed');?></a>
39
- </li>
40
- <li class="<?php echo $wpgmap_tag == 'settings' ? 'active' : ''; ?>">
41
- <a href="<?php echo esc_url(admin_url() . 'admin.php?page=wpgmapembed&tag=settings'); ?>"
42
- data-id="wp-gmap-settings"
43
- class="media-menu-item"><?php _e('Settings','gmap-embed');?></a>
44
- </li>
45
- <li>
46
- <a target="_blank" href="https://www.youtube.com/watch?v=Lak-tJjGjl8" class="media-menu-item">
47
- <?php _e('Need Help ?','gmap-embed');?></a>
48
- </li>
49
- <span class="spinner" style="margin-right: 20px !important;float:right"></span>
50
- </ul>
51
-
52
- <div id="wp-gmap-tabs">
53
- <?php
54
- if (isset($_GET['message'])) {
55
- ?>
56
- <div class="message">
57
- <div id="setting-error-settings_updated" class="updated settings-error notice is-dismissible">
58
- <p>
59
- <strong>
60
- <?php
61
- $message_status = $_GET['message'];
62
- switch ($message_status) {
63
- case 1:
64
- echo __('Map has been created Successfully.','gmap-embed');
65
- break;
66
- case 2:
67
- echo __('Map Updated Successfully.','gmap-embed');
68
- break;
69
- case 3:
70
- echo __('Settings updated Successfully.','gmap-embed');
71
- break;
72
- case -1:
73
- echo __('Map Deleted Successfully.','gmap-embed');
74
- break;
75
- }
76
- ?>
77
- </strong>
78
- </p>
79
- <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span>
80
- </button>
81
- </div>
82
- </div>
83
- <?php
84
- }
85
- ?>
86
- <?php
87
- if (get_option('wpgmap_api_key') == false) {
88
- require_once(plugin_dir_path(__FILE__) . '/wpgmap_settings.php');
89
- }
90
- ?>
91
- <!---------------------------Maps List-------------->
92
- <?php
93
- if ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == '') {
94
- ?>
95
- <div class="wp-gmap-tab-content active" id="wp-gmap-all">
96
- <?php
97
- require_once(plugin_dir_path(__FILE__) . '/wpgmap_list.php');
98
- ?>
99
- </div>
100
- <?php
101
- }
102
- ?>
103
- <!---------------------------Create New Map-------------->
104
-
105
- <div
106
- class="wp-gmap-tab-content <?php echo ($_GET['page'] == 'wpgmapembed' && $_GET['tag'] == 'new') ? 'active' : ''; ?>"
107
- id="wp-gmap-new">
108
- <?php
109
- if ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'new') {
110
- require_once(plugin_dir_path(__FILE__) . '/wpgmap_create.php');
111
- }
112
- ?>
113
- </div>
114
-
115
- <!---------------------------Existing map update-------------->
116
-
117
- <div
118
- class="wp-gmap-tab-content <?php echo ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'edit') ? 'active' : ''; ?>"
119
- id="wp-gmap-edit">
120
- <?php
121
- if ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'edit') {
122
- require_once(plugin_dir_path(__FILE__) . '/wpgmap_edit.php');
123
- }
124
- ?>
125
- </div>
126
-
127
- <!---------------------------Plugin Settings-------------->
128
-
129
- <div
130
- class="wp-gmap-tab-content <?php echo ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'settings') ? 'active' : ''; ?>"
131
- id="wp-gmap-settings">
132
- <?php
133
- if ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'settings') {
134
- require_once(plugin_dir_path(__FILE__) . '/wpgmap_settings.php');
135
- }
136
- ?>
137
- </div>
138
-
139
- </div>
140
- </div>
141
- </div>
142
- <?php
143
- }
 
144
  ?>
1
+ <?php
2
+ if (!defined('ABSPATH')) exit;
3
+ if (isset($_GET['page'])) {
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
+ $wpgmap_page = esc_html($_GET['page']);
17
+ $wpgmap_tag = '';
18
+ if (isset($_GET['tag'])) {
19
+ $wpgmap_tag = esc_html($_GET['tag']);
20
+ }
21
+ ?>
22
+ <div class="wrap">
23
+ <script type="text/javascript"
24
+ src="<?php echo esc_url(plugins_url("../assets/js/srm_gmap_loader.js", __FILE__)); ?>"></script>
25
+ <div id="gmap_container_inner">
26
+ <!--modal contents-->
27
+
28
+ <ul id="wp-gmap-nav">
29
+ <li class="<?php echo ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == '') ? 'active' : ''; ?>">
30
+ <a href="<?php echo admin_url(); ?>admin.php?page=wpgmapembed" data-id="wp-gmap-all"
31
+ class="media-menu-item"><?php _e('All Maps','gmap-embed');?></a>
32
+ </li>
33
+ <li class="<?php echo $wpgmap_tag == 'new' ? 'active' : ''; ?>">
34
+ <a href="<?php echo esc_url(admin_url() . 'admin.php?page=wpgmapembed&tag=new'); ?>"
35
+ data-id="wp-gmap-new"
36
+ class="media-menu-item"><?php _e('Create New Map','gmap-embed');?></a>
37
+ </li>
38
+ <li class="<?php echo $wpgmap_tag == 'settings' ? 'active' : ''; ?>">
39
+ <a href="<?php echo esc_url(admin_url() . 'admin.php?page=wpgmapembed&tag=settings'); ?>"
40
+ data-id="wp-gmap-settings"
41
+ class="media-menu-item"><?php _e('Settings','gmap-embed');?></a>
42
+ </li>
43
+ <li>
44
+ <a target="_blank" href="https://www.youtube.com/watch?v=Lak-tJjGjl8" class="media-menu-item">
45
+ <?php _e('Need Help ?','gmap-embed');?></a>
46
+ </li>
47
+ <span class="spinner" style="margin-right: 20px !important;float:right"></span>
48
+
49
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVPQNC6CJ6T4Q"><img alt="Donate" src="<?php echo esc_url(plugins_url("../assets/images/paypal.png", __FILE__)); ?>" width="150"/></a>
50
+
51
+ </ul>
52
+
53
+ <div id="wp-gmap-tabs">
54
+ <?php
55
+ if (isset($_GET['message'])) {
56
+ ?>
57
+ <div class="message">
58
+ <div id="setting-error-settings_updated" class="updated settings-error notice is-dismissible">
59
+ <p>
60
+ <strong>
61
+ <?php
62
+ $message_status = $_GET['message'];
63
+ switch ($message_status) {
64
+ case 1:
65
+ echo __('Map has been created Successfully.','gmap-embed');
66
+ break;
67
+ case 2:
68
+ echo __('Map Updated Successfully.','gmap-embed');
69
+ break;
70
+ case 3:
71
+ echo __('Settings updated Successfully.','gmap-embed');
72
+ break;
73
+ case -1:
74
+ echo __('Map Deleted Successfully.','gmap-embed');
75
+ break;
76
+ }
77
+ ?>
78
+ </strong>
79
+ </p>
80
+ <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span>
81
+ </button>
82
+ </div>
83
+ </div>
84
+ <?php
85
+ }
86
+ ?>
87
+ <?php
88
+ if (get_option('wpgmap_api_key') == false) {
89
+ require_once(plugin_dir_path(__FILE__) . '/wpgmap_settings.php');
90
+ }
91
+ ?>
92
+ <!---------------------------Maps List-------------->
93
+ <?php
94
+ if ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == '') {
95
+ ?>
96
+ <div class="wp-gmap-tab-content active" id="wp-gmap-all">
97
+ <?php
98
+ require_once(plugin_dir_path(__FILE__) . '/wpgmap_list.php');
99
+ ?>
100
+ </div>
101
+ <?php
102
+ }
103
+ ?>
104
+ <!---------------------------Create New Map-------------->
105
+
106
+ <div
107
+ class="wp-gmap-tab-content <?php echo ($_GET['page'] == 'wpgmapembed' && $_GET['tag'] == 'new') ? 'active' : ''; ?>"
108
+ id="wp-gmap-new">
109
+ <?php
110
+ if ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'new') {
111
+ require_once(plugin_dir_path(__FILE__) . '/wpgmap_create.php');
112
+ }
113
+ ?>
114
+ </div>
115
+
116
+ <!---------------------------Existing map update-------------->
117
+
118
+ <div
119
+ class="wp-gmap-tab-content <?php echo ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'edit') ? 'active' : ''; ?>"
120
+ id="wp-gmap-edit">
121
+ <?php
122
+ if ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'edit') {
123
+ require_once(plugin_dir_path(__FILE__) . '/wpgmap_edit.php');
124
+ }
125
+ ?>
126
+ </div>
127
+
128
+ <!---------------------------Plugin Settings-------------->
129
+
130
+ <div
131
+ class="wp-gmap-tab-content <?php echo ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'settings') ? 'active' : ''; ?>"
132
+ id="wp-gmap-settings">
133
+ <?php
134
+ if ($wpgmap_page == 'wpgmapembed' && $wpgmap_tag == 'settings') {
135
+ require_once(plugin_dir_path(__FILE__) . '/wpgmap_settings.php');
136
+ }
137
+ ?>
138
+ </div>
139
+
140
+ </div>
141
+ </div>
142
+ </div>
143
+ <?php
144
+ }
145
  ?>
includes/widget.php CHANGED
@@ -1,77 +1,77 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit;
3
- /**
4
- * Creating widget for Google Map SRM
5
- */
6
- class srmgmap_widget extends WP_Widget
7
- {
8
-
9
- public $base_id = 'srmgmap_widget'; //widget id
10
- public $widget_name = 'Google Map SRM'; //widget name
11
- public $widget_options = array(
12
- 'description' => 'Google Map SRM' //widget description
13
- );
14
-
15
- public function __construct()
16
- {
17
- parent::__construct(
18
- $this->base_id,
19
- $this->widget_name,
20
- $this->widget_options
21
- );
22
-
23
- add_action( 'widgets_init', function() { register_widget( 'srmgmap_widget' ); });
24
- }
25
-
26
- // Map display in front
27
- public function widget( $args, $instance )
28
- {
29
- $title = apply_filters( 'widget_title', $instance['title'] );
30
-
31
- extract( $args );
32
- extract( $instance );
33
- echo $before_widget;
34
- if ( ! empty( $title ) ) {
35
- echo $before_title . $title . $after_title;
36
- }
37
- echo do_shortcode( $instance['srmgmap_shortcode'] );
38
- echo $after_widget;
39
- }
40
-
41
- /**
42
- * Google Map Widget
43
- * @return String $instance
44
- */
45
- public function form( $instance )
46
- {
47
- $title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( '', 'text_domain' );
48
- $text = ! empty( $instance['srmgmap_shortcode'] ) ? $instance['srmgmap_shortcode'] : esc_html__( '', 'text_domain' );
49
- ?>
50
- <p>
51
- <label for="<?php echo $this->get_field_id( 'title' ); ?>">Title: </label>
52
- </p>
53
- <p>
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' ); ?>"> Enter Google Map Shortcode:</label>
58
- </p>
59
- <p>
60
- <input id="<?php echo $this->get_field_id( 'srmgmap_shortcode' ); ?>"
61
- name="<?php echo $this->get_field_name( 'srmgmap_shortcode' ); ?>"
62
- value='<?php echo esc_attr( esc_html( isset( $instance['srmgmap_shortcode'] ) ? $instance['srmgmap_shortcode']:'') ); ?>' type="text" class="widefat">
63
- </p>
64
-
65
- <?php
66
- }
67
-
68
- public function update( $new_instance, $old_instance ) {
69
- $instance = array();
70
- $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
71
- $instance['srmgmap_shortcode'] = ( ! empty( $new_instance['srmgmap_shortcode'] ) ) ? $new_instance['srmgmap_shortcode'] : '';
72
- return $instance;
73
- }
74
-
75
- }
76
-
77
  $srmgmap = new srmgmap_widget();
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit;
3
+ /**
4
+ * Creating widget for Google Map SRM
5
+ */
6
+ class srmgmap_widget extends WP_Widget
7
+ {
8
+
9
+ public $base_id = 'srmgmap_widget'; //widget id
10
+ public $widget_name = 'Google Map SRM'; //widget name
11
+ public $widget_options = array(
12
+ 'description' => 'Google Map SRM' //widget description
13
+ );
14
+
15
+ public function __construct()
16
+ {
17
+ parent::__construct(
18
+ $this->base_id,
19
+ $this->widget_name,
20
+ $this->widget_options
21
+ );
22
+
23
+ add_action( 'widgets_init', function() { register_widget( 'srmgmap_widget' ); });
24
+ }
25
+
26
+ // Map display in front
27
+ public function widget( $args, $instance )
28
+ {
29
+ $title = apply_filters( 'widget_title', $instance['title'] );
30
+
31
+ extract( $args );
32
+ extract( $instance );
33
+ echo $before_widget;
34
+ if ( ! empty( $title ) ) {
35
+ echo $before_title . $title . $after_title;
36
+ }
37
+ echo do_shortcode( $instance['srmgmap_shortcode'] );
38
+ echo $after_widget;
39
+ }
40
+
41
+ /**
42
+ * Google Map Widget
43
+ * @return String $instance
44
+ */
45
+ public function form( $instance )
46
+ {
47
+ $title = ! empty( $instance['title'] ) ? $instance['title'] : esc_html__( '', 'text_domain' );
48
+ $text = ! empty( $instance['srmgmap_shortcode'] ) ? $instance['srmgmap_shortcode'] : esc_html__( '', 'text_domain' );
49
+ ?>
50
+ <p>
51
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>">Title: </label>
52
+ </p>
53
+ <p>
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' ); ?>"> Enter Google Map Shortcode:</label>
58
+ </p>
59
+ <p>
60
+ <input id="<?php echo $this->get_field_id( 'srmgmap_shortcode' ); ?>"
61
+ name="<?php echo $this->get_field_name( 'srmgmap_shortcode' ); ?>"
62
+ value='<?php echo esc_attr( esc_html( isset( $instance['srmgmap_shortcode'] ) ? $instance['srmgmap_shortcode']:'') ); ?>' type="text" class="widefat">
63
+ </p>
64
+
65
+ <?php
66
+ }
67
+
68
+ public function update( $new_instance, $old_instance ) {
69
+ $instance = array();
70
+ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
71
+ $instance['srmgmap_shortcode'] = ( ! empty( $new_instance['srmgmap_shortcode'] ) ) ? $new_instance['srmgmap_shortcode'] : '';
72
+ return $instance;
73
+ }
74
+
75
+ }
76
+
77
  $srmgmap = new srmgmap_widget();
includes/wpgmap_create.php CHANGED
@@ -1,128 +1,128 @@
1
- <?php if (!defined('ABSPATH')) exit; ?>
2
- <div data-columns="8">
3
-
4
- <span class="wpgmap_msg_error" style="width:80%;">
5
- <!--validation error will goes here-->
6
- </span>
7
-
8
- <!-- google map properties -->
9
- <div class="wp-gmap-properties">
10
- <table class="gmap_properties">
11
- <tr>
12
- <td>
13
- <label for="wpgmap_title"><b><?php _e('Map Title','gmap-embed');?></b></label><br/>
14
- <input id="wpgmap_title" name="wpgmap_title" value="" type="text"
15
- class="regular-text">
16
- <br/>
17
-
18
- <input type="checkbox" value="1" name="wpgmap_show_heading"
19
- id="wpgmap_show_heading">
20
- <label for="wpgmap_show_heading"><?php _e('Show as map title','gmap-embed');?></label>
21
- </td>
22
- </tr>
23
- <tr>
24
- <td>
25
- <label for="wpgmap_latlng"><b><?php _e('Latitude, Longitude','gmap-embed');?></b></label><br/>
26
- <input id="wpgmap_latlng" name="wpgmap_latlng" value="" type="text"
27
- class="regular-text">
28
- </td>
29
- </tr>
30
- <tr>
31
- <td>
32
- <label for="wpgmap_heading_class"><b><?php _e('Heading Custom Class','gmap-embed');?> <span style="color:gray;">(if any)</span></b></label><br/>
33
- <input id="wpgmap_heading_class" name="wpgmap_heading_class" value="" type="text"
34
- class="regular-text">
35
- </td>
36
- </tr>
37
-
38
- <tr>
39
- <td>
40
- <label for="wpgmap_map_zoom"><b><?php _e('Zoom','gmap-embed');?></b></label><br/>
41
- <input id="wpgmap_map_zoom" name="wpgmap_map_zoom" value="13" type="text"
42
- class="regular-text">
43
- <br/>
44
-
45
- <label for="wpgmap_disable_zoom_scroll"><input type="checkbox" value="1"
46
- name="wpgmap_disable_zoom_scroll"
47
- id="wpgmap_disable_zoom_scroll">
48
- <?php _e('Disable zoom on mouse scroll','gmap-embed');?>
49
- </label>
50
- </td>
51
- </tr>
52
-
53
- <tr>
54
- <td>
55
- <label for="wpgmap_map_width"><b><?php _e('Width (%)','gmap-embed');?></b></label><br/>
56
- <input id="wpgmap_map_width" name="wpgmap_map_width" value="100%"
57
- type="text" class="regular-text">
58
- </td>
59
- </tr>
60
-
61
- <tr>
62
- <td>
63
- <label for="wpgmap_map_height"><b><?php _e('Height (px)','gmap-embed');?></b></label><br/>
64
- <input id="wpgmap_map_height" name="wpgmap_map_height" value="300px"
65
- type="text" class="regular-text">
66
- </td>
67
- </tr>
68
-
69
- <tr>
70
- <td>
71
- <label for="wpgmap_map_type"><b><?php _e('Map Type','gmap-embed');?></b></label><br/>
72
- <select id="wpgmap_map_type" class="regular-text" style="width:25em;">
73
- <option>ROADMAP</option>
74
- <option>SATELLITE</option>
75
- <option>HYBRID</option>
76
- <option>TERRAIN</option>
77
- </select>
78
- </td>
79
- </tr>
80
-
81
- <tr>
82
- <td>
83
- <label for="wpgmap_map_address"><b><?php _e('Location Address','gmap-embed');?></b></label><br/>
84
- <input type="text" id="wpgmap_map_address" style="width:25em;"
85
- name="wpgmap_map_address" class="regular-text">
86
-
87
- <br/>
88
-
89
- <label for="wpgmap_show_infowindow"><input type="checkbox" value="1"
90
- name="wpgmap_show_infowindow"
91
- id="wpgmap_show_infowindow">
92
- <?php _e('Show in marker infowindow','gmap-embed');?>
93
- </label>
94
-
95
- <br/>
96
-
97
- <label for="wpgmap_enable_direction"><input type="checkbox" value="1"
98
- name="wpgmap_enable_direction"
99
- id="wpgmap_enable_direction">
100
- <?php _e('Enable Direction in Map','gmap-embed');?>
101
- </label>
102
-
103
-
104
- </td>
105
- </tr>
106
-
107
- </table>
108
- </div>
109
-
110
-
111
- <div class="wp-gmap-preview">
112
- <input id="pac-input" class="controls" type="text" placeholder="<?php _e('Search by Address, Zip Code','gmap-embed');?>"/>
113
- <div id="map" style="height: 415px;"></div>
114
- </div>
115
-
116
- <script type="text/javascript"
117
- src="<?php echo esc_url(plugins_url("../assets/js/geo_based_map.js", __FILE__)); ?>"></script>
118
- </div>
119
-
120
- <div class="media-frame-toolbar">
121
- <div class="media-toolbar">
122
- <div class="media-toolbar-secondary"
123
- style="text-align: right;float: right;margin-top:10px;">
124
- <span class="spinner" style="margin: 0px !important;float:left;"></span>
125
- <button class="button button-primary" id="wp-gmap-embed-save"><?php _e('Save','gmap-embed');?></button>
126
- </div>
127
- </div>
128
  </div>
1
+ <?php if (!defined('ABSPATH')) exit; ?>
2
+ <div data-columns="8">
3
+
4
+ <span class="wpgmap_msg_error" style="width:80%;">
5
+ <!--validation error will goes here-->
6
+ </span>
7
+
8
+ <!-- google map properties -->
9
+ <div class="wp-gmap-properties">
10
+ <table class="gmap_properties">
11
+ <tr>
12
+ <td>
13
+ <label for="wpgmap_title"><b><?php _e('Map Title','gmap-embed');?></b></label><br/>
14
+ <input id="wpgmap_title" name="wpgmap_title" value="" type="text"
15
+ class="regular-text">
16
+ <br/>
17
+
18
+ <input type="checkbox" value="1" name="wpgmap_show_heading"
19
+ id="wpgmap_show_heading">
20
+ <label for="wpgmap_show_heading"><?php _e('Show as map title','gmap-embed');?></label>
21
+ </td>
22
+ </tr>
23
+ <tr>
24
+ <td>
25
+ <label for="wpgmap_latlng"><b><?php _e('Latitude, Longitude','gmap-embed');?></b></label><br/>
26
+ <input id="wpgmap_latlng" name="wpgmap_latlng" value="" type="text"
27
+ class="regular-text">
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <td>
32
+ <label for="wpgmap_heading_class"><b><?php _e('Heading Custom Class','gmap-embed');?> <span style="color:gray;">(if any)</span></b></label><br/>
33
+ <input id="wpgmap_heading_class" name="wpgmap_heading_class" value="" type="text"
34
+ class="regular-text">
35
+ </td>
36
+ </tr>
37
+
38
+ <tr>
39
+ <td>
40
+ <label for="wpgmap_map_zoom"><b><?php _e('Zoom','gmap-embed');?></b></label><br/>
41
+ <input id="wpgmap_map_zoom" name="wpgmap_map_zoom" value="13" type="text"
42
+ class="regular-text">
43
+ <br/>
44
+
45
+ <label for="wpgmap_disable_zoom_scroll"><input type="checkbox" value="1"
46
+ name="wpgmap_disable_zoom_scroll"
47
+ id="wpgmap_disable_zoom_scroll">
48
+ <?php _e('Disable zoom on mouse scroll','gmap-embed');?>
49
+ </label>
50
+ </td>
51
+ </tr>
52
+
53
+ <tr>
54
+ <td>
55
+ <label for="wpgmap_map_width"><b><?php _e('Width (%)','gmap-embed');?></b></label><br/>
56
+ <input id="wpgmap_map_width" name="wpgmap_map_width" value="100%"
57
+ type="text" class="regular-text">
58
+ </td>
59
+ </tr>
60
+
61
+ <tr>
62
+ <td>
63
+ <label for="wpgmap_map_height"><b><?php _e('Height (px)','gmap-embed');?></b></label><br/>
64
+ <input id="wpgmap_map_height" name="wpgmap_map_height" value="300px"
65
+ type="text" class="regular-text">
66
+ </td>
67
+ </tr>
68
+
69
+ <tr>
70
+ <td>
71
+ <label for="wpgmap_map_type"><b><?php _e('Map Type','gmap-embed');?></b></label><br/>
72
+ <select id="wpgmap_map_type" class="regular-text" style="width:25em;">
73
+ <option>ROADMAP</option>
74
+ <option>SATELLITE</option>
75
+ <option>HYBRID</option>
76
+ <option>TERRAIN</option>
77
+ </select>
78
+ </td>
79
+ </tr>
80
+
81
+ <tr>
82
+ <td>
83
+ <label for="wpgmap_map_address"><b><?php _e('Location Address','gmap-embed');?></b></label><br/>
84
+ <input type="text" id="wpgmap_map_address" style="width:25em;"
85
+ name="wpgmap_map_address" class="regular-text">
86
+
87
+ <br/>
88
+
89
+ <label for="wpgmap_show_infowindow"><input type="checkbox" value="1"
90
+ name="wpgmap_show_infowindow"
91
+ id="wpgmap_show_infowindow">
92
+ <?php _e('Show in marker infowindow','gmap-embed');?>
93
+ </label>
94
+
95
+ <br/>
96
+
97
+ <label for="wpgmap_enable_direction"><input type="checkbox" value="1"
98
+ name="wpgmap_enable_direction"
99
+ id="wpgmap_enable_direction">
100
+ <?php _e('Enable Direction in Map','gmap-embed');?>
101
+ </label>
102
+
103
+
104
+ </td>
105
+ </tr>
106
+
107
+ </table>
108
+ </div>
109
+
110
+
111
+ <div class="wp-gmap-preview">
112
+ <input id="pac-input" class="controls" type="text" placeholder="<?php _e('Search by Address, Zip Code','gmap-embed');?>"/>
113
+ <div id="map" style="height: 415px;"></div>
114
+ </div>
115
+
116
+ <script type="text/javascript"
117
+ src="<?php echo esc_url(plugins_url("../assets/js/geo_based_map.js", __FILE__)); ?>"></script>
118
+ </div>
119
+
120
+ <div class="media-frame-toolbar">
121
+ <div class="media-toolbar">
122
+ <div class="media-toolbar-secondary"
123
+ style="text-align: right;float: right;margin-top:10px;">
124
+ <span class="spinner" style="margin: 0px !important;float:left;"></span>
125
+ <button class="button button-primary" id="wp-gmap-embed-save"><?php _e('Save','gmap-embed');?></button>
126
+ </div>
127
+ </div>
128
  </div>
includes/wpgmap_edit.php CHANGED
@@ -1,148 +1,148 @@
1
- <?php
2
- if (!defined('ABSPATH')) exit;
3
- $gmap_data = $this->get_wpgmapembed_data(intval($_GET['id']));
4
- $wpgmap_single = json_decode($gmap_data);
5
- list($wpgmap_lat, $wpgmap_lng) = explode(',', esc_html($wpgmap_single->wpgmap_latlng));
6
- ?>
7
- <div data-columns="8">
8
- <!-- getting hidden id-->
9
- <input id="wpgmap_map_id" name="wpgmap_map_id" value="<?php echo intval($_GET['id']); ?>" type="hidden"/>
10
-
11
- <span class="wpgmap_msg_error" style="width:80%;">
12
- <!-- error will goes here-->
13
- </span>
14
-
15
- <div class="wp-gmap-properties">
16
- <table style="width: 100% !important;" class="gmap_properties">
17
- <tr>
18
- <td>
19
- <label for="wpgmap_title"><b><?php _e('Map Title','gmap-embed');?></b></label><br/>
20
- <input id="wpgmap_title" name="wpgmap_title" value="<?php echo esc_attr($wpgmap_single->wpgmap_title); ?>"
21
- type="text"
22
- class="regular-text">
23
- <br/>
24
-
25
- <input type="checkbox" value="1" name="wpgmap_show_heading"
26
- id="wpgmap_show_heading" <?php echo ($wpgmap_single->wpgmap_show_heading == 1) ? 'checked' : ''; ?>>
27
- <label for="wpgmap_show_heading"><?php _e('Show as map title','gmap-embed');?></label>
28
- </td>
29
- </tr>
30
- <tr>
31
- <td>
32
- <label for="wpgmap_heading_class"><b><?php _e('Heading Custom Class','gmap-embed');?></b></label><br/>
33
- <input id="wpgmap_heading_class" name="wpgmap_heading_class" value="<?php echo $wpgmap_single->wpgmap_heading_class;?>" type="text"
34
- class="regular-text">
35
- </td>
36
- </tr>
37
- <tr>
38
- <td>
39
- <label for="wpgmap_latlng"><b><?php _e('Latitude, Longitude','gmap-embed');?></b></label><br/>
40
- <input id="wpgmap_latlng" name="wpgmap_latlng" value="<?php echo esc_attr($wpgmap_single->wpgmap_latlng); ?>"
41
- type="text"
42
- class="regular-text">
43
- </td>
44
- </tr>
45
-
46
- <tr>
47
- <td>
48
- <label for="wpgmap_map_zoom"><b><?php _e('Zoom','gmap-embed');?></b></label><br/>
49
- <input id="wpgmap_map_zoom" name="wpgmap_map_zoom"
50
- value="<?php echo esc_attr($wpgmap_single->wpgmap_map_zoom); ?>" type="text"
51
- class="regular-text">
52
-
53
- <label for="wpgmap_disable_zoom_scroll"><input type="checkbox" value="1"
54
- name="wpgmap_disable_zoom_scroll"
55
- id="wpgmap_disable_zoom_scroll" <?php echo ($wpgmap_single->wpgmap_disable_zoom_scroll == 1) ? 'checked' : ''; ?>>
56
- <?php _e('Disable zoom on mouse scroll','gmap-embed');?>
57
- </label>
58
-
59
- </td>
60
- </tr>
61
-
62
- <tr>
63
- <td>
64
- <label for="wpgmap_map_width"><b><?php _e('Width (%)','gmap-embed');?></b></label><br/>
65
- <input id="wpgmap_map_width" name="wpgmap_map_width"
66
- value="<?php echo esc_attr($wpgmap_single->wpgmap_map_width); ?>"
67
- type="text" class="regular-text">
68
- </td>
69
- </tr>
70
-
71
- <tr>
72
- <td>
73
- <label for="wpgmap_map_height"><b><?php _e('Height (px)','gmap-embed');?></b></label><br/>
74
- <input id="wpgmap_map_height" name="wpgmap_map_height"
75
- value="<?php echo esc_attr($wpgmap_single->wpgmap_map_height); ?>"
76
- type="text" class="regular-text">
77
- </td>
78
- </tr>
79
-
80
- <tr>
81
- <td>
82
- <label><b><?php _e('Map Type','gmap-embed');?></b></label><br/>
83
- <select id="wpgmap_map_type" class="regular-text" style="width:25em;">
84
- <option <?php echo $wpgmap_single->wpgmap_map_type == 'ROADMAP' ? 'selected' : ''; ?>>ROADMAP
85
- </option>
86
- <option <?php echo $wpgmap_single->wpgmap_map_type == 'SATELLITE' ? 'selected' : ''; ?>>
87
- SATELLITE
88
- </option>
89
- <option <?php echo $wpgmap_single->wpgmap_map_type == 'HYBRID' ? 'selected' : ''; ?>>HYBRID
90
- </option>
91
- <option <?php echo $wpgmap_single->wpgmap_map_type == 'TERRAIN' ? 'selected' : ''; ?>>TERRAIN
92
- </option>
93
- </select>
94
- </td>
95
- </tr>
96
-
97
- <tr>
98
- <td>
99
- <label for="wpgmap_map_address"><b><?php _e('Location Address','gmap-embed');?></b></label><br/>
100
- <textarea id="wpgmap_map_address" style="width:25em;" name="wpgmap_map_address" class="regular-text"
101
- rows="3"><?php echo esc_attr(trim($wpgmap_single->wpgmap_map_address)); ?></textarea>
102
-
103
- <br/>
104
-
105
- <label for="wpgmap_show_infowindow"><input type="checkbox" value="1"
106
- name="wpgmap_show_infowindow"
107
- id="wpgmap_show_infowindow" <?php echo ($wpgmap_single->wpgmap_show_infowindow == 1) ? 'checked' : ''; ?>>
108
- <?php _e('Show in marker infowindow','gmap-embed');?>
109
- </label>
110
-
111
- <br/>
112
-
113
- <label for="wpgmap_enable_direction"><input type="checkbox" value="1"
114
- name="wpgmap_enable_direction"
115
- id="wpgmap_enable_direction" <?php echo ($wpgmap_single->wpgmap_enable_direction == 1) ? 'checked' : ''; ?>>
116
- <?php _e('Enable Direction in Map','gmap-embed');?>
117
- </label>
118
- </td>
119
- </tr>
120
-
121
- </table>
122
- </div>
123
-
124
- <div class="wp-gmap-preview">
125
- <input id="pac-input" class="controls" type="text" placeholder="<?php _e('Search by Address, Zip Code','gmap-embed');?>"/>
126
- <div id="map" style="height: 415px;"></div>
127
- </div>
128
- <script>
129
- (function ($) {
130
- $(function () {
131
- google.maps.event.addDomListener(window, 'load',
132
- initAutocomplete('map', 'pac-input',<?php echo $wpgmap_lat;?>,<?php echo $wpgmap_lng;?>, 'roadmap',<?php echo $wpgmap_single->wpgmap_map_zoom;?>)
133
- );
134
- });
135
- })(jQuery);
136
- </script>
137
-
138
- </div>
139
-
140
- <div class="media-frame-toolbar">
141
- <div class="media-toolbar">
142
- <div class="media-toolbar-secondary"
143
- style="text-align: right;float: right;margin-top:10px;">
144
- <span class="spinner" style="margin: 0px !important;float:left;"></span>
145
- <button class="button button-primary" id="wp-gmap-embed-update"><?php _e('Update','gmap-embed');?></button>
146
- </div>
147
- </div>
148
  </div>
1
+ <?php
2
+ if (!defined('ABSPATH')) exit;
3
+ $gmap_data = $this->get_wpgmapembed_data(intval($_GET['id']));
4
+ $wpgmap_single = json_decode($gmap_data);
5
+ list($wpgmap_lat, $wpgmap_lng) = explode(',', esc_html($wpgmap_single->wpgmap_latlng));
6
+ ?>
7
+ <div data-columns="8">
8
+ <!-- getting hidden id-->
9
+ <input id="wpgmap_map_id" name="wpgmap_map_id" value="<?php echo intval($_GET['id']); ?>" type="hidden"/>
10
+
11
+ <span class="wpgmap_msg_error" style="width:80%;">
12
+ <!-- error will goes here-->
13
+ </span>
14
+
15
+ <div class="wp-gmap-properties">
16
+ <table style="width: 100% !important;" class="gmap_properties">
17
+ <tr>
18
+ <td>
19
+ <label for="wpgmap_title"><b><?php _e('Map Title','gmap-embed');?></b></label><br/>
20
+ <input id="wpgmap_title" name="wpgmap_title" value="<?php echo esc_attr($wpgmap_single->wpgmap_title); ?>"
21
+ type="text"
22
+ class="regular-text">
23
+ <br/>
24
+
25
+ <input type="checkbox" value="1" name="wpgmap_show_heading"
26
+ id="wpgmap_show_heading" <?php echo ($wpgmap_single->wpgmap_show_heading == 1) ? 'checked' : ''; ?>>
27
+ <label for="wpgmap_show_heading"><?php _e('Show as map title','gmap-embed');?></label>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <td>
32
+ <label for="wpgmap_heading_class"><b><?php _e('Heading Custom Class','gmap-embed');?></b></label><br/>
33
+ <input id="wpgmap_heading_class" name="wpgmap_heading_class" value="<?php echo $wpgmap_single->wpgmap_heading_class;?>" type="text"
34
+ class="regular-text">
35
+ </td>
36
+ </tr>
37
+ <tr>
38
+ <td>
39
+ <label for="wpgmap_latlng"><b><?php _e('Latitude, Longitude','gmap-embed');?></b></label><br/>
40
+ <input id="wpgmap_latlng" name="wpgmap_latlng" value="<?php echo esc_attr($wpgmap_single->wpgmap_latlng); ?>"
41
+ type="text"
42
+ class="regular-text">
43
+ </td>
44
+ </tr>
45
+
46
+ <tr>
47
+ <td>
48
+ <label for="wpgmap_map_zoom"><b><?php _e('Zoom','gmap-embed');?></b></label><br/>
49
+ <input id="wpgmap_map_zoom" name="wpgmap_map_zoom"
50
+ value="<?php echo esc_attr($wpgmap_single->wpgmap_map_zoom); ?>" type="text"
51
+ class="regular-text">
52
+
53
+ <label for="wpgmap_disable_zoom_scroll"><input type="checkbox" value="1"
54
+ name="wpgmap_disable_zoom_scroll"
55
+ id="wpgmap_disable_zoom_scroll" <?php echo ($wpgmap_single->wpgmap_disable_zoom_scroll == 1) ? 'checked' : ''; ?>>
56
+ <?php _e('Disable zoom on mouse scroll','gmap-embed');?>
57
+ </label>
58
+
59
+ </td>
60
+ </tr>
61
+
62
+ <tr>
63
+ <td>
64
+ <label for="wpgmap_map_width"><b><?php _e('Width (%)','gmap-embed');?></b></label><br/>
65
+ <input id="wpgmap_map_width" name="wpgmap_map_width"
66
+ value="<?php echo esc_attr($wpgmap_single->wpgmap_map_width); ?>"
67
+ type="text" class="regular-text">
68
+ </td>
69
+ </tr>
70
+
71
+ <tr>
72
+ <td>
73
+ <label for="wpgmap_map_height"><b><?php _e('Height (px)','gmap-embed');?></b></label><br/>
74
+ <input id="wpgmap_map_height" name="wpgmap_map_height"
75
+ value="<?php echo esc_attr($wpgmap_single->wpgmap_map_height); ?>"
76
+ type="text" class="regular-text">
77
+ </td>
78
+ </tr>
79
+
80
+ <tr>
81
+ <td>
82
+ <label><b><?php _e('Map Type','gmap-embed');?></b></label><br/>
83
+ <select id="wpgmap_map_type" class="regular-text" style="width:25em;">
84
+ <option <?php echo $wpgmap_single->wpgmap_map_type == 'ROADMAP' ? 'selected' : ''; ?>>ROADMAP
85
+ </option>
86
+ <option <?php echo $wpgmap_single->wpgmap_map_type == 'SATELLITE' ? 'selected' : ''; ?>>
87
+ SATELLITE
88
+ </option>
89
+ <option <?php echo $wpgmap_single->wpgmap_map_type == 'HYBRID' ? 'selected' : ''; ?>>HYBRID
90
+ </option>
91
+ <option <?php echo $wpgmap_single->wpgmap_map_type == 'TERRAIN' ? 'selected' : ''; ?>>TERRAIN
92
+ </option>
93
+ </select>
94
+ </td>
95
+ </tr>
96
+
97
+ <tr>
98
+ <td>
99
+ <label for="wpgmap_map_address"><b><?php _e('Location Address','gmap-embed');?></b></label><br/>
100
+ <textarea id="wpgmap_map_address" style="width:25em;" name="wpgmap_map_address" class="regular-text"
101
+ rows="3"><?php echo esc_attr(trim($wpgmap_single->wpgmap_map_address)); ?></textarea>
102
+
103
+ <br/>
104
+
105
+ <label for="wpgmap_show_infowindow"><input type="checkbox" value="1"
106
+ name="wpgmap_show_infowindow"
107
+ id="wpgmap_show_infowindow" <?php echo ($wpgmap_single->wpgmap_show_infowindow == 1) ? 'checked' : ''; ?>>
108
+ <?php _e('Show in marker infowindow','gmap-embed');?>
109
+ </label>
110
+
111
+ <br/>
112
+
113
+ <label for="wpgmap_enable_direction"><input type="checkbox" value="1"
114
+ name="wpgmap_enable_direction"
115
+ id="wpgmap_enable_direction" <?php echo ($wpgmap_single->wpgmap_enable_direction == 1) ? 'checked' : ''; ?>>
116
+ <?php _e('Enable Direction in Map','gmap-embed');?>
117
+ </label>
118
+ </td>
119
+ </tr>
120
+
121
+ </table>
122
+ </div>
123
+
124
+ <div class="wp-gmap-preview">
125
+ <input id="pac-input" class="controls" type="text" placeholder="<?php _e('Search by Address, Zip Code','gmap-embed');?>"/>
126
+ <div id="map" style="height: 415px;"></div>
127
+ </div>
128
+ <script>
129
+ (function ($) {
130
+ $(function () {
131
+ google.maps.event.addDomListener(window, 'load',
132
+ initAutocomplete('map', 'pac-input',<?php echo $wpgmap_lat;?>,<?php echo $wpgmap_lng;?>, 'roadmap',<?php echo $wpgmap_single->wpgmap_map_zoom;?>)
133
+ );
134
+ });
135
+ })(jQuery);
136
+ </script>
137
+
138
+ </div>
139
+
140
+ <div class="media-frame-toolbar">
141
+ <div class="media-toolbar">
142
+ <div class="media-toolbar-secondary"
143
+ style="text-align: right;float: right;margin-top:10px;">
144
+ <span class="spinner" style="margin: 0px !important;float:left;"></span>
145
+ <button class="button button-primary" id="wp-gmap-embed-update"><?php _e('Update','gmap-embed');?></button>
146
+ </div>
147
+ </div>
148
  </div>
includes/wpgmap_list.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php if (!defined('ABSPATH')) exit; ?>
2
- <div data-columns="8">
3
-
4
- <span class="wpgmap_msg_error" style="width:80%;">
5
-
6
- </span>
7
- <!--all map tab-->
8
- <div class="wp-gmap-list">
9
-
10
- <div id="wpgmapembed_lialoy to...st">
11
- <?php
12
- $this->load_wpgmapembed_list();
13
- ?>
14
- </div>
15
-
16
- </div>
17
  </div>
1
+ <?php if (!defined('ABSPATH')) exit; ?>
2
+ <div data-columns="8">
3
+
4
+ <span class="wpgmap_msg_error" style="width:80%;">
5
+
6
+ </span>
7
+ <!--all map tab-->
8
+ <div class="wp-gmap-list">
9
+
10
+ <div id="wpgmapembed_lialoy to...st">
11
+ <?php
12
+ $this->load_wpgmapembed_list();
13
+ ?>
14
+ </div>
15
+
16
+ </div>
17
  </div>
includes/wpgmap_popup_content.php CHANGED
@@ -1,66 +1,66 @@
1
- <?php
2
- if (!defined('ABSPATH')) exit;
3
- //this button will show a popup that contains inline content
4
- add_action('media_buttons_context', 'add_srm_gmap_embed_custom_button');
5
-
6
- //This will be shown in the inline modal
7
- add_action('admin_footer', 'srm_add_inline_popup_content');
8
-
9
- //action to add a custom button to the content editor
10
- function add_srm_gmap_embed_custom_button($context)
11
- {
12
-
13
- //path to my icon
14
- $img = plugins_url('../gmap_icon_18.png', __FILE__);
15
-
16
- //the id of the container I want to show in the popup
17
- $container_id = 'wp_gmap_popup_container';
18
-
19
- //our popup's title
20
- $title = 'Select your map properties to insert into post';
21
-
22
- //append the icon
23
- $context .= "<a class='button thickbox' title='{$title}'
24
- href='#TB_inline?width=700&height=450&inlineId={$container_id}'>
25
- " . '<span class="wp-media-buttons-icon" style="background: url(' . $img . '); background-repeat: no-repeat; background-position: left bottom;"></span>' . "Embed Google Map</a>";
26
-
27
- return $context;
28
- }
29
-
30
- function srm_add_inline_popup_content()
31
- {
32
- ?>
33
-
34
- <div id="wp_gmap_popup_container" style="display:none;">
35
- <!--modal contents-->
36
-
37
- <div id="wp-gmap-tabs">
38
-
39
- <!---------------------------new map tab-------------->
40
- <div class="wp-gmap-tab-content active" id="wp-gmap-all">
41
-
42
-
43
-
44
- <span class="wpgmap_msg_error" style="width:80%;">
45
-
46
- </span>
47
- <!--all map tab-->
48
- <div class="wp-gmap-list">
49
-
50
- <a href="<?php echo esc_url(admin_url() . 'admin.php?page=wpgmapembed&amp;tag=new'); ?>"
51
- data-id="wp-gmap-new" class="media-menu-item" style="float:right;">Create New
52
- Map</a>
53
- <span class="spinner is-active"
54
- style="margin: 0px !important;float:left;"></span>
55
-
56
- <div id="wpgmapembed_list"></div>
57
-
58
- </div>
59
- </div>
60
- </div>
61
-
62
- </div>
63
- <?php
64
- }
65
-
66
- ?>
1
+ <?php
2
+ if (!defined('ABSPATH')) exit;
3
+ //this button will show a popup that contains inline content
4
+ add_action('media_buttons_context', 'add_srm_gmap_embed_custom_button');
5
+
6
+ //This will be shown in the inline modal
7
+ add_action('admin_footer', 'srm_add_inline_popup_content');
8
+
9
+ //action to add a custom button to the content editor
10
+ function add_srm_gmap_embed_custom_button($context)
11
+ {
12
+
13
+ //path to my icon
14
+ $img = plugins_url('../gmap_icon_18.png', __FILE__);
15
+
16
+ //the id of the container I want to show in the popup
17
+ $container_id = 'wp_gmap_popup_container';
18
+
19
+ //our popup's title
20
+ $title = 'Select your map properties to insert into post';
21
+
22
+ //append the icon
23
+ $context .= "<a class='button thickbox' title='{$title}'
24
+ href='#TB_inline?width=700&height=450&inlineId={$container_id}'>
25
+ " . '<span class="wp-media-buttons-icon" style="background: url(' . $img . '); background-repeat: no-repeat; background-position: left bottom;"></span>' . "Embed Google Map</a>";
26
+
27
+ return $context;
28
+ }
29
+
30
+ function srm_add_inline_popup_content()
31
+ {
32
+ ?>
33
+
34
+ <div id="wp_gmap_popup_container" style="display:none;">
35
+ <!--modal contents-->
36
+
37
+ <div id="wp-gmap-tabs">
38
+
39
+ <!---------------------------new map tab-------------->
40
+ <div class="wp-gmap-tab-content active" id="wp-gmap-all">
41
+
42
+
43
+
44
+ <span class="wpgmap_msg_error" style="width:80%;">
45
+
46
+ </span>
47
+ <!--all map tab-->
48
+ <div class="wp-gmap-list">
49
+
50
+ <a href="<?php echo esc_url(admin_url() . 'admin.php?page=wpgmapembed&amp;tag=new'); ?>"
51
+ data-id="wp-gmap-new" class="media-menu-item" style="float:right;">Create New
52
+ Map</a>
53
+ <span class="spinner is-active"
54
+ style="margin: 0px !important;float:left;"></span>
55
+
56
+ <div id="wpgmapembed_list"></div>
57
+
58
+ </div>
59
+ </div>
60
+ </div>
61
+
62
+ </div>
63
+ <?php
64
+ }
65
+
66
+ ?>
includes/wpgmap_settings.php CHANGED
@@ -1,23 +1,23 @@
1
- <?php
2
- if (!defined('ABSPATH')) exit;
3
- ?>
4
- <div data-columns="8">
5
- <!-- to save api key-->
6
- <div class="wpgmapembed_get_api_key">
7
- <div class="error">
8
- <p style="font-size:17px;"><strong><?php _e('Notice: The plugin requires following API key.','gmap-embed');?></strong></p>
9
- <form method="post" action="<?php echo admin_url(); ?>admin.php?page=wpgmapembed&message=3">
10
- <p><?php _e('Enter API Key','gmap-embed');?> <input type="text" name="wpgmapembed_key"
11
- value="<?php echo esc_html(get_option('wpgmap_api_key')); ?>" size="45">
12
- <button class="wd-btn wd-btn-primary button media-button button-primary"><?php _e('Save','gmap-embed');?></button>
13
-
14
- <a target="_blank"
15
- href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,places_backend,geolocation,geocoding_backend,directions_backend&amp;keyType=CLIENT_SIDE&amp;reusekey=true"
16
- class="button media-button button-default button-large"><?php _e('GET FREE API KEY','gmap-embed');?></a>
17
- <br/><?php _e('The API key may take up to 5 minutes to take effect','gmap-embed');?>
18
- </p>
19
- </form>
20
-
21
- </div>
22
- </div>
23
  </div>
1
+ <?php
2
+ if (!defined('ABSPATH')) exit;
3
+ ?>
4
+ <div data-columns="8">
5
+ <!-- to save api key-->
6
+ <div class="wpgmapembed_get_api_key">
7
+ <div class="error">
8
+ <p style="font-size:17px;"><strong><?php _e('Notice: The plugin requires following API key.','gmap-embed');?></strong></p>
9
+ <form method="post" action="<?php echo admin_url(); ?>admin.php?page=wpgmapembed&message=3">
10
+ <p><?php _e('Enter API Key','gmap-embed');?> <input type="text" name="wpgmapembed_key"
11
+ value="<?php echo esc_html(get_option('wpgmap_api_key')); ?>" size="45">
12
+ <button class="wd-btn wd-btn-primary button media-button button-primary"><?php _e('Save','gmap-embed');?></button>
13
+
14
+ <a target="_blank"
15
+ href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,places_backend,geolocation,geocoding_backend,directions_backend&amp;keyType=CLIENT_SIDE&amp;reusekey=true"
16
+ class="button media-button button-default button-large"><?php _e('GET FREE API KEY','gmap-embed');?></a>
17
+ <br/><?php _e('The API key may take up to 5 minutes to take effect','gmap-embed');?>
18
+ </p>
19
+ </form>
20
+
21
+ </div>
22
+ </div>
23
  </div>
languages/gmap-embed-da_DK.po CHANGED
@@ -1,203 +1,203 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Plugins - WP Google Map - Stable (latest release)\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2018-06-20 05:38+0000\n"
6
- "PO-Revision-Date: 2018-06-20 08:22+0000\n"
7
- "Last-Translator: Mikael Boldt <admin@ronnespejder.dk>\n"
8
- "Language-Team: Dansk\n"
9
- "Language: da-DK\n"
10
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Loco-Source-Locale: bn_BD\n"
15
- "X-Generator: Loco https://localise.biz/\n"
16
- "X-Loco-Parser: loco_parse_po"
17
-
18
- #: srm_gmap_embed.php:213
19
- msgid "You have not created any Map yet. "
20
- msgstr "Du har endnu ikke oprettet et kort."
21
-
22
- #: includes/wpgmap_settings.php:17
23
- msgid "The API key may take up to 5 minutes to take effect"
24
- msgstr "Det kan tage op til 5 minutter før API-koden virker."
25
-
26
- #: includes/shortcodes.php:166
27
- msgid "Loading"
28
- msgstr "Indlæser"
29
-
30
- #: includes/shortcodes.php:164
31
- msgid "Get Directions"
32
- msgstr "Vis Vej"
33
-
34
- #: includes/shortcodes.php:160
35
- msgid "Bicycling"
36
- msgstr "på Cykel"
37
-
38
- #: includes/shortcodes.php:159
39
- msgid "Walking"
40
- msgstr "til Fods"
41
-
42
- #: includes/shortcodes.php:158
43
- msgid "Driving"
44
- msgstr "i Bil"
45
-
46
- #: includes/shortcodes.php:156
47
- msgid "Transportation method"
48
- msgstr "Transportmetode"
49
-
50
- #: includes/shortcodes.php:152
51
- msgid "To"
52
- msgstr "Til"
53
-
54
- #: includes/shortcodes.php:148
55
- msgid "From"
56
- msgstr "Fra"
57
-
58
- #: includes/gmap.php:28
59
- msgid ""
60
- "Notice: If it seems Direction option is not working properly, Please take "
61
- "api key again from settings tab."
62
- msgstr ""
63
- "Bemærk: Hvis Vejviseren ikke virker korrekt, skal du generere en ny API-kode,"
64
- " under fanen Indstillinger."
65
-
66
- #: includes/wpgmap_create.php:100 includes/wpgmap_edit.php:116
67
- msgid "Enable Direction in Map"
68
- msgstr "Aktivér Vejviseren på kortet"
69
-
70
- #: includes/gmap.php:67
71
- msgid "Map Updated Successfully."
72
- msgstr "Kortet er opdateret."
73
-
74
- #: includes/gmap.php:64
75
- msgid "Map has been created Successfully."
76
- msgstr "Kortet er oprettet."
77
-
78
- #: includes/wpgmap_create.php:48 includes/wpgmap_edit.php:56
79
- msgid "Disable zoom on mouse scroll"
80
- msgstr "Deaktiver zoom med musen"
81
-
82
- #. Author of the plugin/theme
83
- msgid "SRMILON"
84
- msgstr "SRMILON"
85
-
86
- #. Description of the plugin/theme
87
- msgid ""
88
- "The plugin will help to embed Google Map in post and pages also in sidebar "
89
- "as widget."
90
- msgstr ""
91
- "Denne plugin hjælper med at integrere Google Map i Poster og på Sider, samt "
92
- "i Widgets."
93
-
94
- #. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.3.0) #-#-#-#-#
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.com"
99
- msgstr "http://www.srmilon.com"
100
-
101
- #. Plugin Name of the plugin/theme
102
- msgid "Google Map Embed"
103
- msgstr "Google Map Embed"
104
-
105
- #: srm_gmap_embed.php:203
106
- msgid "Change"
107
- msgstr "Ret"
108
-
109
- #: srm_gmap_embed.php:77
110
- msgid "Add New"
111
- msgstr "Tilføj nyt"
112
-
113
- #: srm_gmap_embed.php:77
114
- msgid "Add new Map"
115
- msgstr "Tilføj nyt kort"
116
-
117
- #: includes/wpgmap_settings.php:16
118
- msgid "GET FREE API KEY"
119
- msgstr "Få en gratis API-kode"
120
-
121
- #: includes/wpgmap_settings.php:10
122
- msgid "Enter API Key"
123
- msgstr "Indtast API-kode"
124
-
125
- #: includes/wpgmap_settings.php:8
126
- msgid "Notice: The plugin requires following API key."
127
- msgstr "Bemærk: Denne plugin kræver en API-kode."
128
-
129
- #: includes/wpgmap_edit.php:145
130
- msgid "Update"
131
- msgstr "Opdater"
132
-
133
- #: includes/wpgmap_create.php:125 includes/wpgmap_settings.php:12
134
- msgid "Save"
135
- msgstr "Gem"
136
-
137
- #: includes/wpgmap_create.php:112 includes/wpgmap_edit.php:125
138
- msgid "Search by Address, Zip Code"
139
- msgstr "Søg efter adresse, postnummer"
140
-
141
- #: includes/wpgmap_create.php:92 includes/wpgmap_edit.php:108
142
- msgid "Show in marker infowindow"
143
- msgstr "Vis Adresse i info-vindue"
144
-
145
- #: includes/wpgmap_create.php:83 includes/wpgmap_edit.php:99
146
- msgid "Location Address"
147
- msgstr "Adresse for Interessepunkt"
148
-
149
- #: includes/wpgmap_create.php:71 includes/wpgmap_edit.php:82
150
- msgid "Map Type"
151
- msgstr "Korttype"
152
-
153
- #: includes/wpgmap_create.php:63 includes/wpgmap_edit.php:73
154
- msgid "Height (px)"
155
- msgstr "Højde (px)"
156
-
157
- #: includes/wpgmap_create.php:55 includes/wpgmap_edit.php:64
158
- msgid "Width (%)"
159
- msgstr "Bredde (%)"
160
-
161
- #: includes/wpgmap_create.php:40 includes/wpgmap_edit.php:48
162
- msgid "Zoom"
163
- msgstr "Zoom"
164
-
165
- #: includes/wpgmap_create.php:32 includes/wpgmap_edit.php:32
166
- msgid "Heading Custom Class"
167
- msgstr "Overskrift Custom Class"
168
-
169
- #: includes/wpgmap_create.php:25 includes/wpgmap_edit.php:39
170
- msgid "Latitude, Longitude"
171
- msgstr "Breddegrad, Længdegrad"
172
-
173
- #: includes/wpgmap_create.php:20 includes/wpgmap_edit.php:27
174
- msgid "Show as map title"
175
- msgstr "Vis Korttitel"
176
-
177
- #: includes/wpgmap_create.php:13 includes/wpgmap_edit.php:19
178
- msgid "Map Title"
179
- msgstr "Korttitel"
180
-
181
- #: includes/gmap.php:70
182
- msgid "Settings updated Successfully."
183
- msgstr "Indstillingerne er opdateret."
184
-
185
- #: includes/gmap.php:73
186
- msgid "Map Deleted Successfully."
187
- msgstr "Kortet er slettet."
188
-
189
- #: includes/gmap.php:47
190
- msgid "Need Help ?"
191
- msgstr "Brug for hjælp?"
192
-
193
- #: includes/gmap.php:43
194
- msgid "Settings"
195
- msgstr "Indstillinger"
196
-
197
- #: includes/gmap.php:38 srm_gmap_embed.php:215
198
- msgid "Create New Map"
199
- msgstr "Opret nyt kort"
200
-
201
- #: includes/gmap.php:33
202
- msgid "All Maps"
203
- msgstr "Alle kort"
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Plugins - WP Google Map - Stable (latest release)\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2018-06-20 05:38+0000\n"
6
+ "PO-Revision-Date: 2018-06-20 08:22+0000\n"
7
+ "Last-Translator: Mikael Boldt <admin@ronnespejder.dk>\n"
8
+ "Language-Team: Dansk\n"
9
+ "Language: da-DK\n"
10
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "X-Loco-Source-Locale: bn_BD\n"
15
+ "X-Generator: Loco https://localise.biz/\n"
16
+ "X-Loco-Parser: loco_parse_po"
17
+
18
+ #: srm_gmap_embed.php:213
19
+ msgid "You have not created any Map yet. "
20
+ msgstr "Du har endnu ikke oprettet et kort."
21
+
22
+ #: includes/wpgmap_settings.php:17
23
+ msgid "The API key may take up to 5 minutes to take effect"
24
+ msgstr "Det kan tage op til 5 minutter før API-koden virker."
25
+
26
+ #: includes/shortcodes.php:166
27
+ msgid "Loading"
28
+ msgstr "Indlæser"
29
+
30
+ #: includes/shortcodes.php:164
31
+ msgid "Get Directions"
32
+ msgstr "Vis Vej"
33
+
34
+ #: includes/shortcodes.php:160
35
+ msgid "Bicycling"
36
+ msgstr "på Cykel"
37
+
38
+ #: includes/shortcodes.php:159
39
+ msgid "Walking"
40
+ msgstr "til Fods"
41
+
42
+ #: includes/shortcodes.php:158
43
+ msgid "Driving"
44
+ msgstr "i Bil"
45
+
46
+ #: includes/shortcodes.php:156
47
+ msgid "Transportation method"
48
+ msgstr "Transportmetode"
49
+
50
+ #: includes/shortcodes.php:152
51
+ msgid "To"
52
+ msgstr "Til"
53
+
54
+ #: includes/shortcodes.php:148
55
+ msgid "From"
56
+ msgstr "Fra"
57
+
58
+ #: includes/gmap.php:28
59
+ msgid ""
60
+ "Notice: If it seems Direction option is not working properly, Please take "
61
+ "api key again from settings tab."
62
+ msgstr ""
63
+ "Bemærk: Hvis Vejviseren ikke virker korrekt, skal du generere en ny API-kode,"
64
+ " under fanen Indstillinger."
65
+
66
+ #: includes/wpgmap_create.php:100 includes/wpgmap_edit.php:116
67
+ msgid "Enable Direction in Map"
68
+ msgstr "Aktivér Vejviseren på kortet"
69
+
70
+ #: includes/gmap.php:67
71
+ msgid "Map Updated Successfully."
72
+ msgstr "Kortet er opdateret."
73
+
74
+ #: includes/gmap.php:64
75
+ msgid "Map has been created Successfully."
76
+ msgstr "Kortet er oprettet."
77
+
78
+ #: includes/wpgmap_create.php:48 includes/wpgmap_edit.php:56
79
+ msgid "Disable zoom on mouse scroll"
80
+ msgstr "Deaktiver zoom med musen"
81
+
82
+ #. Author of the plugin/theme
83
+ msgid "SRMILON"
84
+ msgstr "SRMILON"
85
+
86
+ #. Description of the plugin/theme
87
+ msgid ""
88
+ "The plugin will help to embed Google Map in post and pages also in sidebar "
89
+ "as widget."
90
+ msgstr ""
91
+ "Denne plugin hjælper med at integrere Google Map i Poster og på Sider, samt "
92
+ "i Widgets."
93
+
94
+ #. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.3.0) #-#-#-#-#
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.com"
99
+ msgstr "http://www.srmilon.com"
100
+
101
+ #. Plugin Name of the plugin/theme
102
+ msgid "Google Map Embed"
103
+ msgstr "Google Map Embed"
104
+
105
+ #: srm_gmap_embed.php:203
106
+ msgid "Change"
107
+ msgstr "Ret"
108
+
109
+ #: srm_gmap_embed.php:77
110
+ msgid "Add New"
111
+ msgstr "Tilføj nyt"
112
+
113
+ #: srm_gmap_embed.php:77
114
+ msgid "Add new Map"
115
+ msgstr "Tilføj nyt kort"
116
+
117
+ #: includes/wpgmap_settings.php:16
118
+ msgid "GET FREE API KEY"
119
+ msgstr "Få en gratis API-kode"
120
+
121
+ #: includes/wpgmap_settings.php:10
122
+ msgid "Enter API Key"
123
+ msgstr "Indtast API-kode"
124
+
125
+ #: includes/wpgmap_settings.php:8
126
+ msgid "Notice: The plugin requires following API key."
127
+ msgstr "Bemærk: Denne plugin kræver en API-kode."
128
+
129
+ #: includes/wpgmap_edit.php:145
130
+ msgid "Update"
131
+ msgstr "Opdater"
132
+
133
+ #: includes/wpgmap_create.php:125 includes/wpgmap_settings.php:12
134
+ msgid "Save"
135
+ msgstr "Gem"
136
+
137
+ #: includes/wpgmap_create.php:112 includes/wpgmap_edit.php:125
138
+ msgid "Search by Address, Zip Code"
139
+ msgstr "Søg efter adresse, postnummer"
140
+
141
+ #: includes/wpgmap_create.php:92 includes/wpgmap_edit.php:108
142
+ msgid "Show in marker infowindow"
143
+ msgstr "Vis Adresse i info-vindue"
144
+
145
+ #: includes/wpgmap_create.php:83 includes/wpgmap_edit.php:99
146
+ msgid "Location Address"
147
+ msgstr "Adresse for Interessepunkt"
148
+
149
+ #: includes/wpgmap_create.php:71 includes/wpgmap_edit.php:82
150
+ msgid "Map Type"
151
+ msgstr "Korttype"
152
+
153
+ #: includes/wpgmap_create.php:63 includes/wpgmap_edit.php:73
154
+ msgid "Height (px)"
155
+ msgstr "Højde (px)"
156
+
157
+ #: includes/wpgmap_create.php:55 includes/wpgmap_edit.php:64
158
+ msgid "Width (%)"
159
+ msgstr "Bredde (%)"
160
+
161
+ #: includes/wpgmap_create.php:40 includes/wpgmap_edit.php:48
162
+ msgid "Zoom"
163
+ msgstr "Zoom"
164
+
165
+ #: includes/wpgmap_create.php:32 includes/wpgmap_edit.php:32
166
+ msgid "Heading Custom Class"
167
+ msgstr "Overskrift Custom Class"
168
+
169
+ #: includes/wpgmap_create.php:25 includes/wpgmap_edit.php:39
170
+ msgid "Latitude, Longitude"
171
+ msgstr "Breddegrad, Længdegrad"
172
+
173
+ #: includes/wpgmap_create.php:20 includes/wpgmap_edit.php:27
174
+ msgid "Show as map title"
175
+ msgstr "Vis Korttitel"
176
+
177
+ #: includes/wpgmap_create.php:13 includes/wpgmap_edit.php:19
178
+ msgid "Map Title"
179
+ msgstr "Korttitel"
180
+
181
+ #: includes/gmap.php:70
182
+ msgid "Settings updated Successfully."
183
+ msgstr "Indstillingerne er opdateret."
184
+
185
+ #: includes/gmap.php:73
186
+ msgid "Map Deleted Successfully."
187
+ msgstr "Kortet er slettet."
188
+
189
+ #: includes/gmap.php:47
190
+ msgid "Need Help ?"
191
+ msgstr "Brug for hjælp?"
192
+
193
+ #: includes/gmap.php:43
194
+ msgid "Settings"
195
+ msgstr "Indstillinger"
196
+
197
+ #: includes/gmap.php:38 srm_gmap_embed.php:215
198
+ msgid "Create New Map"
199
+ msgstr "Opret nyt kort"
200
+
201
+ #: includes/gmap.php:33
202
+ msgid "All Maps"
203
+ msgstr "Alle kort"
languages/gmap-embed-es_ES.mo CHANGED
Binary file
languages/gmap-embed-es_ES.po CHANGED
@@ -1,5 +1,5 @@
1
- # Translation of Plugins - WP Google Map - Stable (latest release) in Spanish (Spain)
2
- # This file is distributed under the same license as the Plugins - WP Google Map - Stable (latest release) package.
3
  msgid ""
4
  msgstr ""
5
  "PO-Revision-Date: 2018-06-02 09:38:46+0000\n"
@@ -9,7 +9,7 @@ msgstr ""
9
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
  "X-Generator: GlotPress/2.4.0-alpha\n"
11
  "Language: es\n"
12
- "Project-Id-Version: Plugins - WP Google Map - Stable (latest release)\n"
13
 
14
  #: srm_gmap_embed.php:213
15
  msgid "You have not created any Map yet. "
@@ -79,9 +79,9 @@ msgstr "SRMILON"
79
  msgid "The plugin will help to embed Google Map in post and pages also in sidebar as widget."
80
  msgstr "El plugin te ayudará a insertar mapas de Google en entradas, páginas y también en la barra lateral con un widget."
81
 
82
- #. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.3.1) #-#-#-#-#
83
  #. Plugin URI of the plugin/theme
84
- #. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.3.1) #-#-#-#-#
85
  #. Author URI of the plugin/theme
86
  msgid "http://www.srmilon.com"
87
  msgstr "http://www.srmilon.com"
1
+ # Translation of Plugins - WP Google Map - Development (trunk) in Spanish (Spain)
2
+ # This file is distributed under the same license as the Plugins - WP Google Map - Development (trunk) package.
3
  msgid ""
4
  msgstr ""
5
  "PO-Revision-Date: 2018-06-02 09:38:46+0000\n"
9
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
  "X-Generator: GlotPress/2.4.0-alpha\n"
11
  "Language: es\n"
12
+ "Project-Id-Version: Plugins - WP Google Map - Development (trunk)\n"
13
 
14
  #: srm_gmap_embed.php:213
15
  msgid "You have not created any Map yet. "
79
  msgid "The plugin will help to embed Google Map in post and pages also in sidebar as widget."
80
  msgstr "El plugin te ayudará a insertar mapas de Google en entradas, páginas y también en la barra lateral con un widget."
81
 
82
+ #. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.3.7) #-#-#-#-#
83
  #. Plugin URI of the plugin/theme
84
+ #. #-#-#-#-# gmap-embed-code.pot (Google Map Embed 1.3.7) #-#-#-#-#
85
  #. Author URI of the plugin/theme
86
  msgid "http://www.srmilon.com"
87
  msgstr "http://www.srmilon.com"
languages/gmap-embed-it_IT.po CHANGED
@@ -1,151 +1,151 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: gmap-embd\n"
4
- "POT-Creation-Date: 2017-10-11 15:17+0200\n"
5
- "PO-Revision-Date: 2017-10-11 15:23+0200\n"
6
- "Last-Translator: Maurizio Persi <mauriziopersi@outlook.it>\n"
7
- "Language-Team: \n"
8
- "Language: it\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.0.4\n"
13
- "X-Poedit-Basepath: ..\n"
14
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
- "X-Poedit-KeywordsList: __;_e\n"
16
- "X-Poedit-SearchPath-0: .\n"
17
- "X-Poedit-SearchPath-1: includes\n"
18
-
19
- #: includes/gmap.php:28
20
- msgid ""
21
- "Notice: If it seems Direction option is not working properly, Please take "
22
- "api key again from settings tab."
23
- msgstr ""
24
-
25
- #: includes/gmap.php:33
26
- msgid "All Maps"
27
- msgstr "Tutte le mappe"
28
-
29
- #: includes/gmap.php:38
30
- msgid "Create New Map"
31
- msgstr "Crea nuova mappa"
32
-
33
- #: includes/gmap.php:43
34
- msgid "Settings"
35
- msgstr "Impostazioni"
36
-
37
- #: includes/gmap.php:47
38
- msgid "Need Help ?"
39
- msgstr "Serve aiuto?"
40
-
41
- #: includes/gmap.php:64
42
- #, fuzzy
43
- #| msgid "Map created Successfully."
44
- msgid "Map has been created Successfully."
45
- msgstr "Mappa creata correttamente."
46
-
47
- #: includes/gmap.php:67
48
- #, fuzzy
49
- #| msgid "Map created Successfully."
50
- msgid "Map Updated Successfully."
51
- msgstr "Mappa aggiornata correttamente."
52
-
53
- #: includes/gmap.php:70
54
- msgid "Settings updated Successfully."
55
- msgstr "Impostazioni aggiornate correttamente."
56
-
57
- #: includes/gmap.php:73
58
- #, fuzzy
59
- #| msgid "Map created Successfully."
60
- msgid "Map Deleted Successfully."
61
- msgstr "Mappa cancellata correttamente."
62
-
63
- #: includes/wpgmap_create.php:13 includes/wpgmap_edit.php:19
64
- msgid "Map Title"
65
- msgstr "Titolo mappa"
66
-
67
- #: includes/wpgmap_create.php:20 includes/wpgmap_edit.php:27
68
- msgid "Show as map title"
69
- msgstr "Visualizza come titolo mappa"
70
-
71
- #: includes/wpgmap_create.php:25 includes/wpgmap_edit.php:39
72
- msgid "Latitude, Longitude"
73
- msgstr "Latitudine, Longitudine"
74
-
75
- #: includes/wpgmap_create.php:32 includes/wpgmap_edit.php:32
76
- msgid "Heading Custom Class"
77
- msgstr "Voce classe personalizzata"
78
-
79
- #: includes/wpgmap_create.php:40 includes/wpgmap_edit.php:48
80
- msgid "Zoom"
81
- msgstr "Zoom"
82
-
83
- #: includes/wpgmap_create.php:48 includes/wpgmap_edit.php:56
84
- msgid "Disable zoom on mouse scroll"
85
- msgstr "Disabilita scroll per zoom"
86
-
87
- #: includes/wpgmap_create.php:55 includes/wpgmap_edit.php:64
88
- msgid "Width (%)"
89
- msgstr "Larghezza (%)"
90
-
91
- #: includes/wpgmap_create.php:63 includes/wpgmap_edit.php:73
92
- msgid "Height (px)"
93
- msgstr "Altezza (%)"
94
-
95
- #: includes/wpgmap_create.php:71 includes/wpgmap_edit.php:82
96
- msgid "Map Type"
97
- msgstr "Tipo mappa"
98
-
99
- #: includes/wpgmap_create.php:83 includes/wpgmap_edit.php:99
100
- msgid "Location Address"
101
- msgstr "Indirizzo"
102
-
103
- #: includes/wpgmap_create.php:92 includes/wpgmap_edit.php:108
104
- msgid "Show in marker infowindow"
105
- msgstr "mostrare nel segnalino infowindow"
106
-
107
- #: includes/wpgmap_create.php:100 includes/wpgmap_edit.php:116
108
- msgid "Enable Direction in Map"
109
- msgstr "Abilita percorso nella mappa"
110
-
111
- #: includes/wpgmap_create.php:112 includes/wpgmap_edit.php:125
112
- msgid "Search by Address, Zip Code"
113
- msgstr "Cerca per indirizzo, CAP"
114
-
115
- #: includes/wpgmap_create.php:125 includes/wpgmap_settings.php:12
116
- msgid "Save"
117
- msgstr "Salva"
118
-
119
- #: includes/wpgmap_edit.php:145
120
- msgid "Update"
121
- msgstr "Aggiorna"
122
-
123
- #: includes/wpgmap_settings.php:8
124
- msgid "Notice: The plugin requires following API key."
125
- msgstr "Avviso: il plugin richiede la seguente chiave API."
126
-
127
- #: includes/wpgmap_settings.php:10
128
- msgid "Enter API Key"
129
- msgstr "Inserisci la key API"
130
-
131
- #: includes/wpgmap_settings.php:16
132
- msgid "GET FREE API KEY"
133
- msgstr "OTTIENI UNA KEY GRATUITA"
134
-
135
- #: srm_gmap_embed.php:76
136
- msgid "Add new Map"
137
- msgstr "Aggiungi nuova mappa"
138
-
139
- #: srm_gmap_embed.php:76
140
- msgid "Add New"
141
- msgstr "Aggiungi nuovo"
142
-
143
- #: srm_gmap_embed.php:202
144
- msgid "Change"
145
- msgstr "Cambia"
146
-
147
- #~ msgid "Updated Map Successfully."
148
- #~ msgstr "Aktualisierte Karte erfolgreich."
149
-
150
- #~ msgid "Deleted Map Successfully."
151
- #~ msgstr "Karte erfolgreich gelöscht."
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: gmap-embd\n"
4
+ "POT-Creation-Date: 2017-10-11 15:17+0200\n"
5
+ "PO-Revision-Date: 2017-10-11 15:23+0200\n"
6
+ "Last-Translator: Maurizio Persi <mauriziopersi@outlook.it>\n"
7
+ "Language-Team: \n"
8
+ "Language: it\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.0.4\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-KeywordsList: __;_e\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+ "X-Poedit-SearchPath-1: includes\n"
18
+
19
+ #: includes/gmap.php:28
20
+ msgid ""
21
+ "Notice: If it seems Direction option is not working properly, Please take "
22
+ "api key again from settings tab."
23
+ msgstr ""
24
+
25
+ #: includes/gmap.php:33
26
+ msgid "All Maps"
27
+ msgstr "Tutte le mappe"
28
+
29
+ #: includes/gmap.php:38
30
+ msgid "Create New Map"
31
+ msgstr "Crea nuova mappa"
32
+
33
+ #: includes/gmap.php:43
34
+ msgid "Settings"
35
+ msgstr "Impostazioni"
36
+
37
+ #: includes/gmap.php:47
38
+ msgid "Need Help ?"
39
+ msgstr "Serve aiuto?"
40
+
41
+ #: includes/gmap.php:64
42
+ #, fuzzy
43
+ #| msgid "Map created Successfully."
44
+ msgid "Map has been created Successfully."
45
+ msgstr "Mappa creata correttamente."
46
+
47
+ #: includes/gmap.php:67
48
+ #, fuzzy
49
+ #| msgid "Map created Successfully."
50
+ msgid "Map Updated Successfully."
51
+ msgstr "Mappa aggiornata correttamente."
52
+
53
+ #: includes/gmap.php:70
54
+ msgid "Settings updated Successfully."
55
+ msgstr "Impostazioni aggiornate correttamente."
56
+
57
+ #: includes/gmap.php:73
58
+ #, fuzzy
59
+ #| msgid "Map created Successfully."
60
+ msgid "Map Deleted Successfully."
61
+ msgstr "Mappa cancellata correttamente."
62
+
63
+ #: includes/wpgmap_create.php:13 includes/wpgmap_edit.php:19
64
+ msgid "Map Title"
65
+ msgstr "Titolo mappa"
66
+
67
+ #: includes/wpgmap_create.php:20 includes/wpgmap_edit.php:27
68
+ msgid "Show as map title"
69
+ msgstr "Visualizza come titolo mappa"
70
+
71
+ #: includes/wpgmap_create.php:25 includes/wpgmap_edit.php:39
72
+ msgid "Latitude, Longitude"
73
+ msgstr "Latitudine, Longitudine"
74
+
75
+ #: includes/wpgmap_create.php:32 includes/wpgmap_edit.php:32
76
+ msgid "Heading Custom Class"
77
+ msgstr "Voce classe personalizzata"
78
+
79
+ #: includes/wpgmap_create.php:40 includes/wpgmap_edit.php:48
80
+ msgid "Zoom"
81
+ msgstr "Zoom"
82
+
83
+ #: includes/wpgmap_create.php:48 includes/wpgmap_edit.php:56
84
+ msgid "Disable zoom on mouse scroll"
85
+ msgstr "Disabilita scroll per zoom"
86
+
87
+ #: includes/wpgmap_create.php:55 includes/wpgmap_edit.php:64
88
+ msgid "Width (%)"
89
+ msgstr "Larghezza (%)"
90
+
91
+ #: includes/wpgmap_create.php:63 includes/wpgmap_edit.php:73
92
+ msgid "Height (px)"
93
+ msgstr "Altezza (%)"
94
+
95
+ #: includes/wpgmap_create.php:71 includes/wpgmap_edit.php:82
96
+ msgid "Map Type"
97
+ msgstr "Tipo mappa"
98
+
99
+ #: includes/wpgmap_create.php:83 includes/wpgmap_edit.php:99
100
+ msgid "Location Address"
101
+ msgstr "Indirizzo"
102
+
103
+ #: includes/wpgmap_create.php:92 includes/wpgmap_edit.php:108
104
+ msgid "Show in marker infowindow"
105
+ msgstr "mostrare nel segnalino infowindow"
106
+
107
+ #: includes/wpgmap_create.php:100 includes/wpgmap_edit.php:116
108
+ msgid "Enable Direction in Map"
109
+ msgstr "Abilita percorso nella mappa"
110
+
111
+ #: includes/wpgmap_create.php:112 includes/wpgmap_edit.php:125
112
+ msgid "Search by Address, Zip Code"
113
+ msgstr "Cerca per indirizzo, CAP"
114
+
115
+ #: includes/wpgmap_create.php:125 includes/wpgmap_settings.php:12
116
+ msgid "Save"
117
+ msgstr "Salva"
118
+
119
+ #: includes/wpgmap_edit.php:145
120
+ msgid "Update"
121
+ msgstr "Aggiorna"
122
+
123
+ #: includes/wpgmap_settings.php:8
124
+ msgid "Notice: The plugin requires following API key."
125
+ msgstr "Avviso: il plugin richiede la seguente chiave API."
126
+
127
+ #: includes/wpgmap_settings.php:10
128
+ msgid "Enter API Key"
129
+ msgstr "Inserisci la key API"
130
+
131
+ #: includes/wpgmap_settings.php:16
132
+ msgid "GET FREE API KEY"
133
+ msgstr "OTTIENI UNA KEY GRATUITA"
134
+
135
+ #: srm_gmap_embed.php:76
136
+ msgid "Add new Map"
137
+ msgstr "Aggiungi nuova mappa"
138
+
139
+ #: srm_gmap_embed.php:76
140
+ msgid "Add New"
141
+ msgstr "Aggiungi nuovo"
142
+
143
+ #: srm_gmap_embed.php:202
144
+ msgid "Change"
145
+ msgstr "Cambia"
146
+
147
+ #~ msgid "Updated Map Successfully."
148
+ #~ msgstr "Aktualisierte Karte erfolgreich."
149
+
150
+ #~ msgid "Deleted Map Successfully."
151
+ #~ msgstr "Karte erfolgreich gelöscht."
readme.txt CHANGED
@@ -1,238 +1,243 @@
1
- === WP Google Map ===
2
- Contributors: milonfci
3
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVPQNC6CJ6T4Q
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, gmaps, google earth, google map plugin, google map shortcode, google map widget, google maps v3, googlemaps, gprs, gps, gpx, kml, latitude, Longitude, location, loaction 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: 4.9.4
7
- Version: 1.3.7
8
- Stable tag: 1.3.7
9
- Requires PHP: 5.6
10
- Text Domain: gmap-embed
11
- License: GPLv2 or later
12
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
-
14
- WP Google Map is very Simple, light-weight and Easy to use Google Custom Map with markers in Posts, Pages as shortcode and sidebar as widget and it is most popular plugin for wordpress.
15
-
16
- == Description ==
17
-
18
- WP Google Map is an awesome plugin to use when adding a custom Google map to your website. It is fully customizable and can be used as shortcode.
19
-
20
- ### !!Important Notice for All!!
21
- After July 16, 2018, Google has changed their policy. **You need to add billing information to use Google Map**. If you see a working message on Map like "This page can't load Google Maps correctly", please have a look on google developers [documentation](https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors). Even if you face problem, please send a message in mail: **milonfci@gmail.com** or Skype: **milon305021**
22
-
23
-
24
- * [Demo](https://sobyasachi.com/wp/google-map-demo/)
25
- * [Support Forum](https://wordpress.org/support/plugin/gmap-embed)
26
-
27
- To have continue the update, please donate for the plugin.
28
- [Click here to donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVPQNC6CJ6T4Q)
29
-
30
- https://www.youtube.com/watch?v=Lak-tJjGjl8
31
-
32
- ### Important Notice
33
- `If it seems Direction option is not working, Please take api key again from settings tab, it's necessary for Direction Option in WP Google Map.`
34
-
35
- ### Features of WP Google Map Plugin:
36
-
37
- * **User friendly**
38
- * **Direction Support with Map.**
39
- * **Importing the shortcode by Embed Google Map Button upon Editor**
40
- * **Fully Customizable**
41
- * **Automatic Google Map location identification**
42
- * **Tested with other popular plugins**
43
- * **Ability to change Latitude, Longitude, Address by Dragging Marker**
44
- * **Ability to change zoom level(1-15)**
45
- * **Easy to add as widget (By Shortcode)**
46
- * **Ability to use as shortcode in post and Single page**
47
- * **Can be used in single page, single post, sidebar, footer, etc.**
48
- * **It is most helpful for wordpress website to embed google map**
49
-
50
- ### USE AS SHORTCODE IN POST, PAGE, AND SIDEBAR.
51
- `[gmap-embed id="<Your map ID>"]`
52
-
53
- ### USE AS SHORTCODE IN PHP CODE.
54
- `<?php echo do_shortcode('[gmap-embed id="<Your map ID>"]');?>`
55
-
56
-
57
- ###Important:
58
- The plugin requires an API key., [click here](https://console.developers.google.com/flows/enableapi?apiid=maps_backend,places_backend,geolocation,geocoding_backend&keyType=CLIENT_SIDE&reusekey=true) to get your free API key. The API key may take up to 5 minutes to take effect.
59
-
60
- Contact me if you have any problems with installation or anything else.
61
- Email: **milonfci@gmail.com**
62
- Skype: **milon305021**
63
-
64
- If you have a problem or a suggestion, please post in [Support Forum](https://wordpress.org/support/plugin/gmap-embed).
65
-
66
- == Installation ==
67
-
68
- ### It's simple:
69
-
70
- 1. [Download](https://plugins.svn.wordpress.org/gmap-embed/) the WP Google Map Plugin.
71
- 2. Upload the zip folder plugins directory "wp-content/plugins"
72
- 3. Activate the WP Google Map Plugin from the Admin panel.
73
- 4. Add the WP Google Map widget to your sidebar using Shortcode.
74
- 5. Add the WP Google Map in posts/pages using shortcode.
75
-
76
-
77
- == Upgrade Notice ==
78
-
79
- Upgrade Google Map Plugin from [here](https://plugins.svn.wordpress.org/gmap-embed/) to get updated features.
80
-
81
- == Frequently Asked Questions ==
82
-
83
- Our WP Google Map plugin is user friendly, but you can read some frequently asked questions that might help you here.
84
-
85
- = How can I create a new Google Map? =
86
- After install the plugin, Click on Google Map in the left side bar. Then click on = Create New map =
87
-
88
- = How can I see a list of created Google Maps? =
89
- Click on Google Map in the left side bar, here Created Maps list will apper.
90
-
91
- = How do I enable directions on my Google Map? =
92
- You will see an option named "Enable Direction in Map" under each map setting.
93
-
94
- = How do I add a Google Map to my post? =
95
- Go to =Posts=->=Add New= then you will see a button named "Embed Google Map" beside media button. Click on it and insert your desired map by click ing on Insert Button, then save post and the map will appear in your desired post. Enjoy!
96
-
97
-
98
- = How do I add a Google Map to my page(s)? =
99
- Go to =Pages=->=Add New= then you will see a button named "Embed Google Map" beside media button. Click on it and insert your desired map by click ing on Insert Button, then save post and the map will appear in your desired post. Enjoy!
100
-
101
-
102
- = How do I add a Google Map as a widget? =
103
- Go to =Appearence=->=Widget= then you will see a widget named "Google Map ". Drag it to any widget area and enter Google Map Shortcode then save it and the map will appear in your sidebar or footer whatever you selected. Enjoy!
104
-
105
- = How do I get a Google Map API key? =
106
- See the [Video](https://www.youtube.com/watch?v=Lak-tJjGjl8) ,hope you will get idea.
107
-
108
- == Screenshots ==
109
-
110
- 1. Google Map menu in left sidebar
111
- 2. To create New Map
112
- 3. To Allow Locatoin Sharing
113
- 4. Creating New Map and Saving
114
- 5. Map List with Shortcode
115
- 6. To Embed Shortcode in Pages, Posts and Widgets
116
- 7. Maps list going to insert
117
- 8. Using as Widget
118
-
119
- == Changelog ==
120
-
121
- = 1.0.0 =
122
-
123
- * Initial version of Google Map Embed Plugin.
124
-
125
- = 1.0.1 =
126
-
127
- * Updated screenshots with FAQ to make easier.
128
-
129
- = 1.0.2 =
130
-
131
- * Bug fixes with adding helpful video embedding
132
-
133
- = 1.0.3 =
134
-
135
- * Self api key adding option added
136
-
137
- = 1.0.4 =
138
-
139
- * Once plugin activated, goes to plugin settings page directly.
140
-
141
- = 1.0.5 =
142
-
143
- * Added new helpfull video with how to get Free API key
144
-
145
-
146
- = 1.0.6 =
147
-
148
- * Custom map heading class adding option added
149
- * Map rendering related problem fixing
150
- * Custom status message showed
151
-
152
- = 1.0.7 =
153
- * Added helpful video both in description and admin panel
154
-
155
- = 1.0.8 =
156
- * Initial marker dragging related problem fixing
157
- * API key trailing blank space removed
158
-
159
-
160
- = 1.0.9 =
161
- * https or SSl related problem fixing
162
-
163
- = 1.1.0 =
164
- * Initial Translation support for English(en), Bengali(bn) and German(de)
165
-
166
-
167
- = 1.1.1 =
168
- * Menu Position changed and readme.txt updated
169
-
170
- = 1.1.2, 1.1.3 =
171
- * Small bug fixes
172
-
173
- = 1.1.4 =
174
- * Added option to disable/enable zoom on mouse scrolling
175
-
176
-
177
- = 1.1.5 =
178
- * Widget title giving option added
179
-
180
- = 1.1.6 =
181
- * Added option for creating unlimited maps(Previous limit was 10)
182
-
183
- = 1.1.7 =
184
- * Look and Feel changes
185
-
186
- = 1.2.0 =
187
- * Direction support with Google Map
188
-
189
- = 1.2.1 =
190
- * Direction support Bug fixing
191
-
192
- = 1.2.2 =
193
- * Italian Language Support
194
-
195
- = 1.2.3 =
196
- * Spanish Language support
197
-
198
- = 1.2.4 =
199
- * CSS updated related to map search box
200
-
201
- = 1.2.5 =
202
- * Installation process explained in details.
203
-
204
- = 1.2.6 =
205
- * Translation enabled for some additional text.
206
-
207
- = 1.2.7 =
208
- * Readme file updated.
209
-
210
- = 1.2.8 =
211
- * Tags updated in readme.txt file.
212
-
213
- = 1.2.9 =
214
- * Examples button and Donation Button added.
215
-
216
- = 1.3.0 =
217
- * German, German (Formal) and Spanish (Spain) Language file updated.
218
-
219
- = 1.3.1 =
220
- * Danish Language Translation support added.
221
-
222
- = 1.3.2 =
223
- * Danish Language Translation support updated.
224
-
225
- = 1.3.3 =
226
- * Spanish language files updated.
227
-
228
- = 1.3.4 =
229
- * Direction From feild default to emtpy, Readme file updated with Google Billing warning message.
230
-
231
- = 1.3.5 =
232
- * Google API realted update
233
-
234
- = 1.3.6 =
235
- * Google API realted update
236
-
237
- = 1.3.7 =
238
- * Google API realted update
 
 
 
 
 
1
+ === WP Google Map ===
2
+ Contributors: milonfci
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVPQNC6CJ6T4Q
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, gmaps, google earth, google map plugin, google map shortcode, google map widget, google maps v3, googlemaps, gprs, gps, gpx, kml, latitude, Longitude, location, loaction 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: 4.9.4
7
+ Version: 1.3.8
8
+ Stable tag: 1.3.8
9
+ Requires PHP: 5.6
10
+ Text Domain: gmap-embed
11
+ License: GPLv2 or later
12
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
+
14
+ WP Google Map is very Simple, light-weight and Easy to use Google Custom Map with markers in Posts, Pages as shortcode and sidebar as widget and it is most popular plugin for wordpress.
15
+
16
+ == Description ==
17
+
18
+ WP Google Map is an awesome plugin to use when adding a custom Google map to your website. It is fully customizable and can be used as shortcode.
19
+
20
+ [Click here to donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVPQNC6CJ6T4Q)
21
+
22
+ ### !!Important Notice for All!!
23
+ After July 16, 2018, Google has changed their policy. **You need to add billing information to use Google Map**. If you see a warning message on Map like "This page can't load Google Maps correctly", please have a look on google developers [documentation](https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors). Even if you face problem, please send a message in mail: **milonfci@gmail.com** or Skype: **milon305021**
24
+
25
+
26
+ * [Demo](https://sobyasachi.com/wp/google-map-demo/)
27
+ * [Support Forum](https://wordpress.org/support/plugin/gmap-embed)
28
+
29
+ To have continue the update, please donate for the plugin.
30
+ [Click here to donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WVPQNC6CJ6T4Q)
31
+
32
+ https://www.youtube.com/watch?v=Lak-tJjGjl8
33
+
34
+ ### Important Notice
35
+ `If it seems Direction option is not working, Please take api key again from settings tab, it's necessary for Direction Option in WP Google Map.`
36
+
37
+ ### Features of WP Google Map Plugin:
38
+
39
+ * **User friendly**
40
+ * **Direction Support with Map.**
41
+ * **Importing the shortcode by Embed Google Map Button upon Editor**
42
+ * **Fully Customizable**
43
+ * **Automatic Google Map location identification**
44
+ * **Tested with other popular plugins**
45
+ * **Ability to change Latitude, Longitude, Address by Dragging Marker**
46
+ * **Ability to change zoom level(1-15)**
47
+ * **Easy to add as widget (By Shortcode)**
48
+ * **Ability to use as shortcode in post and Single page**
49
+ * **Can be used in single page, single post, sidebar, footer, etc.**
50
+ * **It is most helpful for wordpress website to embed google map**
51
+
52
+ ### USE AS SHORTCODE IN POST, PAGE, AND SIDEBAR.
53
+ `[gmap-embed id="<Your map ID>"]`
54
+
55
+ ### USE AS SHORTCODE IN PHP CODE.
56
+ `<?php echo do_shortcode('[gmap-embed id="<Your map ID>"]');?>`
57
+
58
+
59
+ ###Important:
60
+ The plugin requires an API key., [click here](https://console.developers.google.com/flows/enableapi?apiid=maps_backend,places_backend,geolocation,geocoding_backend&keyType=CLIENT_SIDE&reusekey=true) to get your free API key. The API key may take up to 5 minutes to take effect.
61
+
62
+ Contact me if you have any problems with installation or anything else.
63
+ Email: **milonfci@gmail.com**
64
+ Skype: **milon305021**
65
+
66
+ If you have a problem or a suggestion, please post in [Support Forum](https://wordpress.org/support/plugin/gmap-embed).
67
+
68
+ == Installation ==
69
+
70
+ ### It's simple:
71
+
72
+ 1. [Download](https://plugins.svn.wordpress.org/gmap-embed/) the WP Google Map Plugin.
73
+ 2. Upload the zip folder plugins directory "wp-content/plugins"
74
+ 3. Activate the WP Google Map Plugin from the Admin panel.
75
+ 4. Add the WP Google Map widget to your sidebar using Shortcode.
76
+ 5. Add the WP Google Map in posts/pages using shortcode.
77
+
78
+
79
+ == Upgrade Notice ==
80
+
81
+ Upgrade Google Map Plugin from [here](https://plugins.svn.wordpress.org/gmap-embed/) to get updated features.
82
+
83
+ == Frequently Asked Questions ==
84
+
85
+ Our WP Google Map plugin is user friendly, but you can read some frequently asked questions that might help you here.
86
+
87
+ = How can I create a new Google Map? =
88
+ After install the plugin, Click on Google Map in the left side bar. Then click on = Create New map =
89
+
90
+ = How can I see a list of created Google Maps? =
91
+ Click on Google Map in the left side bar, here Created Maps list will apper.
92
+
93
+ = How do I enable directions on my Google Map? =
94
+ You will see an option named "Enable Direction in Map" under each map setting.
95
+
96
+ = How do I add a Google Map to my post? =
97
+ Go to =Posts=->=Add New= then you will see a button named "Embed Google Map" beside media button. Click on it and insert your desired map by click ing on Insert Button, then save post and the map will appear in your desired post. Enjoy!
98
+
99
+
100
+ = How do I add a Google Map to my page(s)? =
101
+ Go to =Pages=->=Add New= then you will see a button named "Embed Google Map" beside media button. Click on it and insert your desired map by click ing on Insert Button, then save post and the map will appear in your desired post. Enjoy!
102
+
103
+
104
+ = How do I add a Google Map as a widget? =
105
+ Go to =Appearence=->=Widget= then you will see a widget named "Google Map ". Drag it to any widget area and enter Google Map Shortcode then save it and the map will appear in your sidebar or footer whatever you selected. Enjoy!
106
+
107
+ = How do I get a Google Map API key? =
108
+ See the [Video](https://www.youtube.com/watch?v=Lak-tJjGjl8) ,hope you will get idea.
109
+
110
+ == Screenshots ==
111
+
112
+ 1. Google Map menu in left sidebar
113
+ 2. To create New Map
114
+ 3. To Allow Locatoin Sharing
115
+ 4. Creating New Map and Saving
116
+ 5. Map List with Shortcode
117
+ 6. To Embed Shortcode in Pages, Posts and Widgets
118
+ 7. Maps list going to insert
119
+ 8. Using as Widget
120
+
121
+ == Changelog ==
122
+
123
+ = 1.0.0 =
124
+
125
+ * Initial version of Google Map Embed Plugin.
126
+
127
+ = 1.0.1 =
128
+
129
+ * Updated screenshots with FAQ to make easier.
130
+
131
+ = 1.0.2 =
132
+
133
+ * Bug fixes with adding helpful video embedding
134
+
135
+ = 1.0.3 =
136
+
137
+ * Self api key adding option added
138
+
139
+ = 1.0.4 =
140
+
141
+ * Once plugin activated, goes to plugin settings page directly.
142
+
143
+ = 1.0.5 =
144
+
145
+ * Added new helpfull video with how to get Free API key
146
+
147
+
148
+ = 1.0.6 =
149
+
150
+ * Custom map heading class adding option added
151
+ * Map rendering related problem fixing
152
+ * Custom status message showed
153
+
154
+ = 1.0.7 =
155
+ * Added helpful video both in description and admin panel
156
+
157
+ = 1.0.8 =
158
+ * Initial marker dragging related problem fixing
159
+ * API key trailing blank space removed
160
+
161
+
162
+ = 1.0.9 =
163
+ * https or SSl related problem fixing
164
+
165
+ = 1.1.0 =
166
+ * Initial Translation support for English(en), Bengali(bn) and German(de)
167
+
168
+
169
+ = 1.1.1 =
170
+ * Menu Position changed and readme.txt updated
171
+
172
+ = 1.1.2, 1.1.3 =
173
+ * Small bug fixes
174
+
175
+ = 1.1.4 =
176
+ * Added option to disable/enable zoom on mouse scrolling
177
+
178
+
179
+ = 1.1.5 =
180
+ * Widget title giving option added
181
+
182
+ = 1.1.6 =
183
+ * Added option for creating unlimited maps(Previous limit was 10)
184
+
185
+ = 1.1.7 =
186
+ * Look and Feel changes
187
+
188
+ = 1.2.0 =
189
+ * Direction support with Google Map
190
+
191
+ = 1.2.1 =
192
+ * Direction support Bug fixing
193
+
194
+ = 1.2.2 =
195
+ * Italian Language Support
196
+
197
+ = 1.2.3 =
198
+ * Spanish Language support
199
+
200
+ = 1.2.4 =
201
+ * CSS updated related to map search box
202
+
203
+ = 1.2.5 =
204
+ * Installation process explained in details.
205
+
206
+ = 1.2.6 =
207
+ * Translation enabled for some additional text.
208
+
209
+ = 1.2.7 =
210
+ * Readme file updated.
211
+
212
+ = 1.2.8 =
213
+ * Tags updated in readme.txt file.
214
+
215
+ = 1.2.9 =
216
+ * Examples button and Donation Button added.
217
+
218
+ = 1.3.0 =
219
+ * German, German (Formal) and Spanish (Spain) Language file updated.
220
+
221
+ = 1.3.1 =
222
+ * Danish Language Translation support added.
223
+
224
+ = 1.3.2 =
225
+ * Danish Language Translation support updated.
226
+
227
+ = 1.3.3 =
228
+ * Spanish language files updated.
229
+
230
+ = 1.3.4 =
231
+ * Direction From feild default to emtpy, Readme file updated with Google Billing warning message.
232
+
233
+ = 1.3.5 =
234
+ * Google API realted update
235
+
236
+ = 1.3.6 =
237
+ * Google API realted update
238
+
239
+ = 1.3.7 =
240
+ * Google API realted update
241
+
242
+ = 1.3.8 =
243
+ * Google API readme updated, language and donation button added.
srm_gmap_embed.php CHANGED
@@ -1,339 +1,339 @@
1
- <?php
2
- /*
3
- Plugin Name: Google Map Embed
4
- Plugin URI: http://www.srmilon.com
5
- Description: The plugin will help to embed Google Map in post and pages also in sidebar as widget.
6
- Author: SRMILON
7
- Text Domain: gmap-embed
8
- Domain Path: /languages
9
- Author URI: http://www.srmilon.com
10
- Version: 1.3.7
11
- */
12
-
13
- if (!defined('ABSPATH')) exit;
14
- load_plugin_textdomain('gmap-embed', false, dirname(plugin_basename(__FILE__, '/languages/')));
15
- if (!class_exists('srm_gmap_embed_main')) {
16
-
17
- class srm_gmap_embed_main
18
- {
19
-
20
- private $plugin_name = 'Google Map SRM';
21
- public $wpgmap_api_key = 'AIzaSyD79uz_fsapIldhWBl0NqYHHGBWkxlabro';
22
-
23
-
24
- /**
25
- * constructor function
26
- */
27
- function __construct()
28
- {
29
- $this->wpgmap_api_key = get_option('wpgmap_api_key');
30
- add_action('activated_plugin', array($this, 'wpgmap_do_after_activation'), 10, 2);
31
- add_action('wp_enqueue_scripts', array($this, 'gmap_enqueue_scripts'));
32
- add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_gmap_scripts'));
33
- add_action('admin_menu', array($this, 'gmap_create_menu'));
34
- add_action('admin_init', array($this, 'gmap_register_fields'));
35
- add_action('wp_ajax_wpgmapembed_save_map_data', array($this, 'save_wpgmapembed_data'));
36
- add_action('wp_ajax_wpgmapembed_load_map_data', array($this, 'load_wpgmapembed_list'));
37
- add_action('wp_ajax_wpgmapembed_popup_load_map_data', array($this, 'load_popup_wpgmapembed_list'));
38
- add_action('wp_ajax_wpgmapembed_get_wpgmap_data', array($this, 'get_wpgmapembed_data'));
39
- add_action('wp_ajax_wpgmapembed_remove_wpgmap', array($this, 'remove_wpgmapembed_data'));
40
- }
41
-
42
- /**
43
- * To set options values
44
- */
45
-
46
-
47
- /**
48
- * To enqueue scripts for front-end
49
- */
50
- public function gmap_enqueue_scripts()
51
- {
52
- //including map library
53
- wp_enqueue_script('srm_gmap_api', 'https://maps.googleapis.com/maps/api/js?key=' . $this->wpgmap_api_key . '&libraries=places', array('jquery'));
54
- }
55
-
56
- function enqueue_admin_gmap_scripts()
57
- {
58
- global $pagenow;
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__));
63
- }
64
- }
65
-
66
-
67
- /**
68
- * To create menu in admin panel
69
- */
70
- public function gmap_create_menu()
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()
81
- {
82
- //register fields
83
- register_setting('gmap_settings_group', 'gmap_title');
84
- register_setting('gmap_settings_group', 'wpgmap_heading_class');
85
- register_setting('gmap_settings_group', 'gmap_lat');
86
- register_setting('gmap_settings_group', 'gmap_long');
87
- register_setting('gmap_settings_group', 'gmap_width');
88
- register_setting('gmap_settings_group', 'gmap_height');
89
- register_setting('gmap_settings_group', 'gmap_zoom');
90
- register_setting('gmap_settings_group', 'gmap_disable_zoom_scroll');
91
- register_setting('gmap_settings_group', 'gmap_type');
92
- }
93
-
94
- /**
95
- * Google Map Embed Mail Page
96
- */
97
- public function srm_gmap_main()
98
- {
99
- require plugin_dir_path(__FILE__) . '/includes/gmap.php';
100
- }
101
-
102
- /*
103
- * To update post meta data
104
- */
105
-
106
- public function __update_post_meta($post_id, $field_name, $value = '')
107
- {
108
- if (!get_post_meta($post_id, $field_name)) {
109
- add_post_meta($post_id, $field_name, $value);
110
- } else {
111
- update_post_meta($post_id, $field_name, $value);
112
- }
113
- }
114
-
115
- /**
116
- * To save New Map Data
117
- */
118
-
119
- public function save_wpgmapembed_data()
120
- {
121
- $error = '';
122
- // Getting ajax fileds value
123
- $meta_data = array(
124
- 'wpgmap_title' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_title'])),
125
- 'wpgmap_heading_class' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_heading_class'])),
126
- 'wpgmap_show_heading' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_show_heading'])),
127
- 'wpgmap_latlng' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_latlng'])),
128
- 'wpgmap_map_zoom' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_map_zoom'])),
129
- 'wpgmap_disable_zoom_scroll' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_disable_zoom_scroll'])),
130
- 'wpgmap_map_width' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_map_width'])),
131
- 'wpgmap_map_height' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_map_height'])),
132
- 'wpgmap_map_type' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_map_type'])),
133
- 'wpgmap_map_address' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_map_address'])),
134
- 'wpgmap_show_infowindow' => sanitize_text_field($_POST['map_data']['wpgmap_show_infowindow']),
135
- 'wpgmap_enable_direction' => sanitize_text_field($_POST['map_data']['wpgmap_enable_direction'])
136
- );
137
- $action_type = sanitize_text_field(esc_html($_POST['map_data']['action_type']));
138
- if ($meta_data['wpgmap_latlng'] == '') {
139
- $error = "Please input Latitude and Longitude";
140
- }
141
- if (strlen($error) > 0) {
142
- echo json_encode(array(
143
- 'responseCode' => 0,
144
- 'message' => $error
145
- ));
146
- exit;
147
- } else {
148
-
149
- if ($action_type == 'save') {
150
- // saving post array
151
- $post_array = array(
152
- 'post_type' => 'wpgmapembed'
153
- );
154
- $post_id = wp_insert_post($post_array);
155
-
156
- } elseif ($action_type == 'update') {
157
- $post_id = intval($_POST['map_data']['post_id']);
158
- }
159
-
160
- // Updating post meta
161
- foreach ($meta_data as $key => $value) {
162
- $this->__update_post_meta($post_id, $key, $value);
163
- }
164
- $returnArray = array(
165
- 'responseCode' => 1,
166
- 'post_id' => $post_id
167
- );
168
- if ($action_type == 'save') {
169
- $returnArray['message'] = 'Created Successfully.';
170
- } elseif ($action_type == 'update') {
171
- $returnArray['message'] = 'Updated Successfully.';
172
- }
173
- echo json_encode($returnArray);
174
- exit;
175
- }
176
- }
177
-
178
- public function load_wpgmapembed_list()
179
- {
180
- $content = '';
181
- $args = array(
182
- 'post_type' => 'wpgmapembed',
183
- 'posts_per_page'=>-1
184
- );
185
- $mapsList = new WP_Query($args);
186
-
187
- if ($mapsList->have_posts()) {
188
- while ($mapsList->have_posts()) {
189
- $mapsList->the_post();
190
- $title = get_post_meta(get_the_ID(), 'wpgmap_title', true);
191
- $content .= '<div class="wp-gmap-single">
192
- <div class="wp-gmap-single-left">
193
- <div class="wp-gmap-single-title">
194
- ' . $title . '
195
- </div>
196
- <div class="wp-gmap-single-shortcode">
197
- <input class="wpgmap-shortcode regular-text" type="text" value="' . esc_attr('[gmap-embed id=&quot;' . get_the_ID() . '&quot;]') . '"
198
- onclick="this.select()"/>
199
- </div>
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;">
207
- X
208
- </button>
209
- </div>
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&amp;tag=new"
215
- data-id="wp-gmap-new" class="media-menu-item">'.__("Create New Map","gmap-embed").'</a>';
216
- }
217
-
218
- echo $content;
219
-
220
-
221
- }
222
-
223
- public function load_popup_wpgmapembed_list()
224
- {
225
- $content = '';
226
- $args = array(
227
- 'post_type' => 'wpgmapembed'
228
- );
229
- $mapsList = new WP_Query($args);
230
-
231
- while ($mapsList->have_posts()) {
232
- $mapsList->the_post();
233
- $title = get_post_meta(get_the_ID(), 'wpgmap_title', true);
234
- $content .= '<div class="wp-gmap-single">
235
- <div class="wp-gmap-single-left">
236
- <div class="wp-gmap-single-title">
237
- ' . $title . '
238
- </div>
239
- <div class="wp-gmap-single-shortcode">
240
- <input class="wpgmap-shortcode regular-text" type="text" value="[gmap-embed id=&quot;' . get_the_ID() . '&quot;]"
241
- onclick="this.select()"/>
242
- </div>
243
- </div>
244
- <div class="wp-gmap-single-action">
245
- <button type="button"
246
- class="button media-button button-primary button-large wpgmap-insert-shortcode">
247
- Insert
248
- </button>
249
- </div>
250
- </div>';
251
- }
252
- echo $content;
253
- exit;
254
-
255
-
256
- }
257
-
258
- public function get_wpgmapembed_data($gmap_id = '')
259
- {
260
- if ($gmap_id == '') {
261
- $gmap_id = intval($_POST['wpgmap_id']);
262
- }
263
-
264
- $gmap_data = array(
265
- 'wpgmap_title' => get_post_meta($gmap_id, 'wpgmap_title', true),
266
- 'wpgmap_heading_class' => get_post_meta($gmap_id, 'wpgmap_heading_class', true),
267
- 'wpgmap_show_heading' => get_post_meta($gmap_id, 'wpgmap_show_heading', true),
268
- 'wpgmap_latlng' => get_post_meta($gmap_id, 'wpgmap_latlng', true),
269
- 'wpgmap_map_zoom' => get_post_meta($gmap_id, 'wpgmap_map_zoom', true),
270
- 'wpgmap_disable_zoom_scroll' => get_post_meta($gmap_id, 'wpgmap_disable_zoom_scroll', true),
271
- 'wpgmap_map_width' => get_post_meta($gmap_id, 'wpgmap_map_width', true),
272
- 'wpgmap_map_height' => get_post_meta($gmap_id, 'wpgmap_map_height', true),
273
- 'wpgmap_map_type' => get_post_meta($gmap_id, 'wpgmap_map_type', true),
274
- 'wpgmap_map_address' => get_post_meta($gmap_id, 'wpgmap_map_address', true),
275
- 'wpgmap_show_infowindow' => get_post_meta($gmap_id, 'wpgmap_show_infowindow', true),
276
- 'wpgmap_enable_direction' => get_post_meta($gmap_id, 'wpgmap_enable_direction', true)
277
- );
278
-
279
- return json_encode($gmap_data);
280
- }
281
-
282
- public function remove_wpgmapembed_data()
283
- {
284
-
285
- $meta_data = array(
286
- 'wpgmap_title',
287
- 'wpgmap_heading_class',
288
- 'wpgmap_show_heading',
289
- 'wpgmap_latlng',
290
- 'wpgmap_map_zoom',
291
- 'wpgmap_disable_zoom_scroll',
292
- 'wpgmap_map_width',
293
- 'wpgmap_map_height',
294
- 'wpgmap_map_type',
295
- 'wpgmap_map_address',
296
- 'wpgmap_show_infowindow',
297
- 'wpgmap_enable_direction'
298
- );
299
-
300
- $post_id = intval($_POST['post_id']);
301
- wp_delete_post($post_id);
302
- foreach ($meta_data as $field_name => $value) {
303
- delete_post_meta($post_id, $field_name, $value);
304
- }
305
- $returnArray = array(
306
- 'responseCode' => 1,
307
- 'message' => "Deleted Successfully."
308
- );
309
- echo json_encode($returnArray);
310
- exit;
311
- }
312
-
313
- /**
314
- * Works on when plugin is activated successfully
315
- */
316
-
317
- function wpgmap_do_after_activation($plugin, $network_activation)
318
- {
319
- // do stuff
320
- if ($plugin == 'gmap-embed/srm_gmap_embed.php') {
321
- wp_redirect(admin_url('admin.php?page=wpgmapembed'));
322
- exit;
323
- }
324
- }
325
-
326
- }
327
-
328
-
329
- }
330
- new srm_gmap_embed_main();
331
- // including requird files
332
- require_once plugin_dir_path(__FILE__) . '/includes/widget.php';
333
- require_once plugin_dir_path(__FILE__) . '/includes/shortcodes.php';
334
-
335
- if ($pagenow == 'post.php' || $pagenow == 'post-new.php') {
336
- require_once plugin_dir_path(__FILE__) . '/includes/wpgmap_popup_content.php';
337
- }
338
-
339
  load_plugin_textdomain('gmap-embed', false, dirname(plugin_basename(__FILE__)) . '/languages');
1
+ <?php
2
+ /*
3
+ Plugin Name: Google Map Embed
4
+ Plugin URI: http://www.srmilon.com
5
+ Description: The plugin will help to embed Google Map in post and pages also in sidebar as widget.
6
+ Author: SRMILON
7
+ Text Domain: gmap-embed
8
+ Domain Path: /languages
9
+ Author URI: http://www.srmilon.com
10
+ Version: 1.3.8
11
+ */
12
+
13
+ if (!defined('ABSPATH')) exit;
14
+ load_plugin_textdomain('gmap-embed', false, dirname(plugin_basename(__FILE__, '/languages/')));
15
+ if (!class_exists('srm_gmap_embed_main')) {
16
+
17
+ class srm_gmap_embed_main
18
+ {
19
+
20
+ private $plugin_name = 'Google Map SRM';
21
+ public $wpgmap_api_key = 'AIzaSyD79uz_fsapIldhWBl0NqYHHGBWkxlabro';
22
+
23
+
24
+ /**
25
+ * constructor function
26
+ */
27
+ function __construct()
28
+ {
29
+ $this->wpgmap_api_key = get_option('wpgmap_api_key');
30
+ add_action('activated_plugin', array($this, 'wpgmap_do_after_activation'), 10, 2);
31
+ add_action('wp_enqueue_scripts', array($this, 'gmap_enqueue_scripts'));
32
+ add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_gmap_scripts'));
33
+ add_action('admin_menu', array($this, 'gmap_create_menu'));
34
+ add_action('admin_init', array($this, 'gmap_register_fields'));
35
+ add_action('wp_ajax_wpgmapembed_save_map_data', array($this, 'save_wpgmapembed_data'));
36
+ add_action('wp_ajax_wpgmapembed_load_map_data', array($this, 'load_wpgmapembed_list'));
37
+ add_action('wp_ajax_wpgmapembed_popup_load_map_data', array($this, 'load_popup_wpgmapembed_list'));
38
+ add_action('wp_ajax_wpgmapembed_get_wpgmap_data', array($this, 'get_wpgmapembed_data'));
39
+ add_action('wp_ajax_wpgmapembed_remove_wpgmap', array($this, 'remove_wpgmapembed_data'));
40
+ }
41
+
42
+ /**
43
+ * To set options values
44
+ */
45
+
46
+
47
+ /**
48
+ * To enqueue scripts for front-end
49
+ */
50
+ public function gmap_enqueue_scripts()
51
+ {
52
+ //including map library
53
+ wp_enqueue_script('srm_gmap_api', 'https://maps.googleapis.com/maps/api/js?key=' . $this->wpgmap_api_key . '&libraries=places', array('jquery'));
54
+ }
55
+
56
+ function enqueue_admin_gmap_scripts()
57
+ {
58
+ global $pagenow;
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__));
63
+ }
64
+ }
65
+
66
+
67
+ /**
68
+ * To create menu in admin panel
69
+ */
70
+ public function gmap_create_menu()
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()
81
+ {
82
+ //register fields
83
+ register_setting('gmap_settings_group', 'gmap_title');
84
+ register_setting('gmap_settings_group', 'wpgmap_heading_class');
85
+ register_setting('gmap_settings_group', 'gmap_lat');
86
+ register_setting('gmap_settings_group', 'gmap_long');
87
+ register_setting('gmap_settings_group', 'gmap_width');
88
+ register_setting('gmap_settings_group', 'gmap_height');
89
+ register_setting('gmap_settings_group', 'gmap_zoom');
90
+ register_setting('gmap_settings_group', 'gmap_disable_zoom_scroll');
91
+ register_setting('gmap_settings_group', 'gmap_type');
92
+ }
93
+
94
+ /**
95
+ * Google Map Embed Mail Page
96
+ */
97
+ public function srm_gmap_main()
98
+ {
99
+ require plugin_dir_path(__FILE__) . '/includes/gmap.php';
100
+ }
101
+
102
+ /*
103
+ * To update post meta data
104
+ */
105
+
106
+ public function __update_post_meta($post_id, $field_name, $value = '')
107
+ {
108
+ if (!get_post_meta($post_id, $field_name)) {
109
+ add_post_meta($post_id, $field_name, $value);
110
+ } else {
111
+ update_post_meta($post_id, $field_name, $value);
112
+ }
113
+ }
114
+
115
+ /**
116
+ * To save New Map Data
117
+ */
118
+
119
+ public function save_wpgmapembed_data()
120
+ {
121
+ $error = '';
122
+ // Getting ajax fileds value
123
+ $meta_data = array(
124
+ 'wpgmap_title' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_title'])),
125
+ 'wpgmap_heading_class' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_heading_class'])),
126
+ 'wpgmap_show_heading' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_show_heading'])),
127
+ 'wpgmap_latlng' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_latlng'])),
128
+ 'wpgmap_map_zoom' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_map_zoom'])),
129
+ 'wpgmap_disable_zoom_scroll' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_disable_zoom_scroll'])),
130
+ 'wpgmap_map_width' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_map_width'])),
131
+ 'wpgmap_map_height' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_map_height'])),
132
+ 'wpgmap_map_type' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_map_type'])),
133
+ 'wpgmap_map_address' => sanitize_text_field(esc_html($_POST['map_data']['wpgmap_map_address'])),
134
+ 'wpgmap_show_infowindow' => sanitize_text_field($_POST['map_data']['wpgmap_show_infowindow']),
135
+ 'wpgmap_enable_direction' => sanitize_text_field($_POST['map_data']['wpgmap_enable_direction'])
136
+ );
137
+ $action_type = sanitize_text_field(esc_html($_POST['map_data']['action_type']));
138
+ if ($meta_data['wpgmap_latlng'] == '') {
139
+ $error = "Please input Latitude and Longitude";
140
+ }
141
+ if (strlen($error) > 0) {
142
+ echo json_encode(array(
143
+ 'responseCode' => 0,
144
+ 'message' => $error
145
+ ));
146
+ exit;
147
+ } else {
148
+
149
+ if ($action_type == 'save') {
150
+ // saving post array
151
+ $post_array = array(
152
+ 'post_type' => 'wpgmapembed'
153
+ );
154
+ $post_id = wp_insert_post($post_array);
155
+
156
+ } elseif ($action_type == 'update') {
157
+ $post_id = intval($_POST['map_data']['post_id']);
158
+ }
159
+
160
+ // Updating post meta
161
+ foreach ($meta_data as $key => $value) {
162
+ $this->__update_post_meta($post_id, $key, $value);
163
+ }
164
+ $returnArray = array(
165
+ 'responseCode' => 1,
166
+ 'post_id' => $post_id
167
+ );
168
+ if ($action_type == 'save') {
169
+ $returnArray['message'] = 'Created Successfully.';
170
+ } elseif ($action_type == 'update') {
171
+ $returnArray['message'] = 'Updated Successfully.';
172
+ }
173
+ echo json_encode($returnArray);
174
+ exit;
175
+ }
176
+ }
177
+
178
+ public function load_wpgmapembed_list()
179
+ {
180
+ $content = '';
181
+ $args = array(
182
+ 'post_type' => 'wpgmapembed',
183
+ 'posts_per_page'=>-1
184
+ );
185
+ $mapsList = new WP_Query($args);
186
+
187
+ if ($mapsList->have_posts()) {
188
+ while ($mapsList->have_posts()) {
189
+ $mapsList->the_post();
190
+ $title = get_post_meta(get_the_ID(), 'wpgmap_title', true);
191
+ $content .= '<div class="wp-gmap-single">
192
+ <div class="wp-gmap-single-left">
193
+ <div class="wp-gmap-single-title">
194
+ ' . $title . '
195
+ </div>
196
+ <div class="wp-gmap-single-shortcode">
197
+ <input class="wpgmap-shortcode regular-text" type="text" value="' . esc_attr('[gmap-embed id=&quot;' . get_the_ID() . '&quot;]') . '"
198
+ onclick="this.select()"/>
199
+ </div>
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;">
207
+ X
208
+ </button>
209
+ </div>
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&amp;tag=new"
215
+ data-id="wp-gmap-new" class="media-menu-item">'.__("Create New Map","gmap-embed").'</a>';
216
+ }
217
+
218
+ echo $content;
219
+
220
+
221
+ }
222
+
223
+ public function load_popup_wpgmapembed_list()
224
+ {
225
+ $content = '';
226
+ $args = array(
227
+ 'post_type' => 'wpgmapembed'
228
+ );
229
+ $mapsList = new WP_Query($args);
230
+
231
+ while ($mapsList->have_posts()) {
232
+ $mapsList->the_post();
233
+ $title = get_post_meta(get_the_ID(), 'wpgmap_title', true);
234
+ $content .= '<div class="wp-gmap-single">
235
+ <div class="wp-gmap-single-left">
236
+ <div class="wp-gmap-single-title">
237
+ ' . $title . '
238
+ </div>
239
+ <div class="wp-gmap-single-shortcode">
240
+ <input class="wpgmap-shortcode regular-text" type="text" value="[gmap-embed id=&quot;' . get_the_ID() . '&quot;]"
241
+ onclick="this.select()"/>
242
+ </div>
243
+ </div>
244
+ <div class="wp-gmap-single-action">
245
+ <button type="button"
246
+ class="button media-button button-primary button-large wpgmap-insert-shortcode">
247
+ Insert
248
+ </button>
249
+ </div>
250
+ </div>';
251
+ }
252
+ echo $content;
253
+ exit;
254
+
255
+
256
+ }
257
+
258
+ public function get_wpgmapembed_data($gmap_id = '')
259
+ {
260
+ if ($gmap_id == '') {
261
+ $gmap_id = intval($_POST['wpgmap_id']);
262
+ }
263
+
264
+ $gmap_data = array(
265
+ 'wpgmap_title' => get_post_meta($gmap_id, 'wpgmap_title', true),
266
+ 'wpgmap_heading_class' => get_post_meta($gmap_id, 'wpgmap_heading_class', true),
267
+ 'wpgmap_show_heading' => get_post_meta($gmap_id, 'wpgmap_show_heading', true),
268
+ 'wpgmap_latlng' => get_post_meta($gmap_id, 'wpgmap_latlng', true),
269
+ 'wpgmap_map_zoom' => get_post_meta($gmap_id, 'wpgmap_map_zoom', true),
270
+ 'wpgmap_disable_zoom_scroll' => get_post_meta($gmap_id, 'wpgmap_disable_zoom_scroll', true),
271
+ 'wpgmap_map_width' => get_post_meta($gmap_id, 'wpgmap_map_width', true),
272
+ 'wpgmap_map_height' => get_post_meta($gmap_id, 'wpgmap_map_height', true),
273
+ 'wpgmap_map_type' => get_post_meta($gmap_id, 'wpgmap_map_type', true),
274
+ 'wpgmap_map_address' => get_post_meta($gmap_id, 'wpgmap_map_address', true),
275
+ 'wpgmap_show_infowindow' => get_post_meta($gmap_id, 'wpgmap_show_infowindow', true),
276
+ 'wpgmap_enable_direction' => get_post_meta($gmap_id, 'wpgmap_enable_direction', true)
277
+ );
278
+
279
+ return json_encode($gmap_data);
280
+ }
281
+
282
+ public function remove_wpgmapembed_data()
283
+ {
284
+
285
+ $meta_data = array(
286
+ 'wpgmap_title',
287
+ 'wpgmap_heading_class',
288
+ 'wpgmap_show_heading',
289
+ 'wpgmap_latlng',
290
+ 'wpgmap_map_zoom',
291
+ 'wpgmap_disable_zoom_scroll',
292
+ 'wpgmap_map_width',
293
+ 'wpgmap_map_height',
294
+ 'wpgmap_map_type',
295
+ 'wpgmap_map_address',
296
+ 'wpgmap_show_infowindow',
297
+ 'wpgmap_enable_direction'
298
+ );
299
+
300
+ $post_id = intval($_POST['post_id']);
301
+ wp_delete_post($post_id);
302
+ foreach ($meta_data as $field_name => $value) {
303
+ delete_post_meta($post_id, $field_name, $value);
304
+ }
305
+ $returnArray = array(
306
+ 'responseCode' => 1,
307
+ 'message' => "Deleted Successfully."
308
+ );
309
+ echo json_encode($returnArray);
310
+ exit;
311
+ }
312
+
313
+ /**
314
+ * Works on when plugin is activated successfully
315
+ */
316
+
317
+ function wpgmap_do_after_activation($plugin, $network_activation)
318
+ {
319
+ // do stuff
320
+ if ($plugin == 'gmap-embed/srm_gmap_embed.php') {
321
+ wp_redirect(admin_url('admin.php?page=wpgmapembed'));
322
+ exit;
323
+ }
324
+ }
325
+
326
+ }
327
+
328
+
329
+ }
330
+ new srm_gmap_embed_main();
331
+ // including requird files
332
+ require_once plugin_dir_path(__FILE__) . '/includes/widget.php';
333
+ require_once plugin_dir_path(__FILE__) . '/includes/shortcodes.php';
334
+
335
+ if ($pagenow == 'post.php' || $pagenow == 'post-new.php') {
336
+ require_once plugin_dir_path(__FILE__) . '/includes/wpgmap_popup_content.php';
337
+ }
338
+
339
  load_plugin_textdomain('gmap-embed', false, dirname(plugin_basename(__FILE__)) . '/languages');