PluginProbe
Maps Plugin using Google Maps for WordPress – WP Google Map / 1.5.2
Maps Plugin using Google Maps for WordPress – WP Google Map v1.5.2
1.9.7 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.2 1.5.3 All 96 releases
gmap-embed / includes / wpgmap_edit.php

wpgmap_edit.php in Maps Plugin using Google Maps for WordPress – WP Google Map 1.5.2, at includes/wpgmap_edit.php

153 lines 7.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 <h1 id="wpgmap_heading_preview" style="padding: 0px;margin: 0px;"><?php echo $wpgmap_single->wpgmap_title;?></h1>
126 <input id="pac-input" class="controls" type="text" placeholder="<?php _e('Search by Address, Zip Code','gmap-embed');?>"/>
127 <div id="map" style="height: 415px;"></div>
128 </div>
129 <script type="text/javascript"
130 src="<?php echo esc_url(plugins_url("../assets/js/geo_based_map_edit.js?v=1.4.9", __FILE__)); ?>"></script>
131 <script>
132 (function ($) {
133 $(function () {
134 google.maps.event.addDomListener(window, 'load',
135 initAutocomplete('map', 'pac-input',<?php echo $wpgmap_lat;?>,<?php echo $wpgmap_lng;?>, '<?php echo $wpgmap_single->wpgmap_map_type; ?>',<?php echo $wpgmap_single->wpgmap_map_zoom;?>,'edit')
136 );
137 if (jQuery('#wpgmap_show_infowindow').is(':checked') === true) {
138 openInfoWindow();
139 }
140 });
141 })(jQuery);
142 </script>
143 </div>
144
145 <div class="media-frame-toolbar">
146 <div class="media-toolbar">
147 <div class="media-toolbar-secondary"
148 style="text-align: right;float: right;margin-top:10px;">
149 <span class="spinner" style="margin: 0px !important;float:left;"></span>
150 <button class="button button-primary" style="margin-right:10px;" id="wp-gmap-embed-update"><?php _e('Update','gmap-embed');?></button>
151 </div>
152 </div>
153 </div>