Changeset 1552337
- Timestamp:
- 12/12/2016 06:29:57 AM (9 years ago)
- Location:
- tcbd-google-map
- Files:
-
- 17 added
- 7 edited
-
assets/screenshot-1.png (modified) (previous)
-
tags/1.2 (added)
-
tags/1.2/css (added)
-
tags/1.2/css/tcbd-map-css.css (added)
-
tags/1.2/img (added)
-
tags/1.2/img/style-1.png (added)
-
tags/1.2/img/style-2.png (added)
-
tags/1.2/inc (added)
-
tags/1.2/inc/settings.php (added)
-
tags/1.2/js (added)
-
tags/1.2/js/icon.png (added)
-
tags/1.2/js/tcbd-maplace-0.1.3.min.js (added)
-
tags/1.2/js/tinymce.js (added)
-
tags/1.2/plugin-hook.php (added)
-
tags/1.2/readme.txt (added)
-
tags/1.2/uninstall.php (added)
-
trunk/img/style-1.png (modified) (previous)
-
trunk/img/style-2.png (modified) (previous)
-
trunk/img/style-3.png (added)
-
trunk/img/style-4.png (added)
-
trunk/inc/settings.php (modified) (8 diffs)
-
trunk/plugin-hook.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tcbd-google-map/trunk/inc/settings.php
r1281716 r1552337 19 19 register_setting( 'TCBD_Google_Map_register_setting', 'tcbd_google_map_style' ); 20 20 register_setting( 'TCBD_Google_Map_register_setting', 'tcbd_google_map_scroll_zoom' ); 21 register_setting( 'TCBD_Google_Map_register_setting', 'tcbd_google_map_api_key' ); 21 22 } 22 23 add_action( 'admin_init', 'TCBD_Google_Map_register_settings' ); … … 48 49 } 49 50 51 if( get_option('tcbd_google_map_api_key') ){ 52 $tcbd_google_map_api = get_option('tcbd_google_map_api_key'); 53 }else{ 54 $tcbd_google_map_api = null; 55 } 56 50 57 51 58 ?> 52 59 <div class="wrap"> 53 <h2 >TCBD Google Map Settings</h2>60 <h2 style="margin-bottom: 30px;">TCBD Google Map Settings</h2> 54 61 55 62 <?php if( isset($_GET['settings-updated']) && $_GET['settings-updated'] ){ ?> … … 59 66 </div> 60 67 <?php } ?> 68 61 69 62 70 <form method="post" action="options.php"> 63 71 <?php settings_fields( 'TCBD_Google_Map_register_setting' ); ?> 64 72 73 <div class="error updated settings-error notice is-dismissible"> 74 <h1>Important Notification</h1> 75 <p></p> 76 <p><strong>*ALL* Google Maps now require an API key to function.</strong> <a href="https://googlegeodevelopers.blogspot.co.za/2016/06/building-for-scale-updates-to-google.html" target="_BLANK">You can read more about that here.</a></p> 77 <p>Before creating a map please follow these steps:</p> 78 <ol> 79 <li> 80 <a target="_BLANK" href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&keyType=CLIENT_SIDE&reusekey=true" class="">Create an API key now (free)</a> 81 </li> 82 <li> 83 Paste your API key and press 'Save Changes'. 84 </li> 85 </ol> 86 <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button> 87 </div> 88 65 89 <table class="form-table"> 66 90 <tbody> 67 91 68 92 <tr> 93 <th scope="row"><label for="tcbd_google_maps_api_key">Google Map API Key:</label></th> 94 <td> 95 <input class="regular-text" name="tcbd_google_map_api_key" type="text" id="tcbd_google_maps_api_key" value="<?php echo esc_attr( $tcbd_google_map_api ); ?>" placeholder="Google Maps JavaScript API Key"> 96 <p class="description">Create an API key from <a target="_blank" href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&keyType=CLIENT_SIDE&reusekey=true">Here.</a></p> 97 </td> 98 </tr> 99 100 <tr> 69 101 <th scope="row"><label for="tcbd_google_map_latitude">Latitude Number:</label></th> 70 102 <td> … … 83 115 84 116 <tr> 85 <th scope="row"><label for="tcbd_google_map_zoom">Map Zoom :</label></th>117 <th scope="row"><label for="tcbd_google_map_zoom">Map Zoom Level:</label></th> 86 118 <td> 87 119 <input class="regular-text" name="tcbd_google_map_zoom" type="text" id="tcbd_google_map_zoom" value="<?php echo esc_attr( $map_zoom ); ?>"> … … 90 122 91 123 <tr> 92 <th scope="row"><label for="tcbd_google_map_marker"> ShowMarker:</label></th>124 <th scope="row"><label for="tcbd_google_map_marker">Map Marker:</label></th> 93 125 <td> 94 126 <?php … … 101 133 <label for="tcbd_google_map_marker"> 102 134 <input type="checkbox" id="tcbd_google_map_marker" name="tcbd_google_map_marker" value="1" <?php checked( 1, $show_marker ); ?> > 103 You may turn on/off the Google Map Marker icon.135 On 104 136 </label> 105 137 </td> … … 118 150 <label for="tcbd_google_map_scroll_zoom"> 119 151 <input type="checkbox" id="tcbd_google_map_scroll_zoom" name="tcbd_google_map_scroll_zoom" value="1" <?php checked( 1, $show_marker ); ?> > 120 You may turn on/off the Google Map Mousewheel Scroll zoom.152 On 121 153 </label> 122 154 </td> … … 130 162 $map_style = get_option( 'tcbd_google_map_style' ); 131 163 }else{ 132 $map_style = 0;164 $map_style = 1; 133 165 } 134 166 ?> 135 <label title="Style 1"> 136 <input type="radio" name="tcbd_google_map_style" value="0" <?php checked( $map_style, '0' ); ?> > <span class="tcbd-map-text">Style 1</span> 137 <span class="tcbd-map-image"><img src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-2.png" alt="" /></span> 138 </label> 139 <label title="Style 2"> 140 <input id="tcbd_google_map_style" type="radio" name="tcbd_google_map_style" value="1" <?php checked( $map_style, '1' ); ?> > <span class="tcbd-map-text">Style 2</span> 141 <span class="tcbd-map-image"><img src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-1.png" alt="" /></span> 167 <label style="margin-bottom: 15px;" title="Style 1"> 168 <input type="radio" name="tcbd_google_map_style" value="1" <?php checked( $map_style, '1' ); ?> > <span class="tcbd-map-text">Style 1</span> 169 <span class="tcbd-map-image"><img style="margin-top: 10px;" src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-1.png" alt="" /></span> 170 </label> 171 <label style="margin-bottom: 15px;" title="Style 2"> 172 <input id="tcbd_google_map_style" type="radio" name="tcbd_google_map_style" value="2" <?php checked( $map_style, '2' ); ?> > <span class="tcbd-map-text">Style 2</span> 173 <span class="tcbd-map-image"><img style="margin-top: 10px;" src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-2.png" alt="" /></span> 174 </label> 175 <label style="margin-bottom: 15px;" title="Style 3"> 176 <input id="tcbd_google_map_style" type="radio" name="tcbd_google_map_style" value="3" <?php checked( $map_style, '3' ); ?> > <span class="tcbd-map-text">Style 3</span> 177 <span class="tcbd-map-image"><img style="margin-top: 10px;" src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-3.png" alt="" /></span> 178 </label> 179 <label style="margin-bottom: 15px;" title="Style 4"> 180 <input id="tcbd_google_map_style" type="radio" name="tcbd_google_map_style" value="4" <?php checked( $map_style, '4' ); ?> > <span class="tcbd-map-text">Style 4</span> 181 <span class="tcbd-map-image"><img style="margin-top: 10px;" src="<?php echo TCBD_GOOGLE_MAP_PLUGIN_URL ?>/img/style-4.png" alt="" /></span> 142 182 </label> 143 183 </td> -
tcbd-google-map/trunk/plugin-hook.php
r1281716 r1552337 2 2 /* 3 3 Plugin Name: TCBD Google Map 4 Plugin URI: http:// demos.tcoderbd.com/wordpress_plugins/tcbd-google-map-awesome-wordpress-plugin/5 Description: This plugin will enable google map in your Wordpress theme.4 Plugin URI: http://tcoderbd.com 5 Description: This plugin will enable awesome google map in your Wordpress theme. 6 6 Author: Md Touhidul Sadeek 7 Version: 1.27 Version: 2.0 8 8 Author URI: http://tcoderbd.com 9 9 */ … … 94 94 95 95 function tcbd_fb_scripts(){ 96 97 if( get_option('tcbd_google_map_api_key') ){ 98 $tcbd_google_map_api = get_option('tcbd_google_map_api_key'); 99 } 96 100 97 101 // Google Map API 98 wp_enqueue_script('tcbd-google-map', '//maps.google.com/maps/api/js?sensor=false&libraries=geometry&v=3.7 ');102 wp_enqueue_script('tcbd-google-map', '//maps.google.com/maps/api/js?sensor=false&libraries=geometry&v=3.7&key='.$tcbd_google_map_api.''); 99 103 100 104 // Latest jQuery WordPress … … 167 171 zoom: <?php echo $map_zoom; ?> 168 172 }] 169 <?php if( $map_style == 1): ?>173 <?php if( $map_style == 2 ): ?> 170 174 ,styles: { 171 175 'Night': [{ … … 184 188 } 185 189 <?php endif; ?> 186 <?php if( $scroll_zoom == 1 ): ?> 190 <?php if( $map_style == 3 ): ?> 191 ,styles: { 192 'Night': [ 193 { 194 "featureType": "administrative.locality", 195 "elementType": "all", 196 "stylers": [ 197 { 198 "hue": "#2c2e33" 199 }, 200 { 201 "saturation": 7 202 }, 203 { 204 "lightness": 19 205 }, 206 { 207 "visibility": "on" 208 } 209 ] 210 }, 211 { 212 "featureType": "landscape", 213 "elementType": "all", 214 "stylers": [ 215 { 216 "hue": "#ffffff" 217 }, 218 { 219 "saturation": -100 220 }, 221 { 222 "lightness": 100 223 }, 224 { 225 "visibility": "simplified" 226 } 227 ] 228 }, 229 { 230 "featureType": "poi", 231 "elementType": "all", 232 "stylers": [ 233 { 234 "hue": "#ffffff" 235 }, 236 { 237 "saturation": -100 238 }, 239 { 240 "lightness": 100 241 }, 242 { 243 "visibility": "off" 244 } 245 ] 246 }, 247 { 248 "featureType": "road", 249 "elementType": "geometry", 250 "stylers": [ 251 { 252 "hue": "#bbc0c4" 253 }, 254 { 255 "saturation": -93 256 }, 257 { 258 "lightness": 31 259 }, 260 { 261 "visibility": "simplified" 262 } 263 ] 264 }, 265 { 266 "featureType": "road", 267 "elementType": "labels", 268 "stylers": [ 269 { 270 "hue": "#bbc0c4" 271 }, 272 { 273 "saturation": -93 274 }, 275 { 276 "lightness": 31 277 }, 278 { 279 "visibility": "on" 280 } 281 ] 282 }, 283 { 284 "featureType": "road.arterial", 285 "elementType": "labels", 286 "stylers": [ 287 { 288 "hue": "#bbc0c4" 289 }, 290 { 291 "saturation": -93 292 }, 293 { 294 "lightness": -2 295 }, 296 { 297 "visibility": "simplified" 298 } 299 ] 300 }, 301 { 302 "featureType": "road.local", 303 "elementType": "geometry", 304 "stylers": [ 305 { 306 "hue": "#e9ebed" 307 }, 308 { 309 "saturation": -90 310 }, 311 { 312 "lightness": -8 313 }, 314 { 315 "visibility": "simplified" 316 } 317 ] 318 }, 319 { 320 "featureType": "transit", 321 "elementType": "all", 322 "stylers": [ 323 { 324 "hue": "#e9ebed" 325 }, 326 { 327 "saturation": 10 328 }, 329 { 330 "lightness": 69 331 }, 332 { 333 "visibility": "on" 334 } 335 ] 336 }, 337 { 338 "featureType": "water", 339 "elementType": "all", 340 "stylers": [ 341 { 342 "hue": "#e9ebed" 343 }, 344 { 345 "saturation": -78 346 }, 347 { 348 "lightness": 67 349 }, 350 { 351 "visibility": "simplified" 352 } 353 ] 354 } 355 ] 356 } 357 <?php endif; ?> 358 <?php if( $map_style == 4 ): ?> 359 ,styles: { 360 'G': [ 361 { 362 "featureType": "all", 363 "elementType": "labels.text.fill", 364 "stylers": [ 365 { 366 "saturation": 36 367 }, 368 { 369 "color": "#000000" 370 }, 371 { 372 "lightness": 40 373 } 374 ] 375 }, 376 { 377 "featureType": "all", 378 "elementType": "labels.text.stroke", 379 "stylers": [ 380 { 381 "visibility": "on" 382 }, 383 { 384 "color": "#000000" 385 }, 386 { 387 "lightness": 16 388 } 389 ] 390 }, 391 { 392 "featureType": "all", 393 "elementType": "labels.icon", 394 "stylers": [ 395 { 396 "visibility": "off" 397 } 398 ] 399 }, 400 { 401 "featureType": "administrative", 402 "elementType": "geometry.fill", 403 "stylers": [ 404 { 405 "color": "#000000" 406 }, 407 { 408 "lightness": 20 409 } 410 ] 411 }, 412 { 413 "featureType": "administrative", 414 "elementType": "geometry.stroke", 415 "stylers": [ 416 { 417 "color": "#000000" 418 }, 419 { 420 "lightness": 17 421 }, 422 { 423 "weight": 1.2 424 } 425 ] 426 }, 427 { 428 "featureType": "landscape", 429 "elementType": "geometry", 430 "stylers": [ 431 { 432 "color": "#000000" 433 }, 434 { 435 "lightness": 20 436 } 437 ] 438 }, 439 { 440 "featureType": "poi", 441 "elementType": "geometry", 442 "stylers": [ 443 { 444 "color": "#000000" 445 }, 446 { 447 "lightness": 21 448 } 449 ] 450 }, 451 { 452 "featureType": "road.highway", 453 "elementType": "geometry.fill", 454 "stylers": [ 455 { 456 "color": "#000000" 457 }, 458 { 459 "lightness": 17 460 } 461 ] 462 }, 463 { 464 "featureType": "road.highway", 465 "elementType": "geometry.stroke", 466 "stylers": [ 467 { 468 "color": "#000000" 469 }, 470 { 471 "lightness": 29 472 }, 473 { 474 "weight": 0.2 475 } 476 ] 477 }, 478 { 479 "featureType": "road.arterial", 480 "elementType": "geometry", 481 "stylers": [ 482 { 483 "color": "#000000" 484 }, 485 { 486 "lightness": 18 487 } 488 ] 489 }, 490 { 491 "featureType": "road.local", 492 "elementType": "geometry", 493 "stylers": [ 494 { 495 "color": "#000000" 496 }, 497 { 498 "lightness": 16 499 } 500 ] 501 }, 502 { 503 "featureType": "transit", 504 "elementType": "geometry", 505 "stylers": [ 506 { 507 "color": "#000000" 508 }, 509 { 510 "lightness": 19 511 } 512 ] 513 }, 514 { 515 "featureType": "water", 516 "elementType": "geometry", 517 "stylers": [ 518 { 519 "color": "#000000" 520 }, 521 { 522 "lightness": 17 523 } 524 ] 525 } 526 ] 527 } 528 <?php endif; ?> 529 <?php if( $scroll_zoom == 0 ): ?> 187 530 ,map_options: { 188 531 scrollwheel: false -
tcbd-google-map/trunk/readme.txt
r1281716 r1552337 3 3 Tags: address, best google maps, best maps, bing maps, cluster, cross-browser, custom google map, custom google maps, directions, easy map, geo, geo-mashup, geocoder, georss, gmaps, google earth, google map, google map plugin, google map short code, google map shortcode, google map widget, google maps, google maps v3, googlemaps, gpx, grouping, kml, latitude, location, location by address, longitude, map, map directions, map markers, map plugin, map short code, map styles, map widget, maps, marker, openstreetmap, panoramio, pin, place, point, polygons, polylines, Post, post map, posts, routes, shape, store locator, streetview, wp google map, wp google maps, wp maps 4 4 Requires at least: 3.0 5 Tested up to: 4. 3.16 Stable tag: 1.25 Tested up to: 4.7 6 Stable tag: 2.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 18 18 * Customizable. 19 19 * Map size - width & height. 20 * Style Map .20 * Style Map (4 diffrent styles). 21 21 * Zoom level. 22 22 * Mouse Wheel Scroll Zoom trun on/off. 23 23 * Turn on/off Google Map marker. 24 24 25 = Demo =26 27 * [Click Here](http://demos.tcoderbd.com/wordpress_plugins/tcbd-google-map-awesome-wordpress-plugin/)28 25 29 26 == Screenshots == … … 64 61 * Mouse Wheel Scroll Zoom trun on/off 65 62 63 = 2.0 = 64 * Google Map Api Key 65 * New 2 map style added 66 * Fix Bugs 67 -
tcbd-google-map/trunk/uninstall.php
r1281716 r1552337 20 20 delete_option('tcbd_google_map_style'); 21 21 delete_option('tcbd_google_map_scroll_zoom'); 22 delete_option('tcbd_google_map_api_key');
Note: See TracChangeset
for help on using the changeset viewer.