Google Maps CP - Version 1.0.13

Version Description

  • Fixes the issue in the plugin that clears the general settings when the updates are installed.
Download this release

Release Info

Developer codepeople
Plugin Icon 128x128 Google Maps CP
Version 1.0.13
Comparing to
See all releases

Version 1.0.13

Files changed (68) hide show
  1. codepeople-post-map.php +130 -0
  2. images/custom_post_type.jpg +0 -0
  3. images/icons/animals.png +0 -0
  4. images/icons/apple.png +0 -0
  5. images/icons/audio.png +0 -0
  6. images/icons/bar.png +0 -0
  7. images/icons/beautifulview.png +0 -0
  8. images/icons/blue-pushpin.png +0 -0
  9. images/icons/bookstore.png +0 -0
  10. images/icons/bus.png +0 -0
  11. images/icons/castle-2.png +0 -0
  12. images/icons/chapel.png +0 -0
  13. images/icons/chicken.png +0 -0
  14. images/icons/cinema.png +0 -0
  15. images/icons/coffee.png +0 -0
  16. images/icons/cruiseship.png +0 -0
  17. images/icons/cycling.png +0 -0
  18. images/icons/deer.png +0 -0
  19. images/icons/dogpark.png +0 -0
  20. images/icons/dogs_leash.png +0 -0
  21. images/icons/family.png +0 -0
  22. images/icons/field.png +0 -0
  23. images/icons/flowers.png +0 -0
  24. images/icons/friends.png +0 -0
  25. images/icons/girlfriend.png +0 -0
  26. images/icons/hiking-tourism.png +0 -0
  27. images/icons/hiking.png +0 -0
  28. images/icons/home.png +0 -0
  29. images/icons/hotel_0star.png +0 -0
  30. images/icons/iceskating.png +0 -0
  31. images/icons/information.png +0 -0
  32. images/icons/jazzclub.png +0 -0
  33. images/icons/library.png +0 -0
  34. images/icons/love_date.png +0 -0
  35. images/icons/marker.png +0 -0
  36. images/icons/notvisited.png +0 -0
  37. images/icons/nursery.png +0 -0
  38. images/icons/olympicsite.png +0 -0
  39. images/icons/peace.png +0 -0
  40. images/icons/photo.png +0 -0
  41. images/icons/pin.png +0 -0
  42. images/icons/playground.png +0 -0
  43. images/icons/shoppingmall.png +0 -0
  44. images/icons/snowy.png +0 -0
  45. images/icons/sunny.png +0 -0
  46. images/icons/supermarket.png +0 -0
  47. images/icons/teahouse.png +0 -0
  48. images/icons/temple-2.png +0 -0
  49. images/icons/university.png +0 -0
  50. images/icons/watermill.png +0 -0
  51. images/icons/webcam.png +0 -0
  52. images/icons/yoga.png +0 -0
  53. images/icons/zoo.png +0 -0
  54. images/icons/zoom.png +0 -0
  55. images/miclogo-88x31.gif +0 -0
  56. images/multiple.jpg +0 -0
  57. images/routes.jpg +0 -0
  58. include/functions.php +1353 -0
  59. js/cpm.admin.js +240 -0
  60. js/cpm.js +383 -0
  61. js/gutenberg.js +63 -0
  62. languages/codepeople-post-map-es_ES.mo +0 -0
  63. languages/codepeople-post-map-es_ES.po +767 -0
  64. languages/codepeople-post-map-fr_FR.mo +0 -0
  65. languages/codepeople-post-map-fr_FR.po +781 -0
  66. readme.txt +605 -0
  67. styles/cpm-admin-styles.css +46 -0
  68. styles/cpm-styles.css +16 -0
codepeople-post-map.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Google Maps CP
4
+ Text Domain: codepeople-post-map
5
+ Version: 1.0.13
6
+ Author: CodePeople
7
+ Author URI: http://wordpress.dwbooster.com/content-tools/codepeople-post-map
8
+ Plugin URI: http://wordpress.dwbooster.com/content-tools/codepeople-post-map
9
+ Text Domain: codepeople-post-map
10
+ Description: Google Maps CP Allows to associate geocode information to posts and display it on map. Google Maps CP display the post list as markers on map. The scale of map is determined by the markers, to display distant points is required to load a map with smaller scales. To get started: 1) Click the "Activate" link to the left of this description. 2) Go to your <a href="options-general.php?page=codepeople-post-map.php">Google Maps CP configuration</a> page and configure the maps settings. 3) Go to post edition page to enter the geolocation information.
11
+ */
12
+
13
+ define('CPM_PLUGIN_DIR', WP_PLUGIN_DIR."/".dirname(plugin_basename(__FILE__)));
14
+ define('CPM_PLUGIN_URL', plugins_url()."/".dirname(plugin_basename(__FILE__)));
15
+
16
+ require (CPM_PLUGIN_DIR.'/include/functions.php');
17
+
18
+ // Create a CPM object that contain main plugin logic
19
+ add_action( 'init', 'cpm_init');
20
+ add_action( 'admin_init', 'cpm_admin_init' );
21
+
22
+ register_activation_hook(__FILE__, 'codepeople_post_map_regiter');
23
+
24
+ if(!function_exists('codepeople_post_map_regiter')){
25
+ function codepeople_post_map_regiter(){
26
+ $cpm_master_obj = new CPM;
27
+ $cpm_master_obj->set_default_configuration();
28
+ }
29
+ }
30
+
31
+ function cpm_admin_init(){
32
+ global $cpm_master_obj;
33
+
34
+ // Insert the map's insertion form below the posts and pages editor
35
+ $form_title = __('Associate an address to the post for Google Maps association', 'codepeople-post-map');
36
+ add_meta_box('codepeople_post_map_form', $form_title, array($cpm_master_obj, 'insert_form'), 'post', 'normal');
37
+ add_meta_box('codepeople_post_map_form', $form_title, array($cpm_master_obj, 'insert_form'), 'page', 'normal');
38
+
39
+ add_action('save_post', array(&$cpm_master_obj, 'save_map'));
40
+
41
+ $plugin = plugin_basename(__FILE__);
42
+ add_filter('plugin_action_links_'.$plugin, array(&$cpm_master_obj, 'customizationLink'));
43
+
44
+ }
45
+
46
+ function cpm_init(){
47
+ load_plugin_textdomain( 'codepeople-post-map', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
48
+ global $cpm_master_obj, $cpm_objs;
49
+ $cpm_master_obj = new CPM;
50
+ $cpm_objs = array();
51
+
52
+ if(!is_admin())
53
+ {
54
+ add_shortcode('codepeople-post-map', array(&$cpm_master_obj, 'replace_shortcode'));
55
+ add_action('the_post', 'cpm_populate_points' );
56
+ add_action( 'wp_footer', 'cpm_print_points' );
57
+ add_action( 'loop_start', 'cpm_loop_start' );
58
+ add_action( 'loop_end', 'cpm_loop_end' );
59
+
60
+ add_filter('widget_text', 'do_shortcode');
61
+ }
62
+ }
63
+
64
+ if( !function_exists( 'cpm_loop_start' ) )
65
+ {
66
+ function cpm_loop_start()
67
+ {
68
+ global $cpm_in_loop;
69
+ $cpm_in_loop = true;
70
+ }
71
+ }
72
+ if( !function_exists( 'cpm_loop_end' ) )
73
+ {
74
+ function cpm_loop_end()
75
+ {
76
+ global $cpm_in_loop;
77
+ $cpm_in_loop = false;
78
+ }
79
+ }
80
+
81
+ if( !function_exists( 'cpm_populate_points' ) ){
82
+ function cpm_populate_points( $post ){
83
+ global $cpm_master_obj;
84
+ $cpm_master_obj->populate_points( $post->ID );
85
+ }
86
+ }
87
+
88
+ if( !function_exists( 'cpm_print_points' ) ){
89
+ function cpm_print_points(){
90
+ global $cpm_objs, $cpm_master_obj;
91
+
92
+ foreach( $cpm_objs as $cpm_obj ){
93
+ if( !empty( $cpm_obj->multiple ) )
94
+ {
95
+ $cpm_obj->points = $cpm_master_obj->points;
96
+ }
97
+ $cpm_obj->print_points();
98
+ }
99
+ }
100
+ }
101
+
102
+ if (!function_exists("cpm_settings")) {
103
+ function cpm_settings() {
104
+ global $cpm_master_obj;
105
+
106
+ if (!isset($cpm_master_obj)) {
107
+ return;
108
+ }
109
+
110
+ if (function_exists('add_options_page')) {
111
+ $slug = basename(__FILE__);
112
+ add_options_page('Google Maps CP', 'Google Maps CP', 'manage_options', $slug, array(&$cpm_master_obj, 'settings_page'));
113
+
114
+ add_menu_page( 'Google Maps CP', 'Google Maps CP', 'manage_options', $slug, array(&$cpm_master_obj, 'settings_page'));
115
+
116
+ add_submenu_page( $slug, 'Online Help', 'Online Help', 'read', 'google_maps_cp_help', array(&$cpm_master_obj, 'settings_page') );
117
+
118
+ add_submenu_page( $slug, 'I\'ve a Question', 'I\'ve a Question', 'read', 'google_maps_cp_question', array(&$cpm_master_obj, 'settings_page') );
119
+
120
+ add_submenu_page( $slug, 'Upgrade', 'Upgrade', 'read', 'google_maps_cp_upgrade', array(&$cpm_master_obj, 'settings_page') );
121
+ }
122
+ }
123
+ }
124
+
125
+ add_action('admin_enqueue_scripts', array(&$cpm_master_obj, 'load_admin_resources'), 1);
126
+ add_action('enqueue_block_editor_assets', array(&$cpm_master_obj, 'load_gutenberg_code'));
127
+ add_action('wp_head', array(&$cpm_master_obj, 'load_header_resources'), 10);
128
+ add_action('admin_menu', 'cpm_settings');
129
+
130
+ ?>
images/custom_post_type.jpg ADDED
Binary file
images/icons/animals.png ADDED
Binary file
images/icons/apple.png ADDED
Binary file
images/icons/audio.png ADDED
Binary file
images/icons/bar.png ADDED
Binary file
images/icons/beautifulview.png ADDED
Binary file
images/icons/blue-pushpin.png ADDED
Binary file
images/icons/bookstore.png ADDED
Binary file
images/icons/bus.png ADDED
Binary file
images/icons/castle-2.png ADDED
Binary file
images/icons/chapel.png ADDED
Binary file
images/icons/chicken.png ADDED
Binary file
images/icons/cinema.png ADDED
Binary file
images/icons/coffee.png ADDED
Binary file
images/icons/cruiseship.png ADDED
Binary file
images/icons/cycling.png ADDED
Binary file
images/icons/deer.png ADDED
Binary file
images/icons/dogpark.png ADDED
Binary file
images/icons/dogs_leash.png ADDED
Binary file
images/icons/family.png ADDED
Binary file
images/icons/field.png ADDED
Binary file
images/icons/flowers.png ADDED
Binary file
images/icons/friends.png ADDED
Binary file
images/icons/girlfriend.png ADDED
Binary file
images/icons/hiking-tourism.png ADDED
Binary file
images/icons/hiking.png ADDED
Binary file
images/icons/home.png ADDED
Binary file
images/icons/hotel_0star.png ADDED
Binary file
images/icons/iceskating.png ADDED
Binary file
images/icons/information.png ADDED
Binary file
images/icons/jazzclub.png ADDED
Binary file
images/icons/library.png ADDED
Binary file
images/icons/love_date.png ADDED
Binary file
images/icons/marker.png ADDED
Binary file
images/icons/notvisited.png ADDED
Binary file
images/icons/nursery.png ADDED
Binary file
images/icons/olympicsite.png ADDED
Binary file
images/icons/peace.png ADDED
Binary file
images/icons/photo.png ADDED
Binary file
images/icons/pin.png ADDED
Binary file
images/icons/playground.png ADDED
Binary file
images/icons/shoppingmall.png ADDED
Binary file
images/icons/snowy.png ADDED
Binary file
images/icons/sunny.png ADDED
Binary file
images/icons/supermarket.png ADDED
Binary file
images/icons/teahouse.png ADDED
Binary file
images/icons/temple-2.png ADDED
Binary file
images/icons/university.png ADDED
Binary file
images/icons/watermill.png ADDED
Binary file
images/icons/webcam.png ADDED
Binary file
images/icons/yoga.png ADDED
Binary file
images/icons/zoo.png ADDED
Binary file
images/icons/zoom.png ADDED
Binary file
images/miclogo-88x31.gif ADDED
Binary file
images/multiple.jpg ADDED
Binary file
images/routes.jpg ADDED
Binary file
include/functions.php ADDED
@@ -0,0 +1,1353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CodePeople Post Map
4
+ * Version: 1.0.4
5
+ * Author: CodePeople
6
+ * Plugin URI: http://wordpress.dwbooster.com
7
+ */
8
+
9
+ class CPM {
10
+ //---------- VARIABLES ----------
11
+
12
+ var $lang_array; // List of supported languages
13
+ var $points = array(); // List of points to set on map
14
+ var $points_str = ''; // List of points as javascript code
15
+ var $map_id; // ID of map
16
+ var $limit=0; // The number of pins allowed in map zero = unlimited
17
+ var $defaultpost=''; // The post ID for centring the map, and display by default the infowindow
18
+ var $extended = array();
19
+ var $multiple = false;
20
+
21
+ //---------- CONSTRUCTOR ----------
22
+
23
+ function __construct(){
24
+ $this->map_id = "cpm_".wp_generate_password(6, false);
25
+ $this->lang_array = array(
26
+ "ar"=>__("ARABIC","codepeople-post-map"),
27
+ "eu"=>__("BASQUE","codepeople-post-map"),
28
+ "bg"=>__("BULGARIAN","codepeople-post-map"),
29
+ "bn"=>__("BENGALI","codepeople-post-map"),
30
+ "ca"=>__("CATALAN","codepeople-post-map"),
31
+ "cs"=>__("CZECH","codepeople-post-map"),
32
+ "da"=>__("DANISH","codepeople-post-map"),
33
+ "de"=>__("GERMAN","codepeople-post-map"),
34
+ "el"=>__("GREEK","codepeople-post-map"),
35
+ "en"=>__("ENGLISH","codepeople-post-map"),
36
+ "en-AU"=>__("ENGLISH (AUSTRALIAN)","codepeople-post-map"),
37
+ "en-GB"=>__("ENGLISH (GREAT BRITAIN)","codepeople-post-map"),
38
+ "es"=>__("SPANISH","codepeople-post-map"),
39
+ "eu"=>__("BASQUE","codepeople-post-map"),
40
+ "fa"=>__("FARSI","codepeople-post-map"),
41
+ "fi"=>__("FINNISH","codepeople-post-map"),
42
+ "fil"=>__("FILIPINO","codepeople-post-map"),
43
+ "fr"=>__("FRENCH","codepeople-post-map"),
44
+ "gl"=>__("GALICIAN","codepeople-post-map"),
45
+ "gu"=>__("GUJARATI","codepeople-post-map"),
46
+ "hi"=>__("HINDI","codepeople-post-map"),
47
+ "hr"=>__("CROATIAN","codepeople-post-map"),
48
+ "hu"=>__("HUNGARIAN","codepeople-post-map"),
49
+ "id"=>__("INDONESIAN","codepeople-post-map"),
50
+ "it"=>__("ITALIAN","codepeople-post-map"),
51
+ "iw"=>__("HEBREW","codepeople-post-map"),
52
+ "ja"=>__("JAPANESE","codepeople-post-map"),
53
+ "kn"=>__("KANNADA","codepeople-post-map"),
54
+ "ko"=>__("KOREAN","codepeople-post-map"),
55
+ "lt"=>__("LITHUANIAN","codepeople-post-map"),
56
+ "lv"=>__("LATVIAN","codepeople-post-map"),
57
+ "ml"=>__("MALAYALAM","codepeople-post-map"),
58
+ "mr"=>__("MARATHI","codepeople-post-map"),
59
+ "nl"=>__("DUTCH","codepeople-post-map"),
60
+ "no"=>__("NORWEGIAN","codepeople-post-map"),
61
+ "or"=>__("ORIYA","codepeople-post-map"),
62
+ "pl"=>__("POLISH","codepeople-post-map"),
63
+ "pt"=>__("PORTUGUESE","codepeople-post-map"),
64
+ "pt-BR"=>__("PORTUGUESE (BRAZIL)","codepeople-post-map"),
65
+ "pt-PT"=>__("PORTUGUESE (PORTUGAL)","codepeople-post-map"),
66
+ "ro"=>__("ROMANIAN","codepeople-post-map"),
67
+ "ru"=>__("RUSSIAN","codepeople-post-map"),
68
+ "sk"=>__("SLOVAK","codepeople-post-map"),
69
+ "sl"=>__("SLOVENIAN","codepeople-post-map"),
70
+ "sr"=>__("SERBIAN","codepeople-post-map"),
71
+ "sv"=>__("SWEDISH","codepeople-post-map"),
72
+ "tl"=>__("TAGALOG","codepeople-post-map"),
73
+ "ta"=>__("TAMIL","codepeople-post-map"),
74
+ "te"=>__("TELUGU","codepeople-post-map"),
75
+ "th"=>__("THAI","codepeople-post-map"),
76
+ "tr"=>__("TURKISH","codepeople-post-map"),
77
+ "uk"=>__("UKRAINIAN","codepeople-post-map"),
78
+ "vi"=>__("VIETNAMESE","codepeople-post-map"),
79
+ "zh-CN"=>__("CHINESE (SIMPLIFIED)","codepeople-post-map"),
80
+ "zh-TW"=>__("CHINESE (TRADITIONAL)","codepeople-post-map")
81
+
82
+ );
83
+ } // End __construct
84
+
85
+ //---------- CREATE MAP ----------
86
+
87
+ /**
88
+ * Save a map object in database
89
+ * called by the action save_post
90
+ */
91
+ function save_map($post_id){
92
+ // authentication checks
93
+
94
+ // make sure data came from our meta box
95
+ if (!isset($_POST['cpm_map_noncename']) || !wp_verify_nonce($_POST['cpm_map_noncename'],__FILE__)) return $post_id;
96
+
97
+ // check user permissions
98
+ if (isset($_POST['post_type'] ) && $_POST['post_type'] == 'page'){
99
+ if (!current_user_can('edit_page', $post_id)) return $post_id;
100
+ }
101
+ else{
102
+ if (!current_user_can('edit_post', $post_id)) return $post_id;
103
+ }
104
+
105
+ // authentication passed, save data
106
+ $default_icon = ( !empty( $_POST['default_icon'] ) ) ? $_POST['default_icon'] : $this->get_configuration_option('default_icon');
107
+
108
+ delete_post_meta($post_id,'cpm_point');
109
+ delete_post_meta($post_id,'cpm_map');
110
+
111
+ $new_cpm_point = ( isset( $_POST['cpm_point'] ) ) ? $_POST['cpm_point'] : array();
112
+ $new_cpm_map = ( isset( $_POST['cpm_map'] ) ) ? $_POST['cpm_map'] : array();
113
+ $new_cpm_point['icon'] = str_replace( CPM_PLUGIN_URL, '', $default_icon );
114
+
115
+ // Set the map's config
116
+ $new_cpm_map['single'] = (isset($new_cpm_map['single'])) ? true : false;
117
+ if($new_cpm_map['single']){
118
+ $new_cpm_point['address'] = esc_attr( ( !empty( $new_cpm_point['address'] ) ) ? $new_cpm_point['address'] : '' );
119
+ $new_cpm_point['name'] = esc_attr( ( !empty( $new_cpm_point['name'] ) ) ? $new_cpm_point['name'] : '' );
120
+ $new_cpm_point['description'] = esc_attr( ( !empty( $new_cpm_point['description'] ) ) ? $new_cpm_point['description'] : '' );
121
+
122
+
123
+ $new_cpm_map['zoompancontrol'] = ($new_cpm_map['zoompancontrol'] == true);
124
+ $new_cpm_map['fullscreencontrol'] = ($new_cpm_map['fullscreencontrol'] == true);
125
+ $new_cpm_map['mousewheel'] = ($new_cpm_map['mousewheel'] == true);
126
+ $new_cpm_map['typecontrol'] = ($new_cpm_map['typecontrol'] == true);
127
+ $new_cpm_map['streetviewcontrol'] = ($new_cpm_map['streetviewcontrol'] == true);
128
+ $new_cpm_map['trafficlayer'] = ($new_cpm_map['trafficlayer'] == true);
129
+ $new_cpm_map['dynamic_zoom'] = (isset($new_cpm_map['dynamic_zoom']) && $new_cpm_map['dynamic_zoom']) ? true : false;
130
+ $new_cpm_map['show_default'] = (isset($new_cpm_map['show_default']) && $new_cpm_map['show_default']) ? true : false;
131
+ $new_cpm_map['show_window'] = (isset($new_cpm_map['show_window']) && $new_cpm_map['show_window']) ? true : false;
132
+ $new_cpm_map['drag_map'] = (isset($new_cpm_map['drag_map']) && $new_cpm_map['drag_map']) ? true : false;
133
+
134
+ add_post_meta($post_id,'cpm_map',$new_cpm_map,TRUE);
135
+ }
136
+
137
+ // The address is required, if address is empty the couple: latitude, longitude must be defined
138
+ if(!(empty($new_cpm_point['latitude']) || empty($new_cpm_point['longitude']))){
139
+ add_post_meta($post_id,'cpm_point',$new_cpm_point,TRUE);
140
+ }
141
+
142
+ } // End save_map
143
+
144
+ //---------- OPTIONS FOR CODEPEOPLE POST MAP ----------
145
+ /**
146
+ * Get default configuration options
147
+ */
148
+ function _default_configuration(){
149
+ return array(
150
+ 'zoom' => '10',
151
+ 'dynamic_zoom' => false,
152
+ 'width' => '450',
153
+ 'height' => '450',
154
+ 'margin' => '10',
155
+ 'align' => 'center',
156
+ 'language' => 'en',
157
+ 'drag_map' => true,
158
+ 'icons' => array(),
159
+ 'default_icon' => CPM_PLUGIN_URL.'/images/icons/marker.png',
160
+ 'type' => 'ROADMAP',
161
+ 'points' => 3,
162
+ 'display' => 'map',
163
+ 'mousewheel' => true,
164
+ 'zoompancontrol' => true,
165
+ 'fullscreencontrol' => true,
166
+ 'typecontrol' => true,
167
+ 'streetviewcontrol' => true,
168
+ 'trafficlayer' => false,
169
+ 'highlight' => true,
170
+ 'highlight_class' => 'cpm_highlight',
171
+ 'tooltip' => 'title',
172
+ 'show_window' => true,
173
+ 'show_default' => true,
174
+ 'windowhtml' => "<div class='cpm-infowindow'>
175
+ <div class='cpm-content'>
176
+ <a title='%link%' href='%link%'>%thumbnail%</a>
177
+ <a class='title' href='%link%'>%title%</a>
178
+ <div class='address'>%address%</div>
179
+ <div class='description'>%description%</div>
180
+ </div>
181
+ <div style='clear:both;'></div>
182
+ </div>"
183
+ );
184
+ } // End _default_configuration
185
+
186
+ /**
187
+ * Set default system and maps configuration
188
+ */
189
+ function set_default_configuration(){
190
+ $cpm_default = $this->_default_configuration();
191
+ $options = get_option('cpm_config');
192
+ if($options !== false) $options = array_replace_recursive($cpm_default, $options);
193
+ else $options = $cpm_default;
194
+ return $options;
195
+ } // End set_default_configuration
196
+
197
+ /**
198
+ * Get a part of option variable or the complete array
199
+ */
200
+ function get_configuration_option($option = null){
201
+
202
+ $options = get_option('cpm_config');
203
+ $default = $this->_default_configuration();
204
+
205
+ if(!isset($options)){
206
+ $options = $default;
207
+ }
208
+
209
+ if(isset($option)){
210
+ return (isset($options[$option])) ? $options[$option] : ((isset($default[$option])) ? $default[$option] : null);
211
+ }else{
212
+ return $options;
213
+ }
214
+
215
+ } // End get_configuration_option
216
+
217
+ //---------- METADATA FORM METHODS ----------
218
+
219
+ /**
220
+ * Private method to deploy the list of languages
221
+ */
222
+ function _deploy_languages($options){
223
+ print '<select name="cpm_map[language]" id="cpm_map_language">';
224
+ foreach($this->lang_array as $key=>$value)
225
+ print '<option value="'.esc_attr($key).'" '.((isset($options['language']) && $options['language'] == $key) ? 'selected' : '').'>'.$value.'</option>';
226
+ print '</select>';
227
+ } // End _deploy_languages
228
+
229
+ /**
230
+ * Private method to get the list of icons
231
+ */
232
+ function _deploy_icons($options = null){
233
+ $icon_path = CPM_PLUGIN_URL.'/images/icons/';
234
+ $icon_dir = CPM_PLUGIN_DIR.'/images/icons/';
235
+
236
+ $icons_array = array();
237
+
238
+ $default_icon = (isset($options) && isset($options['icon'])) ? $options['icon'] : $this->get_configuration_option('default_icon');
239
+ if( strpos($default_icon, 'http') !== 0 ) $default_icon = CPM_PLUGIN_URL.$default_icon;
240
+
241
+ if ($handle = opendir($icon_dir)) {
242
+
243
+ while (false !== ($file = readdir($handle))) {
244
+
245
+ $file_type = wp_check_filetype($file);
246
+ $file_ext = $file_type['ext'];
247
+ if ($file != "." && $file != ".." && ($file_ext == 'gif' || $file_ext == 'jpg' || $file_ext == 'png') ) {
248
+ array_push($icons_array,$icon_path.$file);
249
+ }
250
+ }
251
+ }
252
+ ?>
253
+ <div class="cpm_label">
254
+ <?php _e("Select the marker by clicking on the images", "codepeople-post-map"); ?>
255
+ </div>
256
+ <div id="cpm_icon_cont">
257
+ <input type="hidden" name="default_icon" value="<?php esc_attr_e($default_icon); ?>" id="default_icon" />
258
+ <?php foreach ($icons_array as $icon){ ?>
259
+ <div class="cpm_icon <?php if ($default_icon == $icon) echo "cpm_selected" ?>">
260
+ <img src="<?php echo $icon ?>" />
261
+ </div>
262
+ <?php } ?>
263
+ </div>
264
+ <div id="icon_credit">
265
+ <span><?php _e("Powered by","codepeople-post-map"); ?></span>
266
+ <a href="http://mapicons.nicolasmollet.com" target="_blank">
267
+ <img src="<?php echo CPM_PLUGIN_URL ?>/images/miclogo-88x31.gif" />
268
+ </a>
269
+ </div>
270
+ <div class="clear"></div>
271
+ <span class="cpm_more_info_hndl cpm_blink_me" style="margin-left: 10px;"><a href="javascript:void(0);" onclick="cpm_display_more_info( this );">[ + more information]</a></span>
272
+ <div class="cpm_more_info">
273
+ <p>To use your own markers icons, you only should to upload the icons images to the following location:</p>
274
+ <p>/wp-content/plugins/codepeople-post-map/images/icons</p>
275
+ <p>and then select the icon's image from the list</p>
276
+ <a href="javascript:void(0)" onclick="cpm_hide_more_info( this );">[ + less information]</a>
277
+ </div>
278
+ <?php
279
+ } // End _deploy_icons
280
+
281
+ /**
282
+ * Private method to insert the map form
283
+ */
284
+ function _deploy_map_form($options = NULL, $single = false){
285
+ ?>
286
+ <h1><?php _e('Maps Configuration', 'codepeople-post-map'); ?></h1>
287
+ <p style="border:1px solid #E6DB55;margin-bottom:10px;padding:5px;background-color: #FFFFE0;">
288
+ <?php _e('For any issues with the map, go to our <a href="http://wordpress.dwbooster.com/contact-us" target="_blank">contact page</a> and leave us a message.', 'codepeople-post-map'); ?><br/><br />
289
+ <?php _e('If you want test the premium version of CP Google Maps go to the following links:<br/> <a href="http://demos.net-factor.com/cp-google-maps/wp-login.php" target="_blank">Administration area: Click to access the administration area demo</a><br/> <a href="http://demos.net-factor.com/cp-google-maps/" target="_blank">Public page: Click to access the CP Google Maps</a>', 'codepeople-post-map' ); ?>
290
+ </p>
291
+ <table class="form-table">
292
+ <?php
293
+ if( !$single )
294
+ {
295
+ ?>
296
+ <tr valign="top">
297
+ <th scope="row"><label><?php _e('I have an API key:', 'codepeople-post-map')?></label></th>
298
+ <td>
299
+ <input type="text" name="cpm_map[api_key]" id="cpm_map_api_key" value="<?php esc_attr_e( ( !empty( $options['api_key'] ) ) ? $options['api_key'] : '' ); ?>" /><br>
300
+ <?php
301
+ _e( 'Please, visit the following link to get the API Key for your website:', 'codepeople-post-map');
302
+ ?><br>
303
+ <a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank">https://developers.google.com/maps/documentation/javascript/get-api-key</a>
304
+ </td>
305
+ </tr>
306
+ <?php
307
+ }
308
+ if($single){
309
+ ?>
310
+ <tr valign="top">
311
+ <th scope="row"><label for="cpm_map_single"><?php _e('Use particular settings for this map:', 'codepeople-post-map')?></label></th>
312
+ <td>
313
+ <input type="checkbox" name="cpm_map[single]" id="cpm_map_single" <?php echo ((isset($options['single'])) ? 'CHECKED' : '');?> />
314
+ </td>
315
+ </tr>
316
+ <?php
317
+ }
318
+ ?>
319
+ <tr valign="top">
320
+ <th scope="row"><label for="cpm_map_zoom"><?php _e('Map zoom:', 'codepeople-post-map')?></label></th>
321
+ <td>
322
+ <input type="text" size="4" name="cpm_map[zoom]" id="cpm_map_zoom" value="<?php esc_attr_e((isset($options['zoom'])) ? $options['zoom'] : '');?>" />
323
+ </td>
324
+ </tr>
325
+ <tr valign="top">
326
+ <th scope="row"><label for="cpm_map_dynamic_zoom"><?php _e('Dynamic zoom:', 'codepeople-post-map')?></label></th>
327
+ <td>
328
+ <input type="checkbox" name="cpm_map[dynamic_zoom]" id="cpm_map_dynamic_zoom" <?php echo ( ( isset($options['dynamic_zoom'] ) && $options['dynamic_zoom'] ) ? 'CHECKED' : '' ); ?> /> <?php _e( 'Allows to adjust the zoom dynamically to display all points on map', 'codepeople-post-map' ); ?>
329
+ </td>
330
+ </tr>
331
+ <tr valign="top">
332
+ <th scope="row"><label for="cpm_map_width"><?php _e('Map width:', 'codepeople-post-map'); ?></label></th>
333
+ <td>
334
+ <input type="text" size="4" name="cpm_map[width]" id="cpm_map_width" value="<?php esc_attr_e((isset($options['width'])) ? $options['width'] : '');?>" />
335
+ <span class="cpm_more_info_hndl cpm_blink_me" style="margin-left: 10px;"><a href="javascript:void(0);" onclick="cpm_display_more_info( this );">[ + more information]</a></span>
336
+ <div class="cpm_more_info">
337
+ <p>To insert the map in a responsive design (in a responsive design, the map's width should be adjusted with the page width):</p>
338
+ <p>the value of map's width should be defined as a percentage of container's width, for example, type the value: <strong>100%</strong></p>
339
+ <a href="javascript:void(0)" onclick="cpm_hide_more_info( this );">[ + less information]</a>
340
+ </div>
341
+ </td>
342
+ </tr>
343
+ <tr valign="top">
344
+ <th scope="row"><label for="cpm_map_height"><?php _e('Map height:', 'codepeople-post-map'); ?></label></th>
345
+ <td>
346
+ <input type="text" size="4" name="cpm_map[height]" id="cpm_map_height" value="<?php esc_attr_e((isset($options['height'])) ? $options['height'] : '');?>" />
347
+ </td>
348
+ </tr>
349
+ <tr valign="top">
350
+ <th scope="row"><label for="cpm_map_margin"><?php _e('Map margin:', 'codepeople-post-map'); ?></label></th>
351
+ <td>
352
+ <input type="text" size="4" name="cpm_map[margin]" id="cpm_map_margin" value="<?php esc_attr_e((isset($options['height'])) ? $options['margin'] : '');?>" />
353
+ </td>
354
+ </tr>
355
+ <tr valign="top">
356
+ <th scope="row"><label for="cpm_map_align"><?php _e('Map align:', 'codepeople-post-map'); ?></label></th>
357
+ <td>
358
+ <select id="cpm_map_align" name="cpm_map[align]">
359
+ <option value="left" <?php echo((isset($options['align']) && $options['align'] == 'left') ? 'selected': ''); ?>><?php _e('left', 'codepeople-post-map'); ?></option>
360
+ <option value="center" <?php echo((isset($options['align']) && $options['align'] == 'center') ? 'selected': ''); ?>><?php _e('center', 'codepeople-post-map'); ?></option>
361
+ <option value="right" <?php echo((isset($options['align']) && $options['align'] == 'right') ? 'selected': ''); ?>><?php _e('right', 'codepeople-post-map'); ?></option>
362
+ </select>
363
+ </td>
364
+ </tr>
365
+ <tr valign="top">
366
+ <th scope="row"><label for="cpm_map_type"><?php _e('Map type:', 'codepeople-post-map'); ?></label></th>
367
+ <td>
368
+ <select name="cpm_map[type]" id="cpm_map_type" >
369
+ <option value="ROADMAP" <?php echo ((isset($options['type']) && $options['type']=='ROADMAP') ? 'selected' : '');?>><?php _e('ROADMAP - Displays a normal street map', 'codepeople-post-map');?></option>
370
+ <option value="SATELLITE" <?php echo ((isset($options['type']) && $options['type']=='SATELLITE') ? 'selected' : '');?>><?php _e('SATELLITE - Displays satellite images', 'codepeople-post-map');?></option>
371
+ <option value="TERRAIN" <?php echo ((isset($options['type']) && $options['type']=='TERRAIN') ? 'selected' : '');?>><?php _e('TERRAIN - Displays maps with physical features such as terrain and vegetation', 'codepeople-post-map');?></option>
372
+ <option value="HYBRID" <?php echo ((isset($options['type']) && $options['type']=='HYBRID') ? 'selected' : '');?>><?php _e('HYBRID - Displays a transparent layer of major streets on satellite images', 'codepeople-post-map');?></option>
373
+ </select>
374
+ </td>
375
+ </tr>
376
+ <tr valign="top">
377
+ <th scope="row"><label for="cpm_map_language"><?php _e('Map language:', 'codepeople-post-map');?></th>
378
+ <td><?php $this->_deploy_languages($options); ?></td>
379
+ </tr>
380
+ <tr valign="top">
381
+ <th scope="row"><label for="cpm_map_single"><?php _e('Allow drag the map:', 'codepeople-post-map'); ?></label></th>
382
+ <td>
383
+ <input type="checkbox" name="cpm_map[drag_map]" id="cpm_drag_map" <?php echo ((!isset( $options['drag_map'] ) || $options['drag_map']) ? 'CHECKED' : '');?> />
384
+ </td>
385
+ </tr>
386
+ <tr valign="top">
387
+ <th scope="row"><label for="cpm_map_display"><?php _e('Display map in post/page:', 'codepeople-post-map'); ?></label></th>
388
+ <td>
389
+ <select name="cpm_map[display]" id="cpm_map_display" >
390
+ <option value="icon" <?php echo ((isset($options['display']) && $options['display']=='icon') ? 'selected' : '');?>><?php _e('as icon', 'codepeople-post-map'); ?></option>
391
+ <option value="map" <?php echo ((isset($options['display']) && $options['display']=='map') ? 'selected' : '');?>><?php _e('as full map', 'codepeople-post-map'); ?></option>
392
+ </select>
393
+ </td>
394
+ </tr>
395
+
396
+ <tr valign="top">
397
+ <th scope="row"><label for="cpm_show_window"><?php _e('Show info bubbles:', 'codepeople-post-map');?></th>
398
+ <td>
399
+ <input type="checkbox" id="cpm_show_window" name="cpm_map[show_window]" value="true" <?php echo ((isset($options['show_window']) && $options['show_window']) ? 'checked' : '');?>><span> <?php _e( 'Display the bubbles associated to the points', 'codepeople-post-map');?></span>
400
+ </td>
401
+ </tr>
402
+
403
+ <tr valign="top">
404
+ <th scope="row"><label for="cpm_show_default"><?php _e('Display a bubble by default:', 'codepeople-post-map');?></th>
405
+ <td>
406
+ <input type="checkbox" id="cpm_show_default" name="cpm_map[show_default]" value="true" <?php echo ((isset($options['show_default']) && $options['show_default']) ? 'checked' : '');?>><span> <?php _e( 'Display a bubble opened by default', 'codepeople-post-map' ); ?></span>
407
+ </td>
408
+ </tr>
409
+
410
+ <?php
411
+ if( !$single ){
412
+ ?>
413
+ <tr valign="top">
414
+ <th scope="row"><label for="cpm_tooltip"><?php _e('Display as marker tooltip:', 'codepeople-post-map');?></th>
415
+ <td>
416
+ <input type="radio" name="cpm_map[tooltip]" value="title" <?php echo ((!isset($options['tooltip']) || $options['tooltip'] == 'title') ? 'checked' : '');?> /><span> <?php _e( 'Point location name', 'codepeople-post-map' ); ?></span><br />
417
+ <input type="radio" name="cpm_map[tooltip]" value="address" <?php echo ((isset($options['tooltip']) && $options['tooltip'] == 'address') ? 'checked' : '');?> /><span> <?php _e( 'Point address', 'codepeople-post-map' ); ?></span><br />
418
+ <input type="radio" name="cpm_map[tooltip]" value="none" <?php echo ((isset($options['tooltip']) && $options['tooltip'] == 'none') ? 'checked' : '');?> /><span> <?php _e( 'None', 'codepeople-post-map' ); ?></span>
419
+ </td>
420
+ </tr>
421
+
422
+ <tr valign="top">
423
+ <th scope="row"><label for="cpm_featured_image"><?php _e('Display Featured Image by default:', 'codepeople-post-map');?></th>
424
+ <td>
425
+ <input type="checkbox" id="cpm_featured_image" name="cpm_map[featured_image]" value="true" <?php echo ((isset($options['featured_image']) && $options['featured_image']) ? 'checked' : '');?>><span> <?php _e( 'Displays the Featured Image in posts and pages in the infowindows, if the points don\'t have associated an image', 'codepeople-post-map' ); ?></span>
426
+ </td>
427
+ </tr>
428
+
429
+ <tr valign="top">
430
+ <th scope="row"><label for="cpm_get_direction" style="color:#CCCCCC;"><?php _e('Display the get directions link:', 'codepeople-post-map');?></th>
431
+ <td>
432
+ <input type="checkbox" disabled><span> <?php _e( 'Display a link at bottom of infowindow to get directions', 'codepeople-post-map' ); ?></span><br />
433
+ <span style="color:#FF0000;"><?php _e( 'The feature is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a>', 'codepeople-post-map' ); ?></span>
434
+ </td>
435
+ </tr>
436
+
437
+ <tr valign="top">
438
+ <th scope="row"><label for="cpm_map_link" style="color:#CCCCCC;"><?php _e('Display a link to Google Maps:', 'codepeople-post-map');?></th>
439
+ <td>
440
+ <input type="checkbox" disabled><span> <?php _e( 'Display a link at bottom of infowindow to display on Google Maps', 'codepeople-post-map' ); ?></span><br />
441
+ <span style="color:#FF0000;"><?php _e( 'The feature is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a>', 'codepeople-post-map' ); ?></span>
442
+ </td>
443
+ </tr>
444
+
445
+ <tr valign="top">
446
+ <th scope="row"><label for="cpm_street_view_link" style="color:#CCCCCC;"><?php _e('Display a link to street view:', 'codepeople-post-map');?></th>
447
+ <td>
448
+ <input type="checkbox" disabled /><span> <?php _e( 'Display a link at bottom of infowindow to load the corresponding street view', 'codepeople-post-map' ); ?></span><br />
449
+ <span style="color:#FF0000;"><?php _e( 'The feature is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a>', 'codepeople-post-map' ); ?></span>
450
+ </td>
451
+ </tr>
452
+
453
+ <tr valign="top">
454
+ <th scope="row"><label for="cpm_MarkerClusterer" style="color:#CCCCCC;"><?php _e('Display a bundle of points in the same area, like a cluster:', 'codepeople-post-map');?></th>
455
+ <td>
456
+ <input type="checkbox" disabled /><span> <?php _e( 'Displays the number of points in the cluster', 'codepeople-post-map' ); ?></span><br />
457
+ <span style="color:#FF0000;"><?php _e( 'The feature is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a>', 'codepeople-post-map' ); ?></span>
458
+ </td>
459
+ </tr>
460
+
461
+ <tr valign="top">
462
+ <th scope="row"><label for="cpm_your_location" style="color:#CCCCCC;"><?php _e('Display the user\'s location:', 'codepeople-post-map');?></th>
463
+ <td>
464
+ <input type="checkbox" disabled /><span> <?php _e( "Display an icon with the user's location on map", 'codepeople-post-map' ); ?> </span><br />
465
+ <span style="color:#FF0000;"><?php _e( 'The feature is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a>', 'codepeople-post-map' ); ?></span>
466
+ </td>
467
+ </tr>
468
+
469
+ <tr valign="top">
470
+ <th scope="row"><label for="cpm_refresh_location" style="color:#CCCCCC;"><?php _e('Refresh the user\'s location every:', 'codepeople-post-map');?></th>
471
+ <td>
472
+ <input type="text" disabled /><span> <?php _e( "milliseconds", 'codepeople-post-map' ); ?></span><br />
473
+ <span style="color:#FF0000;"><?php _e( 'The feature is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a>', 'codepeople-post-map' ); ?></span>
474
+ </td>
475
+ </tr>
476
+
477
+ <tr valign="top">
478
+ <th scope="row"><label for="cpm_your_location_title" style="color:#CCCCCC;"><?php _e("Title of user's location:", 'codepeople-post-map');?></th>
479
+ <td>
480
+ <input type="text" disabled value="You are here" /><span> <?php _e("Title of user's location", 'codepeople-post-map');?></span><br />
481
+ <span style="color:#FF0000;"><?php _e( 'The feature is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a>', 'codepeople-post-map' ); ?></span>
482
+ </td>
483
+ </tr>
484
+
485
+ <tr valign="top">
486
+ <th scope="row"><label for="cpm_search_box" style="color:#CCCCCC;"><?php _e('Display a search box for places:', 'codepeople-post-map');?></th>
487
+ <td>
488
+ <input type="checkbox" disabled><span> <?php _e( "Includes an input box on the map for searching places", 'codepeople-post-map' ); ?></span><br />
489
+ <?php _e( 'The feature is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a>', 'codepeople-post-map' ); ?></span>
490
+ </td>
491
+ </tr>
492
+ <?php
493
+ }
494
+ ?>
495
+ <tr valign="top">
496
+ <th scope="row"><label for="cpm_map_route" style="color:#CCCCCC;"><?php _e('Display route:', 'codepeople-post-map');?></th>
497
+ <td>
498
+ <input type="checkbox" DISABLED><span> <?php _e( 'Draws the route between the points in the same post', 'codepeople-post-map'); ?></span><br />
499
+ <input type="checkbox" DISABLED><span> <?php _e( 'Connect the points with polylines, even if there is not a route between points', 'codepeople-post-map' ); ?> </span><br />
500
+ <span style="color:#FF0000;">The route between points is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a></span>
501
+ </td>
502
+ </tr>
503
+
504
+ <tr valign="top">
505
+ <th scope="row"><label for="cpm_travel_mode" style="color:#CCCCCC;"><?php _e('Travel mode:', 'codepeople-post-map');?></th>
506
+ <td>
507
+ <select disabled>
508
+ <option value="DRIVING">Driving</option>
509
+ </select>
510
+ </td>
511
+ </tr>
512
+
513
+ <tr valign="top">
514
+ <th scope="row"><label for="cpm_map_traffic"><?php _e('Include traffic layer:', 'codepeople-post-map');?></th>
515
+ <td>
516
+ <input type="checkbox" name="cpm_map[trafficlayer]" <?php if( isset($options['trafficlayer']) && $options['trafficlayer'] ) print 'CHECKED'; ?>><span> <?php _e( 'Displays a layer over the map for traffic', 'codepeople-post-map'); ?></span>
517
+ </td>
518
+ </tr>
519
+
520
+ <tr valign="top">
521
+ <th scope="row"><label for="wpGoogleMaps_description"><?php _e('Options', 'codepeople-post-map'); ?>:</label></th>
522
+ <td>
523
+ <input type="checkbox" name="cpm_map[streetviewcontrol]" id="cpm_map_streetviewcontrol" value="true" <?php echo ((isset($options['streetviewcontrol']) && $options['streetviewcontrol']) ? 'checked' : '');?> />
524
+ <label for="cpm_map_streetviewcontrol"><?php _e('Display the street view control', 'codepeople-post-map'); ?></label><br />
525
+ <input type="checkbox" name="cpm_map[mousewheel]" id="cpm_map_mousewheel" value="true" <?php echo ((isset($options['mousewheel']) && $options['mousewheel']) ? 'checked' : '');?> />
526
+ <label for="cpm_map_mousewheel"><?php _e('Enable mouse wheel zoom', 'codepeople-post-map'); ?></label><br />
527
+ <input type="checkbox" name="cpm_map[zoompancontrol]" id="cpm_map_zoompancontrol" value="true" <?php echo ((isset($options['zoompancontrol']) && $options['zoompancontrol']) ? 'checked' : '');?> />
528
+ <label for="cpm_map_zoompancontrol"><?php _e('Enable zoom controls', 'codepeople-post-map'); ?></label><br />
529
+ <input type="checkbox" name="cpm_map[fullscreencontrol]" id="cpm_map_fullscreencontrol" value="true" <?php echo ((isset($options['fullscreencontrol']) && $options['fullscreencontrol']) ? 'checked' : '');?> />
530
+ <label for="cpm_map_fullscreencontrol"><?php _e('Enable fullscreen control', 'codepeople-post-map'); ?></label><br />
531
+ <input type="checkbox" name="cpm_map[typecontrol]" id="cpm_map_typecontrol" value="true" <?php echo ((isset($options['typecontrol']) && $options['typecontrol']) ? 'checked' : '');?> />
532
+ <label for="cpm_map_typecontrol"> <?php _e('Enable map type controls (Map, Satellite, or Hybrid)', 'codepeople-post-map'); ?> </label><br />
533
+ </td>
534
+ </tr>
535
+ <tr valign="top">
536
+ <th scope="row"><label for="cpm_map_points"><?php _e('Enter the number of posts to display on the post/page map', 'codepeople-post-map'); ?>:</th>
537
+ <td><input type="text" name="cpm_map[points]" id="cpm_map_points" value="<?php esc_attr_e((isset($options['points'])) ? $options['points'] : '');?>" /></td>
538
+ </tr>
539
+ <tr>
540
+ <th scope="row"><label for="cpm_map_stylized" style="color:#CCCCCC;"><?php _e('Allow stylize the maps:', 'codepeople-post-map'); ?></label></th>
541
+ <td valign="top">
542
+ <input type="checkbox" DISABLED />
543
+ </td>
544
+ </tr>
545
+ <tr>
546
+ <th></th>
547
+ <td>
548
+ <span>
549
+ <?php
550
+ _e( "If you want change the maps' styles, be sure to know how to create a JSON structure with the map's styles", 'codepeople-post-map');
551
+ ?>
552
+ </span><br />
553
+ <textarea rows="10" cols="80" DISABLED READONLY ></textarea><br />
554
+ <span style="color:#FF0000;">This feature is available only in commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a></span>
555
+ </td>
556
+ </tr>
557
+ <tr>
558
+ <th scope="row"><label for="cpm_map_legend" style="color:#CCCCCC;"><?php _e("Display the map's legend:", 'codepeople-post-map');?></label></th>
559
+ <td valign="top">
560
+ <input type="checkbox" disabled readonly /> <span style="color:#FF0000;">This feature is available only in commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a></span>
561
+ </td>
562
+ </tr>
563
+ <tr>
564
+ <th scope="row"><label for="cpm_map_legend_taxonomy" style="color:#CCCCCC;"><?php _e('Select the taxonomy to display on legend:', 'codepeople-post-map'); ?></label></th>
565
+ <td valign="top">
566
+ <select disabled readonly>
567
+ <option value=""><?php _e( 'Select a taxonomy', 'codepeople-post-map' ); ?></option>
568
+ </select>
569
+ </td>
570
+ </tr>
571
+ <tr>
572
+ <th scope="row"><label for="cpm_map_legend_title" style="color:#CCCCCC;"><?php _e('Enter a title for legend:', 'codepeople-post-map'); ?></label></th>
573
+ <td valign="top">
574
+ <input type="text" disabled readonly />
575
+ </td>
576
+ </tr>
577
+ <tr>
578
+ <th scope="row"><label for="cpm_map_legend_class" style="color:#CCCCCC;"><?php _e('Enter a classname to be applied to the legend:', 'codepeople-post-map'); ?></label></th>
579
+ <td valign="top">
580
+ <input type="text" disabled readonly />
581
+ </td>
582
+ </tr>
583
+
584
+ </table>
585
+ <?php
586
+ } // End _deploy_map_form
587
+
588
+ /**
589
+ * Private method to print Maps form
590
+ */
591
+ function _print_form($options){
592
+ global $post;
593
+ $default_configuration = $this->_default_configuration();
594
+
595
+ // create a custom nonce for submit verification later
596
+ echo '<input type="hidden" name="cpm_map_noncename" value="' . wp_create_nonce(__FILE__) . '" />';
597
+ ?>
598
+ <script>
599
+ var cpm_default_marker = "<?php echo $default_configuration['default_icon']; ?>";
600
+ var cpm_point = {};
601
+
602
+ <?php
603
+ if(!empty($options['address']) || (!empty($options['latitude']) && !empty($options['longitude']))){
604
+ if(!empty($options['address'])) echo 'cpm_point["address"]="'.$options['address'].'";';
605
+ if(!empty($options['latitude']) && !empty($options['longitude'])){
606
+ echo 'cpm_point["latitude"]="'.$options['latitude'].'";';
607
+ echo 'cpm_point["longitude"]="'.$options['longitude'].'";';
608
+ }
609
+
610
+ } else {
611
+ echo 'cpm_point["address"]="Statue of Liberty, Statue of Liberty National Monument, Statue Of Liberty, New York, NY 10004, USA";';
612
+ echo 'cpm_point["latitude"]="40.689848";';
613
+ echo 'cpm_point["longitude"]="-74.044869";';
614
+ }
615
+ ?>
616
+
617
+ </script>
618
+ <p style="font-weight:bold;"><?php _e('For more information go to the <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map" target="_blank">CodePeople Post Map</a> plugin page', 'codepeople-post-map'); ?></p>
619
+ <p style="border:1px solid #E6DB55;margin-bottom:10px;padding:5px;background-color: #FFFFE0;"><?php _e('For any issues with the map, go to our <a href="http://wordpress.dwbooster.com/contact-us" target="_blank">contact page</a> and leave us a message.', 'codepeople-post-map'); ?></p>
620
+ <p>
621
+ <?php _e( 'To insert a map in the post follow the steps below', 'codepeople-post-map');?>:
622
+ </p>
623
+ <ol>
624
+ <li><?php _e( 'Enter the point\'s information (the latitude and longitude are required, but are obtained pressing the "verify" button after type the address', 'codepeople-post-map' );?></li>
625
+ <li><?php _e('Insert the shortcode in the post\'s content pressing the "insert the map tag" button', 'codepeople-post-map');?></li>
626
+ <li><?php _e('If you want to use specific settings just for this map, press the "Show/Hide Map\'s Options" button, and modifies the settings for this map', 'codepeople-post-map'); ?></li>
627
+ <li><?php _e( 'Don\'t forget to press the "Update" button for save the post and map data', 'codepeople-post-map');?></li>
628
+ </ol>
629
+ <div style="border:1px solid #CCC;margin-bottom:10px;min-height:60px; padding:5px;">
630
+ <h3><?php _e('Map points', 'codepeople-post-map'); ?></h3>
631
+ <div id="points_container" style="padding:10px;">
632
+ <?php _e('Multiple points in the same Post/Page are available only in the <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download" target="_blank">advanced version</a>.', 'codepeople-post-map'); ?>
633
+ </div>
634
+ </div>
635
+ <div class="point_form" style="border:1px solid #CCC; padding:5px;">
636
+ <h3><?php _e('Map point description', 'codepeople-post-map'); ?></h3>
637
+ <table class="form-table">
638
+ <tr valign="top">
639
+ <th scope="row"><label for="cpm_name"><?php _e('Location name:', 'codepeople-post-map');?></label></th>
640
+ <td>
641
+ <input type="text" size="40" style="width:95%;" name="cpm_point[name]" id="cpm_point_name" value="<?php esc_attr_e((isset($options['name'])) ? $options['name'] : '');?>" />
642
+ </td>
643
+ </tr>
644
+ <tr valign="top">
645
+ <th scope="row"><label for="cpm_point_description"><?php _e('Location description:', 'codepeople-post-map');?></label></th>
646
+ <td>
647
+ <input type="text" size="40" style="width:95%;" name="cpm_point[description]" id="cpm_point_description" value="<?php esc_attr_e((isset($options['description'])) ? $options['description'] : '');?>" />
648
+ <br />
649
+ <em>It is possible to insert a link to another page in the infowindow associated to the point. Type the link tag to the other page in the point description box, similar to: <span style="white-space:nowrap;"><strong>&lt;a href="http://wordpress.dwbooster.com" &gt;CLICK HERE &lt;/a&gt;</strong></span></em>
650
+ </td>
651
+ </tr>
652
+ <tr valign="top">
653
+ <th scope="row">
654
+ <?php _e("Select an image to attach to the point: ","codepeople-post-map"); ?>
655
+ </th>
656
+ <td>
657
+ <input type="text" name="cpm_point[thumbnail]" value="<?php if(isset($options["thumbnail"])){ esc_attr_e($options["thumbnail"]);} ?>" id="cpm_point_thumbnail" />
658
+ <input class="button" type="button" value="Upload Images" onclick="cpm_thumbnail_selection(this);" />
659
+ </td>
660
+ </tr>
661
+ <tr valign="top">
662
+ <td colspan="2">
663
+ <table>
664
+ <tr valign="top">
665
+ <td>
666
+ <span style="font-weight:bold;">Address, latitude and longitude are required fields.</span>
667
+ <table>
668
+ <tr valign="top">
669
+ <th scope="row"><label for="cpm_point_address"><?php _e('Address:', 'codepeople-post-map');?></label></th>
670
+ <td width="100%">
671
+ <input type="text" style="width:100%;" name="cpm_point[address]" id="cpm_point_address" value="<?php esc_attr_e((isset($options['address'])) ? $options['address'] : '');?>" />
672
+ </td>
673
+ </tr>
674
+ <tr valign="top">
675
+ <th scope="row"><label for="cpm_point_latitude"><?php _e('Latitude:', 'codepeople-post-map');?></label></th>
676
+ <td>
677
+ <input type="text" style="width:100%;" name="cpm_point[latitude]" id="cpm_point_latitude" value="<?php esc_attr_e((isset($options['latitude'])) ? $options['latitude'] : '');?>" />
678
+ </td>
679
+ </tr>
680
+ <tr valign="top">
681
+ <th scope="row"><label for="cpm_point_longitude"><?php _e('Longitude:', 'codepeople-post-map');?></label></th>
682
+ <td>
683
+ <input type="text" style="width:100%;" name="cpm_point[longitude]" id="cpm_point_longitude" value="<?php esc_attr_e((isset($options['longitude'])) ? $options['longitude'] : '');?>" />
684
+ </td>
685
+ </tr>
686
+ <tr valign="top">
687
+ <th scope="row" style="text-align:right;"><p class="submit"><input type="button" name="cpm_point_verify" id="cpm_point_verify" value="<?php esc_attr_e(__('Verify', 'codepeople-post-map')); ?>" onclick="cpm_checking_point(this);" /></p></th>
688
+ <td>
689
+ <label for="cpm_point_verify"><?php _e('Verify this latitude and longitude using Geocoding. This could overwrite the point address.', 'codepeople-post-map');?><span style="color:#FF0000">(<?php _e('Required: Press the button "verify" after complete the address.', 'codepeople-post-map'); ?>)</span></label>
690
+ </td>
691
+ </tr>
692
+ </table>
693
+ </td>
694
+ <td width="50%">
695
+ <div id="cpm_map_container" class="cpm_map_container" style="height:250px; border:1px dotted #CCC;">
696
+ </div>
697
+ </td>
698
+ </tr>
699
+ </table>
700
+ </td>
701
+ </tr>
702
+ <tr valign="top">
703
+ <td colspan="2">
704
+ <?php $this->_deploy_icons($options); ?>
705
+ </td>
706
+ </tr>
707
+ </table>
708
+ </div>
709
+ <div style="border:1px solid #CCC; padding:10px; margin:10px 0;">
710
+ <p>
711
+ <?php
712
+ _e( 'To insert this map in a post/page, press the <strong>"insert the map tag"</strong> button and save the post/page modifications.', 'codepeople-post-map' );
713
+ ?>
714
+ </p>
715
+ <div style="border:1px solid #CCC; padding:10px; padding:5px;">
716
+ <p style="color:#CCC;">
717
+ <input type="checkbox" DISABLED />
718
+ <?php
719
+ _e( 'Do you want display a <strong>shape</strong> on map?', 'codepeople-post-map' );
720
+ ?>
721
+ <br /><span style="color:#FF0000;"><?php _e( 'The feature is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a>', 'codepeople-post-map' ); ?></span>
722
+ </p>
723
+ </div>
724
+ <table class="form-table">
725
+ <tr valign="top">
726
+ <td scope="row" valign="top" style="vertical-align:top;width:350px;">
727
+ <label><?php _e('If you want to display the map in page / post:', 'codepeople-post-map');?></label><br />
728
+ <input type="button" class="button-primary" name="cpm_map_shortcode" id="cpm_map_shortcode" value="<?php esc_attr_e(__('Insert the map tag', 'codepeople-post-map')); ?>" style="height:40px; padding-left:30px; padding-right:30px; font-size:1.5em;" /><br />
729
+ <span class="cpm_more_info_hndl cpm_blink_me" style="margin-left: 10px;"><a href="javascript:void(0);" onclick="cpm_display_more_info( this );">[ + more information]</a></span>
730
+ <div class="cpm_more_info">
731
+ <?php _e('<p>It is possible to use attributes in the shortcode, like: width, height, zoom and the other maps attributes:</p>
732
+ <p><strong>[codepeople-post-map width="450" height="500"]</strong></p>
733
+ <p>The premium version of plugin allows to use a special attribute "cat" (referent to category), to display all points created in a category:</p>
734
+ <p><strong>[codepeople-post-map cat="35"]</strong><br/>Note: the number 35 correspond to the ID of category.</p>
735
+ <p>or all points on website, using as category ID the value "-1"</p>
736
+ <p><strong>[codepeople-post-map cat="-1"]</strong></p>
737
+ <p>The special attribute "tag", allow to display all points that belong to the posts with a specific tag assigned, for example "mytag":</p>
738
+ <p><strong>[codepeople-post-map tag="mytag"]</strong></p>', 'codepeople-post-map' ); ?>
739
+ <br />
740
+ <a href="javascript:void(0)" onclick="cpm_hide_more_info( this );"><?php _e('[ + less information]', 'codepeople-post-map'); ?></a>
741
+ </div>
742
+ </td>
743
+ <td valign="top" style="vertical-align:top;">
744
+ <label style="color:#CCC;"><?php _e('To display the points that belong to any category','codepeople-post-map');?>:</label><br />
745
+ <select size="2" multiple="multiple" style="height:48px;width:100%;" disabled>
746
+ <option value="-1"><?php _e( 'All points on website', 'codepeople-post-map'); ?></option>
747
+ <?php
748
+ $categories = get_categories();
749
+ foreach( $categories as $category )
750
+ {
751
+ print '<option value="'.$category->term_id.'">'.$category->name.'</option>';
752
+ }
753
+
754
+ ?>
755
+ </select>
756
+ <br /><span style="color:#FF0000;"><?php _e( 'The feature is available only for the commercial version of plugin. <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download">Click Here</a>', 'codepeople-post-map' ); ?></span>
757
+ </td>
758
+ </tr>
759
+ </table>
760
+ </div>
761
+ <div id="map_data">
762
+ <?php $this->_deploy_map_form($options, true); ?>
763
+ </div>
764
+ <p>&nbsp;</p>
765
+ <?php
766
+ } // End _print_form
767
+
768
+ /**
769
+ * Form for maps insertion and update
770
+ */
771
+ function insert_form(){
772
+ global $post, $wpdb;
773
+
774
+ $cpm_point = get_post_meta($post->ID, 'cpm_point', TRUE);
775
+ if(is_string($cpm_point)) $cpm_point = @unserialize($cpm_point);
776
+ if($cpm_point === false) $cpm_point = array();
777
+
778
+ $cpm_map = get_post_meta($post->ID, 'cpm_map', TRUE);
779
+ $general_options = $this->get_configuration_option();
780
+ $options = array_merge((array)$general_options, (array)$cpm_point, (array)$cpm_map);
781
+ $options['post_id'] = $post->ID;
782
+ $this->_print_form($options);
783
+ } // End insert_form
784
+
785
+ //---------- LOADING RESOURCES ----------
786
+
787
+ /*
788
+ * Load the required scripts and styles for ADMIN section of website
789
+ */
790
+ function load_admin_resources(){
791
+ wp_enqueue_style(
792
+ 'admin_cpm_style',
793
+ CPM_PLUGIN_URL.'/styles/cpm-admin-styles.css'
794
+ );
795
+
796
+ wp_enqueue_script(
797
+ 'admin_cpm_script',
798
+ CPM_PLUGIN_URL.'/js/cpm.admin.js',
799
+ array('jquery'),
800
+ null,
801
+ true
802
+ );
803
+
804
+ $cpm_global = array();
805
+ $api_key = $this->get_configuration_option( 'api_key' );
806
+ if( !empty( $api_key ) )
807
+ {
808
+ $cpm_global[ 'api_key' ] = trim($api_key);
809
+ }
810
+ wp_localize_script('admin_cpm_script', 'cpm_global', $cpm_global);
811
+ } // End load_admin_resources
812
+
813
+ /**
814
+ * Loads the scripts required to integrate the plugin with the Gutenberg Editor.
815
+ */
816
+ function load_gutenberg_code(){
817
+ wp_enqueue_script('corner-ad-gutenberg-editor', CPM_PLUGIN_URL.'/js/gutenberg.js', array('wp-blocks', 'wp-element'));
818
+ } // End load_gutenberg_code
819
+
820
+ /**
821
+ * Load script and style files required for display google maps on public website
822
+ */
823
+ function load_resources() {
824
+ global $cpm_resources_loaded;
825
+ if( !is_admin() && empty( $cpm_resources_loaded ) )
826
+ {
827
+ $cpm_resources_loaded = true;
828
+
829
+ if(get_option('cpm_load_resources_in_footer', false))
830
+ {
831
+ wp_enqueue_script('jquery');
832
+ wp_enqueue_style('cpm_style_css', CPM_PLUGIN_URL.'/styles/cpm-admin-styles.css');
833
+ wp_enqueue_script('cpm_public_js', CPM_PLUGIN_URL.'/js/cpm.js', array('jquery'), 'pro', true);
834
+ }
835
+ else
836
+ {
837
+ if( !wp_script_is( 'jquery' ) )
838
+ {
839
+ print "<script src='".($_SERVER['SERVER_PORT'] == 443 ? "https" : "http")."://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></script>";
840
+ }
841
+
842
+ print "<link rel='stylesheet' id='cpm_style-css' href='".CPM_PLUGIN_URL.'/styles/cpm-styles.css'."' type='text/css' media='all' />";
843
+ print "<script src='".CPM_PLUGIN_URL.'/js/cpm.js'."'></script>";
844
+ }
845
+ }
846
+ } // End load_resources
847
+
848
+ function load_header_resources(){
849
+ echo '<style>.cpm-map img{ max-width: none !important;box-shadow:none !important;}</style>';
850
+ } // End load_header_resources
851
+
852
+ /**
853
+ * Print the settings page for entering the general setting's data of maps
854
+ */
855
+ function settings_page(){
856
+ if (isset($_GET["page"]))
857
+ {
858
+ if( $_GET["page"] == 'google_maps_cp_upgrade' )
859
+ {
860
+ echo("Redirecting to upgrade page...<script type='text/javascript'>document.location='http://wordpress.dwbooster.com/content-tools/codepeople-post-map?acode=18517#download';</script>");
861
+ exit;
862
+ }
863
+ elseif( $_GET["page"] == 'google_maps_cp_help')
864
+ {
865
+ echo("Redirecting to documentation...<script type='text/javascript'>document.location='http://wordpress.dwbooster.com/content-tools/codepeople-post-map?acode=18517';</script>");
866
+ exit;
867
+ }
868
+ elseif( $_GET["page"] == 'google_maps_cp_question')
869
+ {
870
+ echo("Redirecting to documentation...<script type='text/javascript'>document.location='https://wordpress.org/support/plugin/codepeople-post-map/#new-post';</script>");
871
+ exit;
872
+ }
873
+
874
+ }
875
+
876
+ // Check if post exists and save the configuraton options
877
+ if (isset($_POST['cpm_map_noncename']) && wp_verify_nonce($_POST['cpm_map_noncename'],__FILE__)){
878
+ $options = $_POST['cpm_map'];
879
+ $options['drag_map'] = ( isset( $_POST['cpm_map'][ 'drag_map' ] ) ) ? true : false;
880
+ $options['windowhtml'] = $this->get_configuration_option('windowhtml');
881
+ update_option('cpm_config', $options);
882
+ update_option('cpm_load_resources_in_footer', (isset($_POST['cpm_load_resources_in_footer'])) ? true : false);
883
+ echo '<div class="updated"><p><strong>'.__("Settings Updated", 'codepeople-post-map').'</strong></div>';
884
+ }else{
885
+ $options = $this->get_configuration_option();
886
+ }
887
+
888
+ ?>
889
+ <div class="wrap">
890
+ <form method="post">
891
+ <?php
892
+ $this->_deploy_map_form($options);
893
+ ?>
894
+ <table class="form-table">
895
+ <tr valign="top">
896
+ <th scope="row" style="color:#CCCCCC;"><label for="cpm_map_exif_information"><?php _e('Generate points dynamically from geolocation information included on images, when images are uploaded to WordPress:', 'codepeople-post-map'); ?></label></th>
897
+ <td>
898
+ <input type="checkbox" DISABLED />
899
+ <?php _e('The geolocation information is added to the images from your mobiles or cameras, if they have associated GPS devices', 'codepeople-post-map');?>
900
+ <br /><br />
901
+ <a class="button" href="javascript:void(0);"><?php _e( 'Process All Previous Images', 'codepeople-post-map' ); ?></a><br><br>
902
+ <?php _e('Process all images in the library, and generates new points in the parents pages, with the geocode information in the images metadata. A post/page is the parent of an image, if the image was uploaded to the library from the post/page.', 'codepeople-post-map');?><br />
903
+ <span style="color:#FF0000;"><?php _e('The free version of CodePeople Post Map allows only one map by webpage.','codepeople-post-map'); ?> <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download"><?php _e('Click Here', 'codepeople-post-map');?></a></span>
904
+ </td>
905
+ </tr>
906
+
907
+ <tr valign="top">
908
+ <th scope="row" style="color:#CCCCCC;"><label for="cpm_map_geolocation_information"><?php _e('Generate points dynamically from geolocation information included on posts:', 'codepeople-post-map'); ?></label></th>
909
+ <td>
910
+ <input type="checkbox" DISABLED />
911
+ <?php _e('The geolocation information is added to the post from WordPress app in your mobile', 'codepeople-post-map');?>
912
+ <br />
913
+ <span style="color:#FF0000;"><?php _e('The free version of CodePeople Post Map allows only one map by webpage.', 'codepeople-post-map'); ?> <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download"><?php _e('Click Here', 'codepeople-post-map'); ?></a></span>
914
+ </td>
915
+ </tr>
916
+
917
+ <tr valign="top">
918
+ <th scope="row"><label for="cpm_map_search" style="color:#CCCCCC;"><?php _e('Use points information in search results:', 'codepeople-post-map'); ?></label></th>
919
+ <td>
920
+ <input type="checkbox" name="cpm_map[search]" id="cpm_map_search" value="true" disabled /> <span style="color:#FF0000;"><?php _e('The search in the maps data is available only in commercial version of plugin.','codepeople-post-map'); ?> <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download"><?php _e('Click Here', 'codepeople-post-map'); ?></a></span>
921
+ </td>
922
+ </tr>
923
+ <tr valign="top">
924
+ <th scope="row"><label for="cpm_map_highlight" style="color:#CCCCCC;"><?php _e('Highlight post when mouse move over related point on map:', 'codepeople-post-map'); ?></label></th>
925
+ <td>
926
+ <input type="checkbox" name="cpm_map[highlight]" id="cpm_map_highlight" value="true" disabled /> <span style="color:#FF0000;"><?php _e('The post highlight is available only in commercial version of plugin.', 'codepeople-post-map'); ?> <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download"><?php _e('Click Here', 'codepeople-post-map'); ?></a></span>
927
+ </td>
928
+ </tr>
929
+ <tr valign="top">
930
+ <th scope="row"><label for="cpm_map_highlight_class" style="color:#CCCCCC;"><?php _e('Highlight class:', 'codepeople-post-map'); ?></label></th>
931
+ <td>
932
+ <input type="input" name="cpm_map[highlight_class]" id="cpm_map_highlight_class" disabled /><span style="color:#FF0000;"><?php _e('The highlight class is available only in commercial version of plugin.', 'codepeople-post-map');?> <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download"><?php _e('Click Here', 'codepeople-post-map'); ?></a></span>
933
+ </td>
934
+ </tr>
935
+ <tr valign="top">
936
+ <th scope="row"><label for="cpm_map_post_type" style="color:#CCCCCC;"><?php _e('Allow to associate a map to the post types:', 'codepeople-post-map'); ?></label></th>
937
+ <td valign="top">
938
+ <?php
939
+ $post_types = get_post_types(array('public' => true), 'names');
940
+ ?>
941
+ <select multiple size="3" DISABLED >
942
+ <?php
943
+ foreach($post_types as $post_type){
944
+ print '<option value="'.esc_attr($post_type).'" >'.$post_type.'</option>';
945
+ }
946
+ ?>
947
+ </select>
948
+ <?php
949
+ _e('Posts and Pages are selected by default', 'codepeople-post-map');
950
+ ?>
951
+ <br />
952
+ <span style="color:#FF0000;"><?php _e('Associate the maps to custom post types is available only in commercial version of plugin.', 'codepeople-post-map'); ?> <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map#download"><?php _e('Click Here', 'codepeople-post-map'); ?></a></span>
953
+ </td>
954
+ </tr>
955
+ </table>
956
+ <table cellpadding="10" cellspacing="10" width="500px">
957
+ <tr valign="top">
958
+ <td align="center" width="30%">
959
+ <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map" target="_blank">
960
+ <img src="<?php echo(CPM_PLUGIN_URL.'/images/routes.jpg'); ?>" width="100px" height="100px" class="cpm_thumbnail_admin" style="border:1px solid #AAA;" />
961
+ </a>
962
+ <br /><?php _e('Draws Routes', 'codepeople-post-map'); ?>
963
+ </td>
964
+ <td align="center">
965
+ <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map" target="_blank">
966
+ <img src="<?php echo(CPM_PLUGIN_URL.'/images/custom_post_type.jpg'); ?>" width="100px" height="100px" class="cpm_thumbnail_admin" style="border:1px solid #AAA;" />
967
+ </a>
968
+ <br /><?php _e('Associate maps to custom post types', 'codepeople-post-map'); ?>
969
+ </td>
970
+ <td align="center" width="30%">
971
+ <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map" target="_blank">
972
+ <img src="<?php echo(CPM_PLUGIN_URL.'/images/multiple.jpg'); ?>" width="100px" height="100px" class="cpm_thumbnail_admin" style="border:1px solid #AAA;" />
973
+ </a>
974
+ <br/><?php _e('Display a map for each post in pages with multiple posts', 'codepeople-post-map'); ?>
975
+ </td>
976
+ </tr>
977
+ </table>
978
+ <div id="metabox_basic_settings" class="postbox" >
979
+ <h3 class="hndle" style="padding:5px;"><span><?php _e( 'Troubleshoot Section', 'codepeople-post-map' ); ?></span></h3>
980
+ <div class="inside">
981
+ <table class="form-table">
982
+ <tr>
983
+ <td>
984
+ <input type="checkbox" name="cpm_load_resources_in_footer" <?php echo (get_option('cpm_load_resources_in_footer', false)) ? 'checked' : ''; ?> /> <?php _e( 'Load required resources (javascript files) in footer','codepeople-post-map'); ?>
985
+ </td>
986
+ </tr>
987
+ </table>
988
+ </div>
989
+ </div>
990
+ <script>
991
+ jQuery(function(){
992
+ jQuery('.cpm_thumbnail_admin').mouseover(function(){jQuery(this).width(300).height(300);}).mouseout(function(){jQuery(this).width(100).height(100);});
993
+ });
994
+ </script>
995
+ <p style="font-weight:bold;"><?php _e('For more information go to the <a href="http://wordpress.dwbooster.com/content-tools/codepeople-post-map" target="_blank">CodePeople Post Map</a> plugin page', 'codepeople-post-map'); ?></p>
996
+ <div class="submit"><input type="submit" class="button-primary" value="<?php esc_attr_e(__('Update Settings', 'codepeople-post-map'));?>" /></div>
997
+ <?php
998
+ // create a custom nonce for submit verification later
999
+ echo '<input type="hidden" name="cpm_map_noncename" value="' . wp_create_nonce(__FILE__) . '" />';
1000
+ ?>
1001
+ </form>
1002
+ </div>
1003
+ <?php
1004
+ } // End settings_page
1005
+
1006
+ //---------- SHORTCODE METHODS ----------
1007
+
1008
+ /*
1009
+ * Populate the attribute points
1010
+ */
1011
+ function populate_points($post_id){
1012
+ if( is_admin() ) return;
1013
+
1014
+ $point = get_post_meta($post_id, 'cpm_point', TRUE);
1015
+ if(!empty($point)){
1016
+ if(is_string($point))
1017
+ {
1018
+ $tmp_point = @unserialize($point);
1019
+ if($tmp_point !== false) $point = $tmp_point;
1020
+ }
1021
+
1022
+ if( !is_array( $point ) )
1023
+ {
1024
+ $point = array( 'address' => $point );
1025
+ }
1026
+ $point['post_id'] = $post_id;
1027
+ if(!in_array($point, $this->points)){
1028
+ $this->points[] = $point;
1029
+ }
1030
+ }
1031
+ } // End populate_points
1032
+
1033
+ /*
1034
+ * Generates the javascript code of map points, only called from webpage of multiples posts
1035
+ */
1036
+ function print_points(){
1037
+ global $id;
1038
+
1039
+ $limit = abs($this->limit);
1040
+
1041
+ $str = '';
1042
+ $current_post = '';
1043
+ $count_posts = 0;
1044
+ $count_points = 0;
1045
+
1046
+ foreach($this->points as $point){
1047
+ if(!empty($limit)){
1048
+ if($current_post != $point['post_id']){
1049
+ $current_post = $point['post_id'];
1050
+ $count_posts++;
1051
+ if( $count_posts > $limit) break;
1052
+ if( !empty($this->defaultpost) && $this->defaultpost == $current_post )
1053
+ {
1054
+ $point[ 'default' ] = 1;
1055
+ $this->defaultpost = '';
1056
+ }
1057
+ }
1058
+ }
1059
+
1060
+ $str .= $this->_set_map_point($point, $count_points);
1061
+ $count_points++;
1062
+ }
1063
+ if(strlen($str))
1064
+ {
1065
+ $str = "<script>if(typeof cpm_global != 'undefined' && typeof cpm_global['".$this->map_id."'] != 'undefined' && typeof cpm_global['".$this->map_id."']['markers'] != 'undefined'){ ".$str." }</script>";
1066
+ }
1067
+
1068
+ $this->points = array();
1069
+ print $str;
1070
+ } // End print_points
1071
+
1072
+ /**
1073
+ * Replace each [codepeople-post-map] shortcode by the map
1074
+ */
1075
+ function replace_shortcode($atts){
1076
+ global $post, $id, $cpm_objs, $cpm_in_loop;
1077
+
1078
+ // Load the plugin resources
1079
+ $this->load_resources();
1080
+
1081
+ $cpm_obj = new CPM;
1082
+ $cpm_objs[] = $cpm_obj;
1083
+
1084
+ if(is_array($atts)) $cpm_obj->extended = $atts;
1085
+
1086
+ if( !empty( $atts[ 'defaultpost' ] ) ) $cpm_obj->defaultpost = str_replace( ' ', '', $atts[ 'defaultpost' ] );
1087
+
1088
+ if( isset($id) && ( is_singular() || !empty( $cpm_in_loop ) ) ){
1089
+ $cpm_map = get_post_meta($id, 'cpm_map', TRUE);
1090
+ }
1091
+
1092
+ if(empty($cpm_map)){
1093
+ $cpm_map = $cpm_obj->get_configuration_option();
1094
+ }
1095
+
1096
+ if(!empty($cpm_map['points'])){
1097
+ $cpm_obj->limit = $cpm_map['points'];
1098
+ }
1099
+
1100
+ if( !empty( $atts[ 'points' ] ) )
1101
+ {
1102
+ $atts[ 'points' ] = trim( $atts[ 'points' ] );
1103
+ if( is_numeric( $atts[ 'points' ] ) && $atts[ 'points' ] > 0 ) $cpm_obj->limit = $atts[ 'points' ];
1104
+ }
1105
+
1106
+ $cpm_map[ 'tooltip' ] = $this->get_configuration_option('tooltip');
1107
+
1108
+ if( isset( $atts[ 'tooltip' ] ) )
1109
+ {
1110
+ $cpm_map[ 'tooltip' ] = trim($atts[ 'tooltip' ]);
1111
+ }
1112
+
1113
+ if( isset($id) && ( is_singular() || !empty( $cpm_in_loop ) ) ){ // For maps in a post or page
1114
+ // Set the actual post only to avoid duplicates
1115
+ $posts = array( $id );
1116
+
1117
+ $query_arg = array(
1118
+ 'meta_key' => 'cpm_point',
1119
+ 'post_status' => 'publish',
1120
+ 'orderby' => 'post_date',
1121
+ 'order' => 'DESC',
1122
+ 'cache_results' => false,
1123
+ 'fields' => 'ids',
1124
+ 'post__not_in' => array( $id )
1125
+ );
1126
+ if( !empty($cpm_obj->limit) ){
1127
+ $query_arg[ 'numberposts' ] = $cpm_obj->limit - 1;
1128
+ }
1129
+
1130
+ // Get POSTs in the same category
1131
+ $categories = get_the_category();
1132
+ $categories_ids = array();
1133
+ foreach($categories as $category){
1134
+ array_push( $categories_ids, $category->term_id);
1135
+ }
1136
+
1137
+ if( !empty( $categories_ids ) ){
1138
+ $query_arg[ 'category' ] = implode( ',', $categories_ids );
1139
+ }
1140
+
1141
+ $posts = array_merge( $posts, get_posts( $query_arg ) );
1142
+
1143
+ foreach( $posts as $_post){
1144
+ $cpm_obj->populate_points($_post);
1145
+ }
1146
+
1147
+ }else{
1148
+ $cpm_obj->multiple = true;
1149
+ }
1150
+
1151
+ $output = $cpm_obj->_set_map_tag($cpm_map);
1152
+ $output .= $cpm_obj->_set_map_config($cpm_map);
1153
+
1154
+ $output .= "<noscript>
1155
+ codepeople-post-map require JavaScript
1156
+ </noscript>
1157
+ ";
1158
+
1159
+ if( !empty( $atts['print'] ) ){
1160
+ print $output;
1161
+ $cpm_obj->print_points();
1162
+ return '';
1163
+ }
1164
+
1165
+ return $output;
1166
+ } // End replace_shortcode
1167
+
1168
+ /*
1169
+ * Generates the DIV tag where the map will be loaded
1170
+ */
1171
+ function _set_map_tag($atts){
1172
+ $atts = array_merge($atts, $this->extended);
1173
+ extract($atts);
1174
+ $output ='<div id="'.$this->map_id.'" class="cpm-map" style="display:none; width:'.esc_attr($width).(( strpos($width, '%') !== false ) ? '' : 'px').'; height:'.esc_attr($height).(( strpos($height, '%') !== false ) ? '' : 'px').'; ';
1175
+ switch ($align) {
1176
+ case "left" :
1177
+ $output .= 'float:left; margin:'.esc_attr($margin).'px;"';
1178
+ break;
1179
+ case "right" :
1180
+ $output .= 'float:right; margin:'.esc_attr($margin).'px;"';
1181
+ break;
1182
+ case "center" :
1183
+ $output .= 'clear:both; overflow:hidden; margin:'.esc_attr($margin).'px auto;"';
1184
+ break;
1185
+ default:
1186
+ $output .= 'clear:both; overflow:hidden; margin:'.esc_attr($margin).'px auto;"';
1187
+ break;
1188
+ }
1189
+ $output .= "></div>";
1190
+ return $output;
1191
+ } // End _set_map_tag
1192
+
1193
+ /*
1194
+ * Generates the javascript tag with map configuration
1195
+ */
1196
+ function _set_map_config($atts){
1197
+ $atts = array_merge($atts, $this->extended);
1198
+
1199
+ extract($atts);
1200
+ $default_language = $this->get_configuration_option('language');
1201
+ $output = "<script type=\"text/javascript\">\n";
1202
+
1203
+ if(isset($language))
1204
+ $output .= 'var cpm_language = {"lng":"'.esc_js($language).'"};';
1205
+ elseif(isset($default_language))
1206
+ $output .= 'var cpm_language = {"lng":"'.esc_js($default_language).'"};';
1207
+
1208
+ $api_key = $this->get_configuration_option( 'api_key' );
1209
+ $output .= "var cpm_api_key = '".esc_js((!empty( $api_key ))?trim($api_key) :'')."';\n";
1210
+
1211
+ $output .= "var cpm_global = cpm_global || {};\n";
1212
+ $output .= "cpm_global['$this->map_id'] = {}; \n";
1213
+ $output .= "cpm_global['$this->map_id']['zoom'] = $zoom;\n";
1214
+ $output .= "cpm_global['$this->map_id']['dynamic_zoom'] = ".((isset($dynamic_zoom) && $dynamic_zoom) ? 'true' : 'false').";\n";
1215
+ $output .= "cpm_global['$this->map_id']['markers'] = new Array();\n";
1216
+ $output .= "cpm_global['$this->map_id']['display'] = '$display';\n";
1217
+ $output .= "cpm_global['$this->map_id']['drag_map'] = ".( ( !isset( $drag_map ) || $drag_map ) ? 'true' : 'false' ).";\n";
1218
+ $output .= "cpm_global['$this->map_id']['highlight_class'] = '".$this->get_configuration_option('highlight_class')."';\n";
1219
+
1220
+ if(isset($tooltip))
1221
+ $output .= "cpm_global['$this->map_id']['marker_title'] = '".esc_js($tooltip)."';\n";
1222
+
1223
+ $highlight = $this->get_configuration_option('highlight');
1224
+ $output .= "cpm_global['$this->map_id']['highlight'] = ".(($highlight && !is_singular()) ? 'true' : 'false').";\n";
1225
+ $output .= "cpm_global['$this->map_id']['type'] = '$type';\n";
1226
+ $output .= "cpm_global['$this->map_id']['show_window'] = ".((isset($show_window) && $show_window) ? 'true' : 'false').";\n";
1227
+ $output .= "cpm_global['$this->map_id']['show_default'] = ".((isset($show_default) && $show_default) ? 'true' : 'false').";\n";
1228
+
1229
+ // Set maps centre
1230
+ if( !empty( $center ) )
1231
+ {
1232
+ $output .= "cpm_global['$this->map_id']['center'] = [".trim( $center )."];\n";
1233
+ }
1234
+
1235
+ // Define controls
1236
+ $output .= "cpm_global['$this->map_id']['mousewheel'] = ".((isset($mousewheel) && $mousewheel) ? 'true' : 'false').";\n";
1237
+ $output .= "cpm_global['$this->map_id']['zoompancontrol'] = ".((isset($zoompancontrol) && $zoompancontrol) ? 'true' : 'false').";\n";
1238
+ $output .= "cpm_global['$this->map_id']['fullscreencontrol'] = ".((isset($fullscreencontrol) && $fullscreencontrol) ? 'true' : 'false').";\n";
1239
+ $output .= "cpm_global['$this->map_id']['typecontrol'] = ".((isset($typecontrol) && $typecontrol) ? 'true' : 'false').";\n";
1240
+ $output .= "cpm_global['$this->map_id']['streetviewcontrol'] = ".((isset($streetviewcontrol) && $streetviewcontrol) ? 'true' : 'false').";\n";
1241
+ $output .= "cpm_global['$this->map_id']['trafficlayer'] = ".((isset($trafficlayer) && $trafficlayer) ? 'true' : 'false').";\n";
1242
+ $output .= "</script>";
1243
+
1244
+ return $output;
1245
+ } // End _set_map_config
1246
+
1247
+ /*
1248
+ * Generates the javascript code of map points
1249
+ */
1250
+ function _set_map_point($point, $index){
1251
+ if(
1252
+ empty( $point['address'] ) &&
1253
+ empty( $point['latitude'] ) &&
1254
+ empty( $point['longitude'] )
1255
+ ) return;
1256
+
1257
+ $icon = (!empty($point['icon'])) ? $point['icon'] : $this->get_configuration_option('default_icon');
1258
+ if( preg_match( '/http(s)?:\/\//i', $icon ) == 0 ) $icon = CPM_PLUGIN_URL.$icon;
1259
+ $obj = new stdClass;
1260
+ $obj->address = str_replace(array('&quot;', '&lt;', '&gt;', '&#039;', '&amp;'), array('\"', '<', '>', "'", '&'), ( ( empty( $point['address'] ) ) ? '' : $point['address'] ) );
1261
+
1262
+ if(!empty($point['latitude']) ) $obj->lat = $point['latitude'];
1263
+ if(!empty($point['longitude']) )$obj->lng = $point['longitude'];
1264
+
1265
+ $obj->info = str_replace(array('&quot;', '&lt;', '&gt;', '&#039;', '&amp;'), array('\"', '<', '>', "'", '&'), $this->_get_windowhtml($point));
1266
+
1267
+ $obj->icon = $icon;
1268
+ $obj->post = $point['post_id'];
1269
+ $obj->default = ( !empty( $point[ 'default' ] ) ) ? true : false;
1270
+ return 'cpm_global["'.$this->map_id.'"]["markers"]['.$index.'] = '.json_encode( $obj ).';';
1271
+ } // End _set_map_point
1272
+
1273
+ function _get_img_id($url){
1274
+ global $wpdb;
1275
+ $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM " . $wpdb->prefix . "posts" . " WHERE guid='%s';", $url ));
1276
+ return $attachment[0];
1277
+ } // End get_img_id
1278
+
1279
+ /**
1280
+ * Get the html info associated to point marker
1281
+ */
1282
+ function _get_windowhtml(&$point) {
1283
+
1284
+ $windowhtml = "";
1285
+ $windowhtml_frame = $this->get_configuration_option('windowhtml');
1286
+
1287
+ $point_title = (!empty($point['name'])) ? $point['name'] : get_the_title($point['post_id']);
1288
+ $point_link = (!empty($point['post_id'])) ? get_permalink($point['post_id']) : '';
1289
+
1290
+ if (isset($point['thumbnail']) && $point['thumbnail'] != "") {
1291
+ $point_img_url = $point['thumbnail'];
1292
+ if(preg_match("/attachment_id=(\d+)/i", $point['thumbnail'], $matches)){
1293
+ $thumb = wp_get_attachment_image_src($matches[1], 'thumbnail');
1294
+ if(is_array($thumb))$point_thumbnail = $thumb[0];
1295
+ }else{
1296
+ $point_thumbnail = $point['thumbnail'];
1297
+ }
1298
+ if( !empty( $point_thumbnail ) ) $point_img_url = $point_thumbnail;
1299
+ }else
1300
+ {
1301
+ $featured_image = $this->get_configuration_option( 'featured_image' );
1302
+ if( !empty( $featured_image ) )
1303
+ {
1304
+ $featured_image_url = wp_get_attachment_url( get_post_thumbnail_id( $point['post_id'] ) );
1305
+ if( $featured_image_url ) $point_img_url = $featured_image_url;
1306
+ }
1307
+ }
1308
+
1309
+ $point_description = ( !empty( $point['description'] ) ) ? $point['description'] : $this->_get_excerpt($point['post_id']);
1310
+ $point_address = ( isset( $point['address'] ) ) ? $point['address'] : '';
1311
+
1312
+ if( !empty( $point_img_url ) ) {
1313
+ $point_img = "<img src='".$point_img_url."' style='margin:8px 0 0 8px !important; width:90px; height:90px' align='right' />";
1314
+ $html_width = "310px";
1315
+ } else {
1316
+ $point_img = "";
1317
+ $html_width = "auto";
1318
+ }
1319
+
1320
+ $find = array("%title%","%link%","%thumbnail%", "%excerpt%","%description%","%address%","%width%","\r\n","\f","\v","\t","\r","\n","\\","\"");
1321
+ $replace = array($point_title,$point_link,$point_img,"",$point_description,$point_address,$html_width,"","","","","","","","'");
1322
+
1323
+ $windowhtml = str_replace( $find, $replace, $windowhtml_frame);
1324
+
1325
+ return $windowhtml;
1326
+ } // End _get_windowhtml
1327
+
1328
+ /**
1329
+ * Get the excerpt from content
1330
+ */
1331
+ function _get_excerpt($post_id) { // Fakes an excerpt if needed
1332
+
1333
+ $content_post = get_post($post_id);
1334
+ $content = $content_post->post_content;
1335
+
1336
+ if ( '' != $content ) {
1337
+ return wp_trim_words( strip_shortcodes( $content ), 10 );
1338
+ }
1339
+ return $content;
1340
+ } // End _get_excerpt
1341
+
1342
+ /*
1343
+ Set a link to contact page
1344
+ */
1345
+ function customizationLink($links) {
1346
+ $settings_link = '<a href="https://wordpress.org/support/plugin/codepeople-post-map/#new-post" target="_blank">'.__('Help').'</a>';
1347
+ array_unshift($links, $settings_link);
1348
+ $settings_link = '<a href="http://wordpress.dwbooster.com/contact-us" target="_blank">'.__('Request custom changes', 'codepeople-post-map').'</a>';
1349
+ array_unshift($links, $settings_link);
1350
+ return $links;
1351
+ } // End customizationLink
1352
+ } // End CPM class
1353
+ ?>
js/cpm.admin.js ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * CodePeople Post Map
3
+ * Version: 1.0.1
4
+ * Author: CodePeople
5
+ * Plugin URI: http://wordpress.dwbooster.com
6
+ */
7
+
8
+ (function ($) {
9
+ var _latlng_btn, _api_key = '';
10
+
11
+ if(
12
+ typeof cpm_global != 'undefined' &&
13
+ typeof cpm_global['api_key'] != 'undefined' &&
14
+ cpm_global['api_key'] != ''
15
+ ) _api_key = 'key='+cpm_global['api_key']+'&';
16
+
17
+ window["cpm_thumbnail_selection"] = function(e){
18
+ var thumbnail_field = $(e).parent().find('input[type="text"]');
19
+ var media = wp.media({
20
+ title: 'Select Point Thumbnail',
21
+ button: {
22
+ text: 'Select Image'
23
+ },
24
+ multiple: false
25
+ }).on('select',
26
+ (function( field ){
27
+ return function() {
28
+ var attachment = media.state().get('selection').first().toJSON();
29
+ if( !/image/g.test( attachment.mime ) ) return;
30
+ var fullSize = attachment.url;
31
+ var imgUrl = (typeof attachment.sizes.thumbnail === "undefined") ? fullSize : attachment.sizes.thumbnail.url;
32
+ field.val( imgUrl );
33
+ };
34
+ })( thumbnail_field )
35
+ ).open();
36
+ return false;
37
+ };
38
+
39
+ //---------------------------------------------------------
40
+
41
+ function _get_latlng(request, callback){
42
+ var g = new google.maps.Geocoder();
43
+ g.geocode(request, callback);
44
+ };
45
+
46
+ window['cpm_get_latlng'] = function (){
47
+ function transform( v )
48
+ {
49
+ if( $.isNumeric( v ) ) return v;
50
+ v = v.replace(/[\W_]/g, " " ).replace(/\s+/g, ' ' ).replace( /^\s+/, '' ).replace( /\s+$/, '' ).toLowerCase();
51
+ var ref = ( /[ne]/.test( v ) ) ? 1 : -1,
52
+ parts = v.split( ' ' ),
53
+ l = parts.length;
54
+
55
+ if( l >= 3 ) return ref * ( parts[ l - 3 ]*1 + parts[ l - 2 ]*1 / 60 + parts[ l - 1 ]*1 / 3600 );
56
+ return v;
57
+ };
58
+
59
+ var f = _latlng_btn.parents('.point_form'),
60
+ a = $('#cpm_point_address').val(),
61
+ longitude = $('#cpm_point_longitude').val(),
62
+ latitude = $('#cpm_point_latitude').val(),
63
+ language = $('#cpm_map_language').val(),
64
+ request = {};
65
+
66
+ // Remove unnecessary spaces characters
67
+ longitude = longitude.replace(/^\s+/, '').replace(/\s+$/, '');
68
+ latitude = latitude.replace(/^\s+/, '').replace(/\s+$/, '');
69
+ a = a.replace(/^\s+/, '').replace(/\s+$/, '');
70
+
71
+ if(longitude.length && latitude.length){
72
+ request['location'] = new google.maps.LatLng( transform( latitude ), transform( longitude ) );
73
+ }else if(a.length){
74
+ request['address'] = a.replace(/[\n\r]/g, '');
75
+ }else{
76
+ return false;
77
+ }
78
+
79
+ _get_latlng(
80
+ request,
81
+ (function( a, r )
82
+ {
83
+ return function(result, status)
84
+ {
85
+ if(status && status == "OK"){
86
+ // Update fields
87
+ var address = ( $.trim( a ).length && typeof r[ 'location' ] != 'undefined' ) ? a : result[0]['formatted_address'],
88
+ latitude = result[0]['geometry']['location'].lat(),
89
+ longitude = result[0]['geometry']['location'].lng();
90
+
91
+ if(address && latitude && longitude){
92
+ $('#cpm_point_address').val(address);
93
+ $('#cpm_point_longitude').val(longitude);
94
+ $('#cpm_point_latitude').val(latitude);
95
+
96
+ // Load Map
97
+ cpm_load_map(f.find('.cpm_map_container'),latitude, longitude);
98
+ }
99
+ }else{
100
+ alert('The point is not located');
101
+ }
102
+ };
103
+
104
+ } )( a, request )
105
+ );
106
+ };
107
+
108
+ // Check the point or address existence
109
+ window['cpm_checking_point'] = function (e){
110
+ var language = 'en';
111
+ _latlng_btn = $(e);
112
+
113
+ if(typeof google != 'undefined' && google.maps){
114
+ cpm_get_latlng();
115
+ }else{
116
+ $('<script type="text/javascript" src="'+(( typeof window.location.protocol != 'undefined' ) ? window.location.protocol : 'http:' )+'//maps.google.com/maps/api/js?'+_api_key+'callback=cpm_get_latlng'+((language) ? '&language='+language: '')+'"></script>').appendTo('body');
117
+ }
118
+ };
119
+
120
+ window['cpm_load_map'] = function(container, latitude, longitude){
121
+ var c = container,
122
+ f = c.parents('.point_form'),
123
+ p = new google.maps.LatLng(latitude, longitude),
124
+ m = new google.maps.Map(c[0], {
125
+ zoom: 5,
126
+ center: p,
127
+ mapTypeId: google.maps.MapTypeId['ROADMAP'],
128
+
129
+ // Show / Hide controls
130
+ panControl: true,
131
+ scaleControl: true,
132
+ zoomControl: true,
133
+ mapTypeControl: true,
134
+ scrollWheel: true
135
+ }),
136
+ mk = new google.maps.Marker({
137
+ position: p,
138
+ map: m,
139
+ icon: new google.maps.MarkerImage(cpm_default_marker),
140
+ draggable: true
141
+ });
142
+
143
+ google.maps.event.addListener(m, "click", function(e){
144
+ var latLng = e.latLng;
145
+ mk.setPosition(latLng);
146
+ });
147
+
148
+ google.maps.event.addListener(mk, 'position_changed', function(){
149
+ f.find('#cpm_point_latitude').val(mk.getPosition().lat());
150
+ f.find('#cpm_point_longitude').val(mk.getPosition().lng());
151
+ });
152
+ };
153
+
154
+ window['cpm_set_map_flag'] = function(){
155
+ var request = {};
156
+ if(cpm_point['longitude'] && cpm_point['latitude']){
157
+ request['location'] = new google.maps.LatLng(cpm_point['latitude'], cpm_point['longitude']);
158
+ }else if(cpm_point['address']){
159
+ request['address'] = cpm_point['address'].replace(/[\n\r]/g, '');
160
+ }
161
+
162
+ _get_latlng(request, function(result, status){
163
+ if(status && status == "OK"){
164
+ // Update fields
165
+ var address = result[0]['formatted_address'],
166
+ latitude = result[0]['geometry']['location'].lat(),
167
+ longitude = result[0]['geometry']['location'].lng();
168
+
169
+ if(address && latitude && longitude){
170
+ // Load Map
171
+ cpm_load_map($('.cpm_map_container'),latitude, longitude);
172
+ }
173
+ }
174
+ });
175
+ };
176
+
177
+ window[ 'cpm_display_more_info' ] = function( e ){
178
+ e = $( e );
179
+ e.parent().hide().siblings( '.cpm_more_info' ).show();
180
+ };
181
+
182
+ window[ 'cpm_hide_more_info' ] = function( e ){
183
+ e = $( e );
184
+ e.parent().hide().siblings( '.cpm_more_info_hndl' ).show();
185
+ };
186
+
187
+ function enable_disable_fields(f, v){
188
+ var p = f.parents('#map_data');
189
+ p.find('input[type="text"]').attr({'DISABLED':v,'READONLY':v});
190
+ p.find('select').attr({'DISABLED':v,'READONLY':v});
191
+ p.find('input[type="checkbox"]').filter('[id!="cpm_map_single"]').attr({'DISABLED':v,'READONLY':v});
192
+ };
193
+
194
+ $(function(){
195
+ // Actions for icons
196
+ $(".cpm_icon").click(function(){
197
+ var i = $(this);
198
+ $('.cpm_icon.cpm_selected').removeClass('cpm_selected');
199
+ i.addClass('cpm_selected');
200
+ $('#default_icon').val($('img', i).attr('src'));
201
+ }).mouseover(function(){
202
+ $(this).css({"border":"solid #BBBBBB 1px"})
203
+ }).mouseout(function(){
204
+ $(this).css({"border":"solid #F9F9F9 1px"})
205
+ });
206
+
207
+ window[ 'cpm_generate_shortcode' ] = function()
208
+ {
209
+ return '[codepeople-post-map]';
210
+ };
211
+
212
+ // Action for insert shortcode
213
+ $('#cpm_map_shortcode').click(function(){
214
+ if(window.cpm_send_to_editor_default)
215
+ window.send_to_editor = window.cpm_send_to_editor_default;
216
+ if(send_to_editor){
217
+ send_to_editor(cpm_generate_shortcode());
218
+ }
219
+ var t = $('#content');
220
+ if(t.length){
221
+ var v= t.val()
222
+ if(v.indexOf('codepeople-post-map') == -1)
223
+ t.val(v+'[codepeople-post-map]');
224
+ }
225
+ });
226
+
227
+ // Create the script tag and load the maps api
228
+ if($('.cpm_map_container').length){
229
+ $('<script type="text/javascript" src="'+(( typeof window.location.protocol != 'undefined' ) ? window.location.protocol : 'http:' )+'//maps.google.com/maps/api/js?'+_api_key+'sensor=false&callback=cpm_set_map_flag"></script>').appendTo('body');
230
+ }
231
+
232
+ $('#cpm_map_single').each(function(){
233
+ var f = $(this);
234
+ enable_disable_fields(f, !f[0].checked);
235
+ f.click(function(){
236
+ enable_disable_fields(f,!f[0].checked);
237
+ });
238
+ });
239
+ });
240
+ })(jQuery);
js/cpm.js ADDED
@@ -0,0 +1,383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * CodePeople Post Map
3
+ * Version: 1.0.1
4
+ * Author: CodePeople
5
+ * Plugin URI: http://wordpress.dwbooster.com
6
+ */
7
+
8
+ var CodePeoplePostMapPublicCounter = 0;
9
+ function CodePeoplePostMapPublic()
10
+ {
11
+ CodePeoplePostMapPublicCounter++;
12
+ if( typeof jQuery == 'undefined' )
13
+ {
14
+ if( CodePeoplePostMapPublicCounter <= 6 ) setTimeout( function(){ CodePeoplePostMapPublic() }, 1000 );
15
+ return;
16
+ }
17
+ jQuery(function( $ ){
18
+ // Create a class with CodePeople Post Map functionalities and attributes
19
+ $.CPM = function(id, config){
20
+ this.data = $.extend(true, {}, this.defaults, config);
21
+ this.id = id;
22
+ this.markers = [];
23
+ this.uniqueMarkers = [];
24
+ if( typeof this.data[ 'center' ] == 'object' && typeof this.data.center.length != 'undefined' && this.data.center.length == 2 )
25
+ {
26
+ this.data.center = new google.maps.LatLng( this.data.center[ 0 ], this.data.center[ 1 ] );
27
+ }
28
+ else
29
+ {
30
+ this.data.center = null;
31
+ }
32
+ };
33
+
34
+ $.CPM.prototype = {
35
+ defaults : {
36
+ markers : [],
37
+ marker_title : 'title',
38
+ zoom : 10,
39
+ dynamic_zoom : false,
40
+ drag_map : true,
41
+ type : 'ROADMAP',
42
+ mousewheel : true,
43
+ scalecontrol : true,
44
+ zoompancontrol : true,
45
+ fullscreencontrol: true,
46
+ typecontrol : true,
47
+ streetviewcontrol : true,
48
+ trafficlayer : false,
49
+ show_window : true,
50
+ show_default : true,
51
+ display : 'map',
52
+ highlight : true,
53
+ highlight_class : 'cpm_highlight'
54
+ },
55
+
56
+ // private methods to complete every steps in map generation
57
+ _correct : function( v ){
58
+ v = (new String(v)).replace(/[^\d\+\-\.]/g, '');
59
+ return v*1;
60
+ },
61
+
62
+ _empty : function (v){
63
+ return (!v || /^\s*$/.test(v));
64
+ },
65
+
66
+ _get_latlng : function(i){
67
+ var me = this,
68
+ g = new google.maps.Geocoder(),
69
+ m = me.data.markers,
70
+ a = m[i]['address'];
71
+
72
+ g.geocode({address:a}, function(result, status){
73
+ me.counter--;
74
+ if(status && status == "OK"){
75
+ m[i]['latlng'] = new google.maps.LatLng(me._correct(result[0]['geometry']['location'].lat()), me._correct(result[0]['geometry']['location'].lng()));
76
+ }else{
77
+ m[i]['invalid'] = true;
78
+ }
79
+
80
+ // All points have been checked now is possible to load the map
81
+ if(me.counter == 0){
82
+ me._load_map();
83
+ }
84
+ });
85
+ },
86
+ _str_transform : function( t ){
87
+ return t.replace( /&lt;/g, '<')
88
+ .replace( /&gt;/g, '>')
89
+ .replace( /&amp;/g, '&')
90
+ .replace( /&quot;/g, '"')
91
+ .replace(/\\'/g, "'")
92
+ .replace(/\\"/g, '"' );
93
+ },
94
+ _unique : function( l ){
95
+ var rtn = [];
96
+ this.uniqueMarkers = [];
97
+ for( var i = 0, h = l.length; i < h; i++ )
98
+ {
99
+ if( typeof this.uniqueMarkers[ l[ i ].position.toString() ] == 'undefined' )
100
+ {
101
+ this.uniqueMarkers[ l[ i ].position.toString() ] = [];
102
+ rtn.push( l[ i ] );
103
+ }
104
+ else
105
+ {
106
+ l[ i ].visible = false;
107
+ }
108
+ this.uniqueMarkers[ l[ i ].position.toString() ].push( l[ i ] );
109
+ }
110
+
111
+ return rtn;
112
+ },
113
+ _load_map : function(){
114
+
115
+ var me = this,
116
+ m = me.data.markers,
117
+ h = m.length,
118
+ c = 0,
119
+ v = 0; // Number of valid points
120
+
121
+ while(c < h && m[c]['invalid']) c++;
122
+
123
+ if(c < h){
124
+ me.map = new google.maps.Map($('#'+me.id)[0], {
125
+ zoom: me.data.zoom,
126
+ center: ( typeof me.data.center != 'undefined' && me.data.center != null ) ? me.data.center : m[c].latlng,
127
+ mapTypeId: google.maps.MapTypeId[me.data.type],
128
+ draggable: me.data.drag_map,
129
+
130
+ // Show / Hide controls
131
+ scaleControl: me.data.scalecontrol,
132
+ zoomControl: me.data.zoompancontrol,
133
+ mapTypeControl: me.data.typecontrol,
134
+ streetViewControl: me.data.streetviewcontrol,
135
+ scrollwheel: me.data.mousewheel,
136
+ fullscreenControl: me.data.fullscreencontrol
137
+ });
138
+
139
+ var map = me.map,
140
+ bounds = new google.maps.LatLngBounds(),
141
+ default_point = -1;
142
+
143
+ if(me.data.trafficlayer)
144
+ {
145
+ var trafficLayer = new google.maps.TrafficLayer();
146
+ trafficLayer.setMap(me.map);
147
+ }
148
+
149
+ if( me.data.show_default ){
150
+ google.maps.event.addListenerOnce(map, 'idle', function(){
151
+ setTimeout(function(){
152
+ if( me.markers.length ) google.maps.event.trigger( ( ( default_point < 0 ) ? me.markers[ 0 ] : me.markers[ default_point ] ), 'click' );
153
+ }, 1000);
154
+ });
155
+ }
156
+ me.infowindow = new google.maps.InfoWindow();
157
+ var title = null;
158
+ for (var i = c; i < h; i++){
159
+ if(!m[i]['invalid']){
160
+ if( typeof m[ i ][ 'default' ] != 'undefined' && m[ i ][ 'default' ] )
161
+ {
162
+ default_point = me.markers.length;
163
+ }
164
+
165
+ bounds.extend(m[i].latlng);
166
+
167
+ if(/title/i.test(me['data']['marker_title']))
168
+ title = me._str_transform($( m[i].info ).find('.title').text());
169
+ else if(/address/i.test(me['data']['marker_title']))
170
+ title = (m[i].address) ? me._str_transform(m[i].address) : '';
171
+
172
+ var marker = new google.maps.Marker({
173
+ position: m[i].latlng,
174
+ map: map,
175
+ icon: new google.maps.MarkerImage(m[i].icon.replace(/^http:/i, '')),
176
+ title:title
177
+ });
178
+
179
+ marker.id = i;
180
+ me.markers.push(marker);
181
+ google.maps.event.addListener(marker, 'click', function(){ me.open_infowindow(this); });
182
+ google.maps.event.addListener(marker, 'mouseover', function(){ me.set_highlight(this); });
183
+ google.maps.event.addListener(marker, 'mouseout', function(){ me.unset_highlight(this); });
184
+ }
185
+ }
186
+ me._unique( me.markers );
187
+ if (h > 1 && me.data.dynamic_zoom) {
188
+ setTimeout( ( function( m, b ){ return function(){ m.fitBounds( b ); }; } )( map, bounds ), 500 );
189
+ }
190
+ else if (h == 1 || !me.data.dynamic_zoom) {
191
+ if( typeof me.data.center != 'undefined' && me.data.center != null )
192
+ {
193
+ map.setCenter( me.data.center );
194
+ }
195
+ else
196
+ {
197
+ if( default_point != -1 )
198
+ {
199
+ map.setCenter( me.markers[ default_point ].getPosition() );
200
+ }
201
+ else
202
+ {
203
+ map.setCenter(bounds.getCenter());
204
+ }
205
+ }
206
+ map.setZoom(me.data.zoom);
207
+ }
208
+ }
209
+ else
210
+ {
211
+ $('#'+me.id).hide();
212
+ }
213
+ },
214
+
215
+ // public methods
216
+ set_map: function(){
217
+ if(this.data.markers.length){
218
+
219
+ var m = this.data.markers,
220
+ h = m.length;
221
+
222
+ this.counter = h; // Counter is used to know the momment where all latitudes or longitudes were calculated
223
+
224
+ for(var i=0; i < h; i++){
225
+ if(typeof m[i] == 'undefined')
226
+ {
227
+ m[i] = {'invalid':true};
228
+ this.counter--;
229
+ continue;
230
+ }else if( (this._empty(m[i].lat) || this._empty(m[i].lng)) && !this._empty(m[i].address)){
231
+ this._get_latlng(i);
232
+ }else if(this._empty(m[i].lat) && this._empty(m[i].lng)){
233
+ // The address is not present so the point may be removed from the list
234
+ m[i]['invalid'] = true;
235
+ this.counter--;
236
+ }else{
237
+ m[i]['latlng'] = new google.maps.LatLng(this._correct(m[i].lat), this._correct(m[i].lng));
238
+ this.counter--;
239
+ }
240
+
241
+ }
242
+
243
+ // All points have been checked now is possible to load the map
244
+ if(this.counter == 0){
245
+ this._load_map();
246
+ }
247
+ }
248
+ },
249
+
250
+ // Open the marker bubble
251
+ open_infowindow : function(m){
252
+ var me = this,
253
+ info = '',
254
+ unique = me.uniqueMarkers[ m.position.toString() ];
255
+
256
+ if ( !me.data.show_window ) return;
257
+
258
+ // Get the information of all concident points
259
+ for( var i = 0, h = unique.length; i < h; i++ )
260
+ {
261
+ info += ( i < h-1 ) ? $( '<div></div>').html( me.data.markers[ unique[ i ].id ].info ).find( '.cpm-infowindow-additional' ).remove().end().html() : me.data.markers[ unique[ i ].id ].info;
262
+ }
263
+
264
+ var c = me._str_transform( info ),
265
+ img = $( c.replace( '%additional%', '' ) ).find( 'img' );
266
+
267
+ if( img.length )
268
+ {
269
+ var count = img.length;
270
+ img.each( function(){
271
+ $( '<img src="'+$(this).attr( 'src' ) +'">' ).on('load', (function( c, m ){
272
+ return function(){
273
+ count--;
274
+ if( count == 0 )
275
+ {
276
+ me.infowindow.setContent( c );
277
+ me.infowindow.open( me.map, m );
278
+ }
279
+ };
280
+ } )( c, m ) );
281
+ } );
282
+ }
283
+ else
284
+ {
285
+ c += '<style>.cpm-infowindow{ min-height:auto !important; } </style>';
286
+ me.infowindow.setContent( c );
287
+ me.infowindow.open( me.map, m );
288
+ }
289
+ },
290
+
291
+ // Set the highlight class to the post with ID m['post']
292
+ set_highlight : function(m){
293
+ if(this.data.highlight){
294
+ var id = this.data.markers[m.id]['post'];
295
+ $('.post-'+id).addClass(this.data.highlight_class);
296
+ }
297
+ },
298
+
299
+ // Remove the highlight class from the post with ID m['post_id']
300
+ unset_highlight : function(m){
301
+ if(this.data.highlight){
302
+ var id = this.data.markers[m.id]['post'];
303
+ $('.post-'+id).removeClass(this.data.highlight_class);
304
+ }
305
+ }
306
+ };
307
+ // End CPM class definition
308
+
309
+ // Callback function to be called after loading the maps api
310
+ function initialize( e )
311
+ {
312
+ var map_container = $( e ),
313
+ map_id = map_container.attr('id');
314
+
315
+ if( map_container.parent().is( ':hidden' ) )
316
+ {
317
+ setTimeout( function(){ initialize( e ); }, 500 );
318
+ return;
319
+ }
320
+
321
+ if(cpm_global && cpm_global[map_id] && cpm_global[map_id]['markers'].length){
322
+ // The maps data are defined
323
+ var cpm = new $.CPM(map_id, cpm_global[map_id]);
324
+
325
+ // Display map
326
+ if(cpm_global[map_id]['display'] == 'map'){
327
+ map_container.show();
328
+ cpm.set_map();
329
+ }else{
330
+ // Insert a icon to display map
331
+ var map_icon = $('<div class="cpm-mapicon"></div>');
332
+ map_icon.click(function(){
333
+ if(map_container.is( ':visible' ))
334
+ {
335
+ map_container.hide();
336
+ }
337
+ else
338
+ {
339
+ map_container.show();
340
+ cpm.set_map();
341
+ }
342
+ });
343
+ map_icon.insertBefore(map_container);
344
+ }
345
+ }
346
+ };
347
+
348
+ window['cpm_init'] = function(){
349
+ $('.cpm-map').each(function(){
350
+ if( $( this ).parent().is( ':hidden' ) )
351
+ {
352
+ setTimeout(
353
+ ( function ( e )
354
+ {
355
+ return function(){ initialize( e ); };
356
+ } )( this ),
357
+ 500
358
+ );
359
+ }
360
+ else
361
+ {
362
+ initialize( this );
363
+ }
364
+ });
365
+ };
366
+
367
+ var map = $('.cpm-map');
368
+ if(map.length){
369
+ if(typeof google == 'undefined' || google['maps'] == null){
370
+ // Create the script tag and load the maps api
371
+ var script=document.createElement('script');
372
+ script.type = "text/javascript";
373
+ script.src=(( typeof window.location.protocol != 'undefined' ) ? window.location.protocol : 'http:' )+'//maps.google.com/maps/api/js?'+((typeof cpm_api_key != 'undefined' && cpm_api_key != '')? 'key='+cpm_api_key+'&' :'')+'callback=cpm_init'+((typeof cpm_language != 'undefined' && cpm_language.lng) ? '&language='+cpm_language.lng: '');
374
+ document.body.appendChild(script);
375
+ }else{
376
+ cpm_init();
377
+ }
378
+ }
379
+ });
380
+ }
381
+
382
+ if( typeof jQuery == 'undefined' ) setTimeout( function(){ CodePeoplePostMapPublic() }, 1000 );
383
+ else CodePeoplePostMapPublic();
js/gutenberg.js ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( blocks, element ) {
2
+ var el = element.createElement,
3
+ source = blocks.source;
4
+
5
+ /* Hide the button required by the classic editor */
6
+ jQuery(function(){
7
+ jQuery('#cpm_map_shortcode').hide();
8
+ });
9
+
10
+ /* Plugin Category */
11
+ blocks.getCategories().push({slug: 'cpgm', title: 'CP Google Maps'});
12
+
13
+ /* ICONS */
14
+ const iconCPGM = el('img', { width: 20, height: 20, src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAiCAYAAABfqvm9AAAABGdBTUEAAK/INwWK6QAAAxFJREFUSMetlktME2EQx5dHBaE8rAgULFBoQRA1QQVBCopQg0ahajSlB0EoEWhpiw8UH0g8kAgioCcvmBhPHo0XD3jwrIlRYmLiRUAjFIOPSEzIjv8pLdIXj5ZJfkmz3+6vOzvfzK4g+I900AiGwSMnD0AzyBLWEFGgB0xFSyRUKE+ikzlZdArsS0km6QYJYW0G9IKYlWRK8Foujaa+gyU00XpWpKtmkW5YyQF+f2mrF4cOaUgRI2Xxe7DNn0wFxrUZCrJbGkXq7iDqaifqbHOny0y8NmtrphqVkqXfQL6nbCN4c1ipoL+dJqJrPkSe4Jx5yHXqTJZ+ALFLhd2pSHPKahRXJVu823aavXBezIyPZWmfSyYHnwcqSx2prFrmAtc8rK5g4ZSzBoI+ShJOE6YGfuhuJ0+21VP3/r2UlyBzwL/5mJsQ19iR2abICJY2sbB/d3KizwKwAOtu8DGvu7xuoTJFCq8PsnDkuFqJbWHzOpHvylPIx7yEN21Ul5fN6yMOYQ0qxQeDERq25ywKB/bIg03ZSuVpqbw+xMI6brFJ87kAi2KiGdtiUYwsTAWT97XlgW0bpDtytJJldme3OeLWVmxsu61Z9Nlufje2mX5ebBFV8XEs7F/aKVIwVotqz/Mw8EjdJ0gVfy46q/sJyDz7OYdT1+eq0acWoium5YUohHFXHsumwU5/E6cA/OgpLcKz6Vi23Yarylg2BzQrzcQzIdgeLw0nFmag15Sx0DujQYwKD2dh62qn9uP8LZtp7nKr6JU6hEcy01k2upbXQAaYvVepce8gPLfnp4+5NnmJsMa4o8Sc+3Op5f9dYgholWkseyYEEArw66mueuFZYn+OGQ0UGhLCQq0QYDxxDA4WIvUeTRHL3gpBhE4WGUnfrUZHuoUpSSy8HYwwgYszqq+laUsTRYSFsbBYCDJe3a0opVG9jmVfQXSwwsGGHbnUe6CYhS+EdQijBu8L/hzxnCiBhjY9LoayZfHk/HgKOgo2hIW6ClK1HkI1EJ3tVrQewkTw2ylUrYcwAnwE4yBupZP/ASesGLIiyjDFAAAAAElFTkSuQmCC" } );
15
+
16
+ /* CP Google Maps Code */
17
+ blocks.registerBlockType( 'cpgm/map', {
18
+ title: 'CP Google Maps',
19
+ icon: iconCPGM,
20
+ category: 'cpgm',
21
+ supports: {
22
+ customClassName: false,
23
+ className: false
24
+ },
25
+
26
+ attributes: {
27
+ shortcode : {
28
+ type : 'text'
29
+ }
30
+ },
31
+
32
+ edit: function( props ) {
33
+ var focus = props.focus;
34
+
35
+ function onChangeMap(evt)
36
+ {
37
+ props.setAttributes({shortcode: evt.target.value});
38
+ };
39
+
40
+ if(typeof props.attributes.shortcode == 'undefined')
41
+ {
42
+ props.setAttributes({shortcode:cpm_generate_shortcode()});
43
+ }
44
+
45
+ return el(
46
+ 'textarea',
47
+ {
48
+ key : 'cpgm-shortcode',
49
+ onChange: onChangeMap,
50
+ value : props.attributes.shortcode,
51
+ style : {width:"100%", resize: "vertical"}
52
+ }
53
+ );
54
+ },
55
+
56
+ save: function( props ) {
57
+ return props.attributes.shortcode || '[codepeople-post-map]';
58
+ }
59
+ });
60
+ } )(
61
+ window.wp.blocks,
62
+ window.wp.element
63
+ );
languages/codepeople-post-map-es_ES.mo ADDED
Binary file
languages/codepeople-post-map-es_ES.po ADDED
@@ -0,0 +1,767 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: codepeople-post-map\n"
4
+ "POT-Creation-Date: 2014-12-27 02:32+0100\n"
5
+ "PO-Revision-Date: 2014-12-27 02:33+0100\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: CodePeople\n"
8
+ "Language: es\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 1.5.7\n"
13
+ "X-Poedit-KeywordsList: __;gettext;gettext_noop;_e\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-SearchPath-0: ..\n"
17
+
18
+ #: ../codepeople-post-map.php:87
19
+ msgid "Associate an address to the post for Google Maps association"
20
+ msgstr "Asociar una dirección al puesto de asociación Google Maps"
21
+
22
+ #: ../include/functions.php:50
23
+ msgid "ARABIC"
24
+ msgstr "ÁRABE"
25
+
26
+ #: ../include/functions.php:51 ../include/functions.php:63
27
+ msgid "BASQUE"
28
+ msgstr "VASCO"
29
+
30
+ #: ../include/functions.php:52
31
+ msgid "BULGARIAN"
32
+ msgstr "Búlgaro"
33
+
34
+ #: ../include/functions.php:53
35
+ msgid "BENGALI"
36
+ msgstr "BENGALI"
37
+
38
+ #: ../include/functions.php:54
39
+ msgid "CATALAN"
40
+ msgstr "CATALÁN"
41
+
42
+ #: ../include/functions.php:55
43
+ msgid "CZECH"
44
+ msgstr "CHECA"
45
+
46
+ #: ../include/functions.php:56
47
+ msgid "DANISH"
48
+ msgstr "Danés"
49
+
50
+ #: ../include/functions.php:57
51
+ msgid "GERMAN"
52
+ msgstr "ALEMAN"
53
+
54
+ #: ../include/functions.php:58
55
+ msgid "GREEK"
56
+ msgstr "Griego"
57
+
58
+ #: ../include/functions.php:59
59
+ msgid "ENGLISH"
60
+ msgstr "Inglés"
61
+
62
+ #: ../include/functions.php:60
63
+ msgid "ENGLISH (AUSTRALIAN)"
64
+ msgstr "ENGLISH ( AUSTRALIA )"
65
+
66
+ #: ../include/functions.php:61
67
+ msgid "ENGLISH (GREAT BRITAIN)"
68
+ msgstr "INGLÉS ( GRAN BRETAÑA )"
69
+
70
+ #: ../include/functions.php:62
71
+ msgid "SPANISH"
72
+ msgstr "ESPAÑOL"
73
+
74
+ #: ../include/functions.php:64
75
+ msgid "FARSI"
76
+ msgstr "FARSI"
77
+
78
+ #: ../include/functions.php:65
79
+ msgid "FINNISH"
80
+ msgstr "FINLANDIA"
81
+
82
+ #: ../include/functions.php:66
83
+ msgid "FILIPINO"
84
+ msgstr "FILIPINO"
85
+
86
+ #: ../include/functions.php:67
87
+ msgid "FRENCH"
88
+ msgstr "FRANCÉS"
89
+
90
+ #: ../include/functions.php:68
91
+ msgid "GALICIAN"
92
+ msgstr "GALLEGO"
93
+
94
+ #: ../include/functions.php:69
95
+ msgid "GUJARATI"
96
+ msgstr "GUJARATI"
97
+
98
+ #: ../include/functions.php:70
99
+ msgid "HINDI"
100
+ msgstr "HINDI"
101
+
102
+ #: ../include/functions.php:71
103
+ msgid "CROATIAN"
104
+ msgstr "Croata"
105
+
106
+ #: ../include/functions.php:72
107
+ msgid "HUNGARIAN"
108
+ msgstr "Húngara"
109
+
110
+ #: ../include/functions.php:73
111
+ msgid "INDONESIAN"
112
+ msgstr "Indonesia"
113
+
114
+ #: ../include/functions.php:74
115
+ msgid "ITALIAN"
116
+ msgstr "Italiano"
117
+
118
+ #: ../include/functions.php:75
119
+ msgid "HEBREW"
120
+ msgstr "HEBREW"
121
+
122
+ #: ../include/functions.php:76
123
+ msgid "JAPANESE"
124
+ msgstr "JAPONÉS"
125
+
126
+ #: ../include/functions.php:77
127
+ msgid "KANNADA"
128
+ msgstr "KANNADA"
129
+
130
+ #: ../include/functions.php:78
131
+ msgid "KOREAN"
132
+ msgstr "Coreano"
133
+
134
+ #: ../include/functions.php:79
135
+ msgid "LITHUANIAN"
136
+ msgstr "LITUANIA"
137
+
138
+ #: ../include/functions.php:80
139
+ msgid "LATVIAN"
140
+ msgstr "LETONIA"
141
+
142
+ #: ../include/functions.php:81
143
+ msgid "MALAYALAM"
144
+ msgstr "MALAYALAM"
145
+
146
+ #: ../include/functions.php:82
147
+ msgid "MARATHI"
148
+ msgstr "MARATHI"
149
+
150
+ #: ../include/functions.php:83
151
+ msgid "DUTCH"
152
+ msgstr "Holandesa"
153
+
154
+ #: ../include/functions.php:84
155
+ msgid "NORWEGIAN"
156
+ msgstr "Noruego"
157
+
158
+ #: ../include/functions.php:85
159
+ msgid "ORIYA"
160
+ msgstr "ORIYA"
161
+
162
+ #: ../include/functions.php:86
163
+ msgid "POLISH"
164
+ msgstr "POLACO"
165
+
166
+ #: ../include/functions.php:87
167
+ msgid "PORTUGUESE"
168
+ msgstr "PORTUGUESA"
169
+
170
+ #: ../include/functions.php:88
171
+ msgid "PORTUGUESE (BRAZIL)"
172
+ msgstr "Portugués (Brasil )"
173
+
174
+ #: ../include/functions.php:89
175
+ msgid "PORTUGUESE (PORTUGAL)"
176
+ msgstr "PORTUGUESA (PORTUGAL )"
177
+
178
+ #: ../include/functions.php:90
179
+ msgid "ROMANIAN"
180
+ msgstr "RUMANO"
181
+
182
+ #: ../include/functions.php:91
183
+ msgid "RUSSIAN"
184
+ msgstr "RUSIA"
185
+
186
+ #: ../include/functions.php:92
187
+ msgid "SLOVAK"
188
+ msgstr "ESLOVAQUIA"
189
+
190
+ #: ../include/functions.php:93
191
+ msgid "SLOVENIAN"
192
+ msgstr "ESLOVENA"
193
+
194
+ #: ../include/functions.php:94
195
+ msgid "SERBIAN"
196
+ msgstr "SERBIA"
197
+
198
+ #: ../include/functions.php:95
199
+ msgid "SWEDISH"
200
+ msgstr "SUECO"
201
+
202
+ #: ../include/functions.php:96
203
+ msgid "TAGALOG"
204
+ msgstr "TAGALOGO"
205
+
206
+ #: ../include/functions.php:97
207
+ msgid "TAMIL"
208
+ msgstr "TAMIL"
209
+
210
+ #: ../include/functions.php:98
211
+ msgid "TELUGU"
212
+ msgstr "Telugu"
213
+
214
+ #: ../include/functions.php:99
215
+ msgid "THAI"
216
+ msgstr "THAI"
217
+
218
+ #: ../include/functions.php:100
219
+ msgid "TURKISH"
220
+ msgstr "TURCO"
221
+
222
+ #: ../include/functions.php:101
223
+ msgid "UKRAINIAN"
224
+ msgstr "Ucrania"
225
+
226
+ #: ../include/functions.php:102
227
+ msgid "VIETNAMESE"
228
+ msgstr "Vietnamita"
229
+
230
+ #: ../include/functions.php:103
231
+ msgid "CHINESE (SIMPLIFIED)"
232
+ msgstr "Chino (simplificado )"
233
+
234
+ #: ../include/functions.php:104
235
+ msgid "CHINESE (TRADITIONAL)"
236
+ msgstr "Chino (tradicional )"
237
+
238
+ #: ../include/functions.php:343
239
+ msgid "Select the marker by clicking on the images"
240
+ msgstr "Seleccione el marcador haciendo clic en las imágenes"
241
+
242
+ #: ../include/functions.php:354
243
+ msgid "Powered by"
244
+ msgstr "Impulsado por"
245
+
246
+ #: ../include/functions.php:376
247
+ msgid "Maps Configuration"
248
+ msgstr "Configuración del Mapa"
249
+
250
+ #: ../include/functions.php:377 ../include/functions.php:746
251
+ msgid ""
252
+ "For any issues with the map, go to our <a href=\"http://wordpress.dwbooster."
253
+ "com/contact-us\" target=\"_blank\">contact page</a> and leave us a message."
254
+ msgstr ""
255
+ "Para cualquier problema con el mapa, vaya a nuestro <a href=\"http://"
256
+ "wordpress.dwbooster.com/contact - us\" contacto target=\"_blank\"> página </"
257
+ "a> y nos deja un mensaje"
258
+
259
+ #: ../include/functions.php:379
260
+ msgid ""
261
+ "If you want test the premium version of CP Google Maps go to the following "
262
+ "links:<br/> <a href=\"http://demos.net-factor.com/cp-google-maps/wp-login.php"
263
+ "\" target=\"_blank\">Administration area: Click to access the administration "
264
+ "area demo</a><br/> <a href=\"http://demos.net-factor.com/cp-google-maps/\" "
265
+ "target=\"_blank\">Public page: Click to access the CP Google Maps</a>"
266
+ msgstr ""
267
+ "Si quieres probar la versión premium de CP Google Maps Ir a los siguientes "
268
+ "enlaces : <br /> <a href = \" http://demos.net-factor.com/cp-google-maps/wp-"
269
+ "login.php\">Área de administración</a><br /><a href=\"http://demos.net-"
270
+ "factor.com/cp-google-maps/\">Página pública</a>"
271
+
272
+ #: ../include/functions.php:386
273
+ msgid "Use particular settings for this map:"
274
+ msgstr "Usar ajustes particulares para este mapa :"
275
+
276
+ #: ../include/functions.php:395
277
+ msgid "Map zoom:"
278
+ msgstr "Zoom :"
279
+
280
+ #: ../include/functions.php:401
281
+ msgid "Dynamic zoom:"
282
+ msgstr "Zoom dinámico:"
283
+
284
+ #: ../include/functions.php:403
285
+ msgid "Allows to adjust the zoom dynamically to display all points on map"
286
+ msgstr ""
287
+ "Permite ajustar el zoom de forma dinámica para mostrar todos los puntos en "
288
+ "el mapa"
289
+
290
+ #: ../include/functions.php:407
291
+ msgid "Map width:"
292
+ msgstr "Ancho del mapa:"
293
+
294
+ #: ../include/functions.php:419
295
+ msgid "Map height:"
296
+ msgstr "Altura del mapa :"
297
+
298
+ #: ../include/functions.php:425
299
+ msgid "Map margin:"
300
+ msgstr "Margen del mapa :"
301
+
302
+ #: ../include/functions.php:431
303
+ msgid "Map align:"
304
+ msgstr "Alinear el mapa:"
305
+
306
+ #: ../include/functions.php:434
307
+ msgid "left"
308
+ msgstr "izquierda"
309
+
310
+ #: ../include/functions.php:435
311
+ msgid "center"
312
+ msgstr "centro"
313
+
314
+ #: ../include/functions.php:436
315
+ msgid "right"
316
+ msgstr "derecho"
317
+
318
+ #: ../include/functions.php:441
319
+ msgid "Map type:"
320
+ msgstr "Tipo de mapa :"
321
+
322
+ #: ../include/functions.php:444
323
+ msgid "ROADMAP - Displays a normal street map"
324
+ msgstr "HOJA DE RUTA - Muestra un mapa normal de la calle"
325
+
326
+ #: ../include/functions.php:445
327
+ msgid "SATELLITE - Displays satellite images"
328
+ msgstr "SATÉLITE - muestra imágenes de satélite"
329
+
330
+ #: ../include/functions.php:446
331
+ msgid ""
332
+ "TERRAIN - Displays maps with physical features such as terrain and vegetation"
333
+ msgstr ""
334
+ "TERRENO - Muestra los mapas con las características físicas, tales como el "
335
+ "terreno y la vegetación"
336
+
337
+ #: ../include/functions.php:447
338
+ msgid ""
339
+ "HYBRID - Displays a transparent layer of major streets on satellite images"
340
+ msgstr ""
341
+ "HYBRID - Muestra una capa transparente de las principales calles en imágenes "
342
+ "de satélite"
343
+
344
+ #: ../include/functions.php:452
345
+ msgid "Map language:"
346
+ msgstr "Idioma del mapa:"
347
+
348
+ #: ../include/functions.php:456
349
+ msgid "Allow drag the map:"
350
+ msgstr "Permitir desplazar los mapas :"
351
+
352
+ #: ../include/functions.php:463
353
+ msgid "Display route:"
354
+ msgstr "Dibujar ruta:"
355
+
356
+ #: ../include/functions.php:465
357
+ msgid "Draws the route between the points in the same post"
358
+ msgstr "Dibujar las rutas entre los puntos en un mismo post"
359
+
360
+ #: ../include/functions.php:476
361
+ msgid "Travel mode:"
362
+ msgstr "Modo de viajar :"
363
+
364
+ #: ../include/functions.php:488
365
+ msgid "Display map in post/page:"
366
+ msgstr "Visualizar mapa en post / página:"
367
+
368
+ #: ../include/functions.php:491
369
+ msgid "as icon"
370
+ msgstr "como icono"
371
+
372
+ #: ../include/functions.php:492
373
+ msgid "as full map"
374
+ msgstr "mapa como completo"
375
+
376
+ #: ../include/functions.php:498
377
+ msgid "Show info bubbles:"
378
+ msgstr "Mostrar información de burbujas :"
379
+
380
+ #: ../include/functions.php:500
381
+ msgid "Display the bubbles associated to the points"
382
+ msgstr "Mostrar las burbujas asociadas a los puntos"
383
+
384
+ #: ../include/functions.php:505
385
+ msgid "Display a bubble by default:"
386
+ msgstr "Mostrar una burbuja por defecto:"
387
+
388
+ #: ../include/functions.php:507
389
+ msgid "Display a bubble opened by default"
390
+ msgstr "Mostrar una burbuja abierta por defecto"
391
+
392
+ #: ../include/functions.php:512
393
+ msgid "Display the Panoramio layer:"
394
+ msgstr "Mostrar la capa Panoramio :"
395
+
396
+ #: ../include/functions.php:514
397
+ msgid "Display a layer with photos published in Panoramio"
398
+ msgstr "Mostrar una capa con las fotos publicadas en Panoramio"
399
+
400
+ #: ../include/functions.php:519
401
+ msgid "Display a bundle of points in the same area, like a cluster:"
402
+ msgstr ""
403
+ "Mostrar un conjunto de puntos en la misma zona , al igual que un clúster:"
404
+
405
+ #: ../include/functions.php:521
406
+ msgid "Displays the number of points in the cluster"
407
+ msgstr "Mostrar un conjunto de puntos en la misma zona ,en forma de clúster:"
408
+
409
+ #: ../include/functions.php:529
410
+ msgid "Display the get directions link:"
411
+ msgstr "Mostrar el enlace CÓMO LLEGAR :"
412
+
413
+ #: ../include/functions.php:533
414
+ msgid "Display a link at bottom of infowindow to get directions"
415
+ msgstr ""
416
+ "Mostar un enlace al final de la ventana de información para obtener la "
417
+ "dirección"
418
+
419
+ #: ../include/functions.php:538
420
+ msgid "Display a link to Google Maps:"
421
+ msgstr "Mostrar un enlace a Google Maps :"
422
+
423
+ #: ../include/functions.php:540
424
+ msgid "Display a link at bottom of infowindow to display on Google Maps"
425
+ msgstr ""
426
+ "Mostar un enlace al final de la ventana de información para mostrar en "
427
+ "Google Maps"
428
+
429
+ #: ../include/functions.php:545
430
+ msgid "Display a link to street view:"
431
+ msgstr "Mostrar un enlace a la vista de la calle:"
432
+
433
+ #: ../include/functions.php:547
434
+ msgid ""
435
+ "Display a link at bottom of infowindow to load the corresponding street view"
436
+ msgstr ""
437
+ "Mostar un enlace al final de la ventana de información para cargar en el "
438
+ "Street View"
439
+
440
+ #: ../include/functions.php:552
441
+ msgid "Display the user's location:"
442
+ msgstr "Muestra la ubicación del usuario :"
443
+
444
+ #: ../include/functions.php:554
445
+ msgid "Display an icon with the user's location on map"
446
+ msgstr "Muestra un icono con la ubicación del usuario"
447
+
448
+ #: ../include/functions.php:559
449
+ msgid "Title of user's location:"
450
+ msgstr "Título de la ubicación del usuario :"
451
+
452
+ #: ../include/functions.php:561
453
+ msgid "Title of user's location"
454
+ msgstr "Título de la ubicación del usuario"
455
+
456
+ #: ../include/functions.php:569
457
+ msgid "Options"
458
+ msgstr "Opciones"
459
+
460
+ #: ../include/functions.php:572
461
+ msgid "Display the street view control"
462
+ msgstr "Mostrar el control de vista de la calle"
463
+
464
+ #: ../include/functions.php:574
465
+ msgid "Enable mouse wheel zoom"
466
+ msgstr "Habilitar ratón con rueda de zoom"
467
+
468
+ #: ../include/functions.php:576
469
+ msgid "Enable zoom/pan controls"
470
+ msgstr "Activar controles de zoom / pan"
471
+
472
+ #: ../include/functions.php:578
473
+ msgid "Enable map type controls (Map, Satellite, or Hybrid)"
474
+ msgstr "Activar los controles de tipo de mapa (Mapa , Satélite o híbridos )"
475
+
476
+ #: ../include/functions.php:583
477
+ msgid "Enter the number of posts to display on the map"
478
+ msgstr "Entre el número de posts a visualizar en el mapa"
479
+
480
+ #: ../include/functions.php:587
481
+ msgid "Allow stylize the maps:"
482
+ msgstr "Permitir estilizar los mapas :"
483
+
484
+ #: ../include/functions.php:597
485
+ msgid ""
486
+ "If you want change the maps' styles, be sure to know how to create a JSON "
487
+ "structure with the map's styles"
488
+ msgstr ""
489
+ "Si usted quiere cambiar los estilos de los mapas , asegúrese de saber cómo "
490
+ "crear una estructura JSON con estilos del mapa"
491
+
492
+ #: ../include/functions.php:604
493
+ msgid "Display the map's legend:"
494
+ msgstr "Mostrar la leyenda del mapa:"
495
+
496
+ #: ../include/functions.php:610
497
+ msgid "Select the taxonomy to display on legend:"
498
+ msgstr "Seleccione la taxonomía para mostrar en la leyenda :"
499
+
500
+ #: ../include/functions.php:616
501
+ msgid "Select a taxonomy"
502
+ msgstr "Seleccionar una taxonomía"
503
+
504
+ #: ../include/functions.php:627
505
+ msgid "Enter a title for legend:"
506
+ msgstr "Introduzca un título para la leyenda :"
507
+
508
+ #: ../include/functions.php:633
509
+ msgid "Enter a classname to be applied to the legend:"
510
+ msgstr "Introduzca un nombre de clase que se aplicará a la leyenda :"
511
+
512
+ #: ../include/functions.php:654
513
+ msgid "Map point description"
514
+ msgstr "Mapa Descripción del punto"
515
+
516
+ #: ../include/functions.php:657
517
+ msgid "Location name:"
518
+ msgstr "Nombre de la ubicación :"
519
+
520
+ #: ../include/functions.php:663
521
+ msgid "Location description:"
522
+ msgstr "Descripción de la ubicación :"
523
+
524
+ #: ../include/functions.php:672
525
+ msgid "Select an images to attach to the point: "
526
+ msgstr "Seleccionar una imágenes para adjuntar al punto:"
527
+
528
+ #: ../include/functions.php:686
529
+ msgid "Address:"
530
+ msgstr "Dirección:"
531
+
532
+ #: ../include/functions.php:692
533
+ msgid "Latitude:"
534
+ msgstr "Latitud:"
535
+
536
+ #: ../include/functions.php:698
537
+ msgid "Longitude:"
538
+ msgstr "Longitud :"
539
+
540
+ #: ../include/functions.php:704
541
+ msgid "Verify"
542
+ msgstr "Verificar"
543
+
544
+ #: ../include/functions.php:706
545
+ msgid ""
546
+ "Verify this latitude and longitude using Geocoding. This could overwrite the "
547
+ "point address."
548
+ msgstr ""
549
+ "Verificar esta latitud y longitud usando geocodificación . Esto podría "
550
+ "sobrescribir la dirección del punto ."
551
+
552
+ #: ../include/functions.php:706
553
+ msgid "Required: Press the button \"verify\" after complete the address."
554
+ msgstr ""
555
+ "Deseados: pulse el botón \" verifique \"después de completar la dirección."
556
+
557
+ #: ../include/functions.php:714
558
+ msgid ""
559
+ "To correct the latitude and longitud directly on MAP, type the address and "
560
+ "press the Verify button."
561
+ msgstr ""
562
+ "Para corregir la latitud y Longitud directamente en MAP , escriba la "
563
+ "dirección y pulse el botón Verificar ."
564
+
565
+ #: ../include/functions.php:728
566
+ msgid "Add/Update Point"
567
+ msgstr "Añadir / Actualizar Point"
568
+
569
+ #: ../include/functions.php:745 ../include/functions.php:1041
570
+ msgid ""
571
+ "For more information go to the <a href=\"http://wordpress.dwbooster.com/"
572
+ "content-tools/codepeople-post-map\" target=\"_blank\">CodePeople Post Map</"
573
+ "a> plugin page"
574
+ msgstr ""
575
+ "Para obtener más información, visite la página del plugin <a href=\"http://"
576
+ "wordpress.dwbooster.com/content - tools/codepeople post - map\" target="
577
+ "\"_blank\"> CodePeople Post Ubicación </a>"
578
+
579
+ #: ../include/functions.php:748
580
+ msgid "To insert a map in the post follow the steps below"
581
+ msgstr "Para insertar un mapa en el post, siga los siguientes pasos"
582
+
583
+ #: ../include/functions.php:751
584
+ msgid ""
585
+ "Enter the point's information (the latitude and longitude are required, but "
586
+ "are obtained pressing the \"verify\" button after type the address"
587
+ msgstr ""
588
+ "Entre la información del punto (la latitud y la longitud son requeridos, y "
589
+ "son obtenidos pulsando el botón \"Verificar\", después de escribir la "
590
+ "dirección)"
591
+
592
+ #: ../include/functions.php:752
593
+ msgid ""
594
+ "Insert the shortcode in the post's content pressing the \"insert the map tag"
595
+ "\" button"
596
+ msgstr ""
597
+ "Inserte el shortcode en el contenido del post, presionando el botón "
598
+ "\"inserte la etiqueta del mapa\""
599
+
600
+ #: ../include/functions.php:753
601
+ msgid ""
602
+ "If you want to use specific settings just for this map, press the \"Show/"
603
+ "Hide Map's Options\" button, and modifies the settings for this map"
604
+ msgstr ""
605
+ "Si desea especificar una confguración para este mapa en particular, marque "
606
+ "la opción \"Usar ajustes particulares para este mapa\""
607
+
608
+ #: ../include/functions.php:754
609
+ msgid ""
610
+ "Don't forget to press the \"Update\" button for save the post and map data"
611
+ msgstr ""
612
+ "No olvide presionar el botón \"Actualizar\" para salvar los datos del post y "
613
+ "del mapa"
614
+
615
+ #: ../include/functions.php:757
616
+ msgid "Map points"
617
+ msgstr "Puntos de Ruta"
618
+
619
+ #: ../include/functions.php:784
620
+ msgid ""
621
+ "To insert this map in a post/page, press the <strong>\"insert the map tag\"</"
622
+ "strong> button and save the post/page modifications."
623
+ msgstr ""
624
+ "Para insertar este mapa en un post / página, pulse el botón <strong> \" "
625
+ "insertar el mapa de etiquetas \" </ strong> y guardar las modificaciones del "
626
+ "post / página."
627
+
628
+ #: ../include/functions.php:791
629
+ msgid "Do you want display a <strong>shape</strong> on map?"
630
+ msgstr "¿Quieres mostrar una <strong> forma </strong> en el mapa ?"
631
+
632
+ #: ../include/functions.php:803
633
+ msgid "stroke Weight: "
634
+ msgstr "Grueso de la linea:"
635
+
636
+ #: ../include/functions.php:813
637
+ msgid "Fill Color: "
638
+ msgstr "Color de relleno"
639
+
640
+ #: ../include/functions.php:824
641
+ msgid "Fill Opacity: "
642
+ msgstr "Llenar Opacidad:"
643
+
644
+ #: ../include/functions.php:832
645
+ msgid "Use a number between 0 and 1, 0 is transparent. "
646
+ msgstr "Usar un número entre 0 y 1 , 0 es transparente\"."
647
+
648
+ #: ../include/functions.php:850
649
+ msgid "If you want to display the map in page / post:"
650
+ msgstr "Si usted quiere mostrar el mapa en la página / post:"
651
+
652
+ #: ../include/functions.php:851
653
+ msgid "Insert the map tag"
654
+ msgstr "Inserte la etiqueta del mapa"
655
+
656
+ #: ../include/functions.php:867
657
+ msgid "To display the points that belong to any category"
658
+ msgstr "Mostrar los puntos que pertenecen a una categoría"
659
+
660
+ #: ../include/functions.php:976
661
+ msgid "Settings Updated"
662
+ msgstr "Configuración de Actualización"
663
+
664
+ #: ../include/functions.php:987
665
+ msgid ""
666
+ "Generate points dynamically from geolocation information included on images, "
667
+ "when images are uploaded to WordPress:"
668
+ msgstr ""
669
+ "Generar puntos de forma dinámica a partir de información de geolocalización "
670
+ "incluida en las imágenes, cuando las imágenes se cargan en WordPress:"
671
+
672
+ #: ../include/functions.php:990
673
+ msgid ""
674
+ "The geolocation information is added to the images from your mobiles or "
675
+ "cameras, if they have associated GPS devices"
676
+ msgstr ""
677
+ "La información de geolocalización se añade a las imágenes desde sus "
678
+ "teléfonos móviles o cámaras, si han asociado dispositivos GPS"
679
+
680
+ #: ../include/functions.php:995
681
+ msgid ""
682
+ "Generate points dynamically from geolocation information included on posts:"
683
+ msgstr ""
684
+ "Generar puntos de forma dinámica a partir de información de geolocalización "
685
+ "incluida en los mensajes :"
686
+
687
+ #: ../include/functions.php:998
688
+ msgid ""
689
+ "The geolocation information is added to the post from WordPress app in your "
690
+ "mobile"
691
+ msgstr ""
692
+ "La información de geolocalización se añade al post de WordPress aplicación "
693
+ "en tu móvil"
694
+
695
+ #: ../include/functions.php:1003
696
+ msgid "Use points information in search results:"
697
+ msgstr "Utilizar la información puntos en los resultados de búsqueda :"
698
+
699
+ #: ../include/functions.php:1009
700
+ msgid "Highlight post when mouse move over related point on map:"
701
+ msgstr ""
702
+ "Post Resaltar cuando mueva el ratón sobre el punto relacionado en el mapa :"
703
+
704
+ #: ../include/functions.php:1015
705
+ msgid "Highlight class:"
706
+ msgstr "Clase Highlight :"
707
+
708
+ #: ../include/functions.php:1021
709
+ msgid "Allow to associate a map to the post types:"
710
+ msgstr "Permitir a asociar el mapa de los tipos de posts:"
711
+
712
+ #: ../include/functions.php:1036
713
+ msgid "Posts and Pages are selected by default"
714
+ msgstr "Mensajes y páginas se seleccionan de forma predeterminada"
715
+
716
+ #: ../include/functions.php:1042
717
+ msgid "Update Settings"
718
+ msgstr "Configuración de la actualización"
719
+
720
+ #: ../include/functions.php:1585
721
+ msgid "Get directions"
722
+ msgstr "Cómo llegar"
723
+
724
+ #: ../include/functions.php:1586
725
+ msgid "Display on map"
726
+ msgstr "Pantalla en el mapa"
727
+
728
+ #: ../include/functions.php:1587
729
+ msgid "Display street view"
730
+ msgstr "Mostrar Vista de la calle"
731
+
732
+ #: ../include/functions.php:1688
733
+ msgid "Request custom changes"
734
+ msgstr "Solicitar cambios de encargo"
735
+
736
+ #: ../include/functions.php:1745
737
+ msgid "Title:"
738
+ msgstr "Título:"
739
+
740
+ #: ../include/functions.php:1747
741
+ msgid "Enter the map's attributes:"
742
+ msgstr "Introduzca los atributos del mapa :"
743
+
744
+ #: ../include/functions.php:1750
745
+ msgid ""
746
+ "To display the points that belong to an category, use the attribute: cat="
747
+ "\"2\", where 2 is the category's ID. To display the points that belong to "
748
+ "multiple categories, separate each one by the comma symbol: cat=\"2,5,8\". "
749
+ "To display all points on website, use the value -1 for category's ID, cat="
750
+ "\"-1\". If you want to display only the points associated with the current "
751
+ "post, don't use the \"cat\" attribute."
752
+ msgstr ""
753
+ "Para mostrar los puntos que pertenecen a una categoría , utilice el "
754
+ "atributo : cat = \" . 2 \" , donde 2 es el ID de la categoría para mostrar "
755
+ "los puntos que pertenecen a varias categorías , separe cada uno con el "
756
+ "símbolo coma: cat =\"2,5,8\". Para mostrar todos los puntos del sitio web, "
757
+ "utilice el valor -1 para el ID de la categoría, cat=\"-1\". Para mostrar "
758
+ "solo los puntos asociados al post actual, no utilice el atribute \"cat\""
759
+
760
+ #~ msgid ""
761
+ #~ "Multiple points in the same Post/Page are available only in the <a href="
762
+ #~ "\"http://wordpress.dwbooster.com/content-tools/codepeople-post-"
763
+ #~ "map#download\" target=\"_blank\">advanced version</a>."
764
+ #~ msgstr ""
765
+ #~ "Para obtener más información, visite la página del plugin <a href="
766
+ #~ "\"http://wordpress.dwbooster.com/content - tools/codepeople post - map\" "
767
+ #~ "target=\"_blank\"> CodePeople Post Ubicación </a>"
languages/codepeople-post-map-fr_FR.mo ADDED
Binary file
languages/codepeople-post-map-fr_FR.po ADDED
@@ -0,0 +1,781 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: codepeople-post-map\n"
4
+ "POT-Creation-Date: 2014-12-27 02:33+0100\n"
5
+ "PO-Revision-Date: 2014-12-27 02:38+0100\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: CodePeople\n"
8
+ "Language: fr\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 1.5.7\n"
13
+ "X-Poedit-KeywordsList: __;gettext;gettext_noop;_e\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-SearchPath-0: ..\n"
17
+
18
+ #: ../codepeople-post-map.php:87
19
+ msgid "Associate an address to the post for Google Maps association"
20
+ msgstr "Associer une adresse à l'article pour l'afficher sur Google Maps"
21
+
22
+ #: ../include/functions.php:50
23
+ msgid "ARABIC"
24
+ msgstr "ARABE"
25
+
26
+ #: ../include/functions.php:51 ../include/functions.php:63
27
+ msgid "BASQUE"
28
+ msgstr "Basque"
29
+
30
+ #: ../include/functions.php:52
31
+ msgid "BULGARIAN"
32
+ msgstr "BULGARE"
33
+
34
+ #: ../include/functions.php:53
35
+ msgid "BENGALI"
36
+ msgstr "BENGALI"
37
+
38
+ #: ../include/functions.php:54
39
+ msgid "CATALAN"
40
+ msgstr "CATALAN"
41
+
42
+ #: ../include/functions.php:55
43
+ msgid "CZECH"
44
+ msgstr "TCHÈQUE"
45
+
46
+ #: ../include/functions.php:56
47
+ msgid "DANISH"
48
+ msgstr "DANOIS"
49
+
50
+ #: ../include/functions.php:57
51
+ msgid "GERMAN"
52
+ msgstr "ALLEMAND"
53
+
54
+ #: ../include/functions.php:58
55
+ msgid "GREEK"
56
+ msgstr "GREC"
57
+
58
+ #: ../include/functions.php:59
59
+ msgid "ENGLISH"
60
+ msgstr "ANGLAIS"
61
+
62
+ #: ../include/functions.php:60
63
+ msgid "ENGLISH (AUSTRALIAN)"
64
+ msgstr "Anglais (australien)"
65
+
66
+ #: ../include/functions.php:61
67
+ msgid "ENGLISH (GREAT BRITAIN)"
68
+ msgstr "ANGLAIS (GRANDE-BRETAGNE)"
69
+
70
+ #: ../include/functions.php:62
71
+ msgid "SPANISH"
72
+ msgstr "ESPAGNOL"
73
+
74
+ #: ../include/functions.php:64
75
+ msgid "FARSI"
76
+ msgstr "FARSI"
77
+
78
+ #: ../include/functions.php:65
79
+ msgid "FINNISH"
80
+ msgstr "Finlandais"
81
+
82
+ #: ../include/functions.php:66
83
+ msgid "FILIPINO"
84
+ msgstr "Philippin"
85
+
86
+ #: ../include/functions.php:67
87
+ msgid "FRENCH"
88
+ msgstr "FRANÇAIS"
89
+
90
+ #: ../include/functions.php:68
91
+ msgid "GALICIAN"
92
+ msgstr "GALICIEN"
93
+
94
+ #: ../include/functions.php:69
95
+ msgid "GUJARATI"
96
+ msgstr "GUJARATI"
97
+
98
+ #: ../include/functions.php:70
99
+ msgid "HINDI"
100
+ msgstr "HINDI"
101
+
102
+ #: ../include/functions.php:71
103
+ msgid "CROATIAN"
104
+ msgstr "CROATE"
105
+
106
+ #: ../include/functions.php:72
107
+ msgid "HUNGARIAN"
108
+ msgstr "HONGROIS"
109
+
110
+ #: ../include/functions.php:73
111
+ msgid "INDONESIAN"
112
+ msgstr "INDONÉSIEN"
113
+
114
+ #: ../include/functions.php:74
115
+ msgid "ITALIAN"
116
+ msgstr "ITALIEN"
117
+
118
+ #: ../include/functions.php:75
119
+ msgid "HEBREW"
120
+ msgstr "HÉBREU"
121
+
122
+ #: ../include/functions.php:76
123
+ msgid "JAPANESE"
124
+ msgstr "JAPONAIS"
125
+
126
+ #: ../include/functions.php:77
127
+ msgid "KANNADA"
128
+ msgstr "KANNADA"
129
+
130
+ #: ../include/functions.php:78
131
+ msgid "KOREAN"
132
+ msgstr "CORÉEN"
133
+
134
+ #: ../include/functions.php:79
135
+ msgid "LITHUANIAN"
136
+ msgstr "LITUANIEN"
137
+
138
+ #: ../include/functions.php:80
139
+ msgid "LATVIAN"
140
+ msgstr "LETTON"
141
+
142
+ #: ../include/functions.php:81
143
+ msgid "MALAYALAM"
144
+ msgstr "MALAYALAM"
145
+
146
+ #: ../include/functions.php:82
147
+ msgid "MARATHI"
148
+ msgstr "MARATHI"
149
+
150
+ #: ../include/functions.php:83
151
+ msgid "DUTCH"
152
+ msgstr "HOLLANDAIS"
153
+
154
+ #: ../include/functions.php:84
155
+ msgid "NORWEGIAN"
156
+ msgstr "NORVÉGIEN"
157
+
158
+ #: ../include/functions.php:85
159
+ msgid "ORIYA"
160
+ msgstr "ORIYA"
161
+
162
+ #: ../include/functions.php:86
163
+ msgid "POLISH"
164
+ msgstr "POLONAIS"
165
+
166
+ #: ../include/functions.php:87
167
+ msgid "PORTUGUESE"
168
+ msgstr "Portugais"
169
+
170
+ #: ../include/functions.php:88
171
+ msgid "PORTUGUESE (BRAZIL)"
172
+ msgstr "Portugais (Brésil)"
173
+
174
+ #: ../include/functions.php:89
175
+ msgid "PORTUGUESE (PORTUGAL)"
176
+ msgstr "Portugais (Portugal)"
177
+
178
+ #: ../include/functions.php:90
179
+ msgid "ROMANIAN"
180
+ msgstr "ROUMAIN"
181
+
182
+ #: ../include/functions.php:91
183
+ msgid "RUSSIAN"
184
+ msgstr "Russe"
185
+
186
+ #: ../include/functions.php:92
187
+ msgid "SLOVAK"
188
+ msgstr "Slovaque"
189
+
190
+ #: ../include/functions.php:93
191
+ msgid "SLOVENIAN"
192
+ msgstr "SLOVÈNE"
193
+
194
+ #: ../include/functions.php:94
195
+ msgid "SERBIAN"
196
+ msgstr "Serbe"
197
+
198
+ #: ../include/functions.php:95
199
+ msgid "SWEDISH"
200
+ msgstr "Suédois"
201
+
202
+ #: ../include/functions.php:96
203
+ msgid "TAGALOG"
204
+ msgstr "TAGALOG"
205
+
206
+ #: ../include/functions.php:97
207
+ msgid "TAMIL"
208
+ msgstr "TAMIL"
209
+
210
+ #: ../include/functions.php:98
211
+ msgid "TELUGU"
212
+ msgstr "TELUGU"
213
+
214
+ #: ../include/functions.php:99
215
+ msgid "THAI"
216
+ msgstr "THAILANDAIS"
217
+
218
+ #: ../include/functions.php:100
219
+ msgid "TURKISH"
220
+ msgstr "TURC"
221
+
222
+ #: ../include/functions.php:101
223
+ msgid "UKRAINIAN"
224
+ msgstr "UKRAINIEN"
225
+
226
+ #: ../include/functions.php:102
227
+ msgid "VIETNAMESE"
228
+ msgstr "VIETNAMIENNE"
229
+
230
+ #: ../include/functions.php:103
231
+ msgid "CHINESE (SIMPLIFIED)"
232
+ msgstr "CHINOIS (SIMPLIFIÉ)"
233
+
234
+ #: ../include/functions.php:104
235
+ msgid "CHINESE (TRADITIONAL)"
236
+ msgstr "CHINOIS (TRADITIONNEL)"
237
+
238
+ #: ../include/functions.php:343
239
+ msgid "Select the marker by clicking on the images"
240
+ msgstr "Sélectionnez le marqueur en cliquant sur une image"
241
+
242
+ #: ../include/functions.php:354
243
+ msgid "Powered by"
244
+ msgstr "Alimenté par"
245
+
246
+ #: ../include/functions.php:376
247
+ msgid "Maps Configuration"
248
+ msgstr "Configuration des cartes"
249
+
250
+ #: ../include/functions.php:377 ../include/functions.php:746
251
+ msgid ""
252
+ "For any issues with the map, go to our <a href=\"http://wordpress.dwbooster."
253
+ "com/contact-us\" target=\"_blank\">contact page</a> and leave us a message."
254
+ msgstr ""
255
+ "Pour tous les problèmes avec la carte , aller à notre <a href=\"http://"
256
+ "wordpress.dwbooster.com/contact-us\" target=\"_blank\">page-contact</a> et "
257
+ "laissez nous un message"
258
+
259
+ #: ../include/functions.php:379
260
+ msgid ""
261
+ "If you want test the premium version of CP Google Maps go to the following "
262
+ "links:<br/> <a href=\"http://demos.net-factor.com/cp-google-maps/wp-login.php"
263
+ "\" target=\"_blank\">Administration area: Click to access the administration "
264
+ "area demo</a><br/> <a href=\"http://demos.net-factor.com/cp-google-maps/\" "
265
+ "target=\"_blank\">Public page: Click to access the CP Google Maps</a>"
266
+ msgstr ""
267
+ "Si vous voulez tester la version premium de CP Google Maps, utilisez les "
268
+ "liens suivants: <br/> <a href=\"http://demos.net-factor.com/cp-google-maps/"
269
+ "wp-login.php\" target=\"_blank\">Zone Administration: Cliquez pour accéder à "
270
+ "la démo de zone d'administration</a><br/> <a href=\"http://demos.net-factor."
271
+ "com/cp-google-maps/\" target=\"_blank\">Page publique: Cliquez pour accéder "
272
+ "au CP Google Maps</a>"
273
+
274
+ #: ../include/functions.php:386
275
+ msgid "Use particular settings for this map:"
276
+ msgstr "Utiliser des paramètres particuliers pour cette carte:"
277
+
278
+ #: ../include/functions.php:395
279
+ msgid "Map zoom:"
280
+ msgstr "Zoom"
281
+
282
+ #: ../include/functions.php:401
283
+ msgid "Dynamic zoom:"
284
+ msgstr "Zoom dynamique:"
285
+
286
+ #: ../include/functions.php:403
287
+ msgid "Allows to adjust the zoom dynamically to display all points on map"
288
+ msgstr ""
289
+ "Permet de régler le zoom dynamique pour afficher tous les points sur la carte"
290
+
291
+ #: ../include/functions.php:407
292
+ msgid "Map width:"
293
+ msgstr "Largeur de la carte:"
294
+
295
+ #: ../include/functions.php:419
296
+ msgid "Map height:"
297
+ msgstr "Hauteur de la carte:"
298
+
299
+ #: ../include/functions.php:425
300
+ msgid "Map margin:"
301
+ msgstr "Marge de la carte:"
302
+
303
+ #: ../include/functions.php:431
304
+ msgid "Map align:"
305
+ msgstr "Alignement de la Carte:"
306
+
307
+ #: ../include/functions.php:434
308
+ msgid "left"
309
+ msgstr "gauche"
310
+
311
+ #: ../include/functions.php:435
312
+ msgid "center"
313
+ msgstr "centre"
314
+
315
+ #: ../include/functions.php:436
316
+ msgid "right"
317
+ msgstr "droit"
318
+
319
+ #: ../include/functions.php:441
320
+ msgid "Map type:"
321
+ msgstr "Type de Carte:"
322
+
323
+ #: ../include/functions.php:444
324
+ msgid "ROADMAP - Displays a normal street map"
325
+ msgstr "FEUILLE DE ROUTE - Affiche un plan normal"
326
+
327
+ #: ../include/functions.php:445
328
+ msgid "SATELLITE - Displays satellite images"
329
+ msgstr "SATELLITE - affiche des images satellite"
330
+
331
+ #: ../include/functions.php:446
332
+ msgid ""
333
+ "TERRAIN - Displays maps with physical features such as terrain and vegetation"
334
+ msgstr ""
335
+ "TERRAIN - d'afficher les cartes avec des caractéristiques physiques comme le "
336
+ "terrain et la végétation"
337
+
338
+ #: ../include/functions.php:447
339
+ msgid ""
340
+ "HYBRID - Displays a transparent layer of major streets on satellite images"
341
+ msgstr ""
342
+ "HYBRIDE - Affiche une couche transparente de rues principales sur les images "
343
+ "satellites"
344
+
345
+ #: ../include/functions.php:452
346
+ msgid "Map language:"
347
+ msgstr "Langue de la carte:"
348
+
349
+ #: ../include/functions.php:456
350
+ msgid "Allow drag the map:"
351
+ msgstr "Autoriser traînée la carte"
352
+
353
+ #: ../include/functions.php:463
354
+ msgid "Display route:"
355
+ msgstr "Afficher l'itinéraire:"
356
+
357
+ #: ../include/functions.php:465
358
+ msgid "Draws the route between the points in the same post"
359
+ msgstr "Dessine le trajet entre les points dans le même article"
360
+
361
+ #: ../include/functions.php:476
362
+ msgid "Travel mode:"
363
+ msgstr "Mode de transport:"
364
+
365
+ #: ../include/functions.php:488
366
+ msgid "Display map in post/page:"
367
+ msgstr "Afficher la carte sur l'article/la page:"
368
+
369
+ #: ../include/functions.php:491
370
+ msgid "as icon"
371
+ msgstr "en icône"
372
+
373
+ #: ../include/functions.php:492
374
+ msgid "as full map"
375
+ msgstr "en carte"
376
+
377
+ #: ../include/functions.php:498
378
+ msgid "Show info bubbles:"
379
+ msgstr "Afficher les infos bulles:"
380
+
381
+ #: ../include/functions.php:500
382
+ msgid "Display the bubbles associated to the points"
383
+ msgstr "Afficher les bulles associées aux points"
384
+
385
+ #: ../include/functions.php:505
386
+ msgid "Display a bubble by default:"
387
+ msgstr "Afficher une bulle par défaut:"
388
+
389
+ #: ../include/functions.php:507
390
+ msgid "Display a bubble opened by default"
391
+ msgstr "Afficher une bulle ouverte par défaut"
392
+
393
+ #: ../include/functions.php:512
394
+ msgid "Display the Panoramio layer:"
395
+ msgstr "Afficher le calque Panoramio:"
396
+
397
+ #: ../include/functions.php:514
398
+ msgid "Display a layer with photos published in Panoramio"
399
+ msgstr "Afficher le calque avec des photos publiées dans Panoramio"
400
+
401
+ #: ../include/functions.php:519
402
+ msgid "Display a bundle of points in the same area, like a cluster:"
403
+ msgstr "Afficher un faisceau de points dans la même zone, en groupe:"
404
+
405
+ #: ../include/functions.php:521
406
+ msgid "Displays the number of points in the cluster"
407
+ msgstr "Affiche le nombre de points dans le regroupement"
408
+
409
+ #: ../include/functions.php:529
410
+ msgid "Display the get directions link:"
411
+ msgstr "Afficher le lien de directions:"
412
+
413
+ #: ../include/functions.php:533
414
+ msgid "Display a link at bottom of infowindow to get directions"
415
+ msgstr "Afficher un lien en bas de la fenêtre d'infos pour l'adresse"
416
+
417
+ #: ../include/functions.php:538
418
+ msgid "Display a link to Google Maps:"
419
+ msgstr "Afficher un lien vers Google Maps:"
420
+
421
+ #: ../include/functions.php:540
422
+ msgid "Display a link at bottom of infowindow to display on Google Maps"
423
+ msgstr ""
424
+ "Afficher un lien en bas de la fenêtre d'infos à afficher sur Google Maps"
425
+
426
+ #: ../include/functions.php:545
427
+ msgid "Display a link to street view:"
428
+ msgstr "Afficher un lien vers Vue de la rue (Street View):"
429
+
430
+ #: ../include/functions.php:547
431
+ msgid ""
432
+ "Display a link at bottom of infowindow to load the corresponding street view"
433
+ msgstr ""
434
+ "Afficher un lien en bas de la fenêtre d'infos pour charger la vue sur la rue "
435
+ "correspondante"
436
+
437
+ #: ../include/functions.php:552
438
+ msgid "Display the user's location:"
439
+ msgstr "Afficher l'emplacement de l'utilisateur:"
440
+
441
+ #: ../include/functions.php:554
442
+ msgid "Display an icon with the user's location on map"
443
+ msgstr "Afficher une icône avec l'emplacement de l'utilisateur sur la carte"
444
+
445
+ #: ../include/functions.php:559
446
+ msgid "Title of user's location:"
447
+ msgstr "Titre de l'emplacement de l'utilisateur:"
448
+
449
+ #: ../include/functions.php:561
450
+ msgid "Title of user's location"
451
+ msgstr "Titre de l'emplacement de l'utilisateur"
452
+
453
+ #: ../include/functions.php:569
454
+ msgid "Options"
455
+ msgstr "Options"
456
+
457
+ #: ../include/functions.php:572
458
+ msgid "Display the street view control"
459
+ msgstr "Afficher le moyen de contrôle de la vue de la rue"
460
+
461
+ #: ../include/functions.php:574
462
+ msgid "Enable mouse wheel zoom"
463
+ msgstr "Activer zoom molette de la souris"
464
+
465
+ #: ../include/functions.php:576
466
+ msgid "Enable zoom/pan controls"
467
+ msgstr "Activer le contrôle zoom/panoramique"
468
+
469
+ #: ../include/functions.php:578
470
+ msgid "Enable map type controls (Map, Satellite, or Hybrid)"
471
+ msgstr "Activer le contrôle de type de carte (carte, satellite ou hybride)"
472
+
473
+ #: ../include/functions.php:583
474
+ msgid "Enter the number of posts to display on the map"
475
+ msgstr "Entrez le nombre d'articles à afficher sur la carte"
476
+
477
+ #: ../include/functions.php:587
478
+ msgid "Allow stylize the maps:"
479
+ msgstr "Autoriser de modifier le style des cartes:"
480
+
481
+ #: ../include/functions.php:597
482
+ msgid ""
483
+ "If you want change the maps' styles, be sure to know how to create a JSON "
484
+ "structure with the map's styles"
485
+ msgstr ""
486
+ "Si vous voulez changer les styles des cartes , assurez-vous de savoir "
487
+ "comment créer une structure JSON avec les styles de la carte"
488
+
489
+ #: ../include/functions.php:604
490
+ msgid "Display the map's legend:"
491
+ msgstr "Afficher la légende de la carte:"
492
+
493
+ #: ../include/functions.php:610
494
+ msgid "Select the taxonomy to display on legend:"
495
+ msgstr "Sélectionnez la taxonomie pour afficher sur la légende:"
496
+
497
+ #: ../include/functions.php:616
498
+ msgid "Select a taxonomy"
499
+ msgstr "Sélectionnez une taxonomie"
500
+
501
+ #: ../include/functions.php:627
502
+ msgid "Enter a title for legend:"
503
+ msgstr "Entrez un titre pour la légende:"
504
+
505
+ #: ../include/functions.php:633
506
+ msgid "Enter a classname to be applied to the legend:"
507
+ msgstr "Entrez un nom de classe à appliquer à la légende:"
508
+
509
+ #: ../include/functions.php:654
510
+ msgid "Map point description"
511
+ msgstr "Description d'un point sur la carte"
512
+
513
+ #: ../include/functions.php:657
514
+ msgid "Location name:"
515
+ msgstr "Nom du lieu:"
516
+
517
+ #: ../include/functions.php:663
518
+ msgid "Location description:"
519
+ msgstr "Description du lieu:"
520
+
521
+ #: ../include/functions.php:672
522
+ msgid "Select an images to attach to the point: "
523
+ msgstr "Sélectionnez une image à associer au point:"
524
+
525
+ #: ../include/functions.php:686
526
+ msgid "Address:"
527
+ msgstr "Adresse (inclure le pays):"
528
+
529
+ #: ../include/functions.php:692
530
+ msgid "Latitude:"
531
+ msgstr "Latitude:"
532
+
533
+ #: ../include/functions.php:698
534
+ msgid "Longitude:"
535
+ msgstr "Longitude:"
536
+
537
+ #: ../include/functions.php:704
538
+ msgid "Verify"
539
+ msgstr "Vérifier"
540
+
541
+ #: ../include/functions.php:706
542
+ msgid ""
543
+ "Verify this latitude and longitude using Geocoding. This could overwrite the "
544
+ "point address."
545
+ msgstr ""
546
+ "Vérifiez cette latitude et la longitude en utilisant le Géocodage . Cela "
547
+ "pourrait écraser l'adresse de point."
548
+
549
+ #: ../include/functions.php:706
550
+ msgid "Required: Press the button \"verify\" after complete the address."
551
+ msgstr ""
552
+ "Obligatoire: Appuyez sur le bouton \"Vérifier\" après l'adresse complète."
553
+
554
+ #: ../include/functions.php:714
555
+ msgid ""
556
+ "To correct the latitude and longitud directly on MAP, type the address and "
557
+ "press the Verify button."
558
+ msgstr ""
559
+ "Pour corriger la latitude et LONGITUD directement sur MAP, tapez l'adresse "
560
+ "et appuyez sur le bouton Vérifier."
561
+
562
+ #: ../include/functions.php:728
563
+ msgid "Add/Update Point"
564
+ msgstr "Ajouter/Mettre à jour Point"
565
+
566
+ #: ../include/functions.php:745 ../include/functions.php:1041
567
+ msgid ""
568
+ "For more information go to the <a href=\"http://wordpress.dwbooster.com/"
569
+ "content-tools/codepeople-post-map\" target=\"_blank\">CodePeople Post Map</"
570
+ "a> plugin page"
571
+ msgstr ""
572
+ "Pour plus de renseignements, visitez le plugin <a href=\"http://wordpress."
573
+ "dwbooster.com/content-tools/codepeople post-map\" target=\"_blank\"> "
574
+ "CodePeople Post Map"
575
+
576
+ #: ../include/functions.php:748
577
+ msgid "To insert a map in the post follow the steps below"
578
+ msgstr "Pour insérer une carte dans l'article, suivez les étapes ci-dessous"
579
+
580
+ #: ../include/functions.php:751
581
+ msgid ""
582
+ "Enter the point's information (the latitude and longitude are required, but "
583
+ "are obtained pressing the \"verify\" button after type the address"
584
+ msgstr ""
585
+ "Entrez les informations du point (la latitude et la longitude sont "
586
+ "obligatoires , mais on les obtient en appuyant sur le bouton \"vérifier\" "
587
+ "après avoir entré l'adresse)"
588
+
589
+ #: ../include/functions.php:752
590
+ msgid ""
591
+ "Insert the shortcode in the post's content pressing the \"insert the map tag"
592
+ "\" button"
593
+ msgstr ""
594
+ "Insérer le code dans le contenu du message en appuyant sur le \"insérer le "
595
+ "Shortcode de la carte\""
596
+
597
+ #: ../include/functions.php:753
598
+ msgid ""
599
+ "If you want to use specific settings just for this map, press the \"Show/"
600
+ "Hide Map's Options\" button, and modifies the settings for this map"
601
+ msgstr ""
602
+ "Si vous voulez utiliser les paramètres spécifiques juste pour cette carte , "
603
+ "cochez la case \"Utiliser les paramètres particuliers pour cette carte:\" , "
604
+ "et modifiez les paramètres de cette carte"
605
+
606
+ #: ../include/functions.php:754
607
+ msgid ""
608
+ "Don't forget to press the \"Update\" button for save the post and map data"
609
+ msgstr ""
610
+ "N'oubliez pas d'appuyer sur le bouton \"mise à jour\" pour enregistrer les "
611
+ "données de l'article et la carte."
612
+
613
+ #: ../include/functions.php:757
614
+ msgid "Map points"
615
+ msgstr "Points de la carte"
616
+
617
+ #: ../include/functions.php:784
618
+ msgid ""
619
+ "To insert this map in a post/page, press the <strong>\"insert the map tag\"</"
620
+ "strong> button and save the post/page modifications."
621
+ msgstr ""
622
+ "Pour insérer cette carte dans un article ou une page, appuyez sur la <strong "
623
+ ">\" insérer le Shortcode de la carte\" </strong> et enregistrer la "
624
+ "publication/page modifications."
625
+
626
+ #: ../include/functions.php:791
627
+ msgid "Do you want display a <strong>shape</strong> on map?"
628
+ msgstr "Vous voulez afficher une <strong>forme</strong> sur la carte?"
629
+
630
+ #: ../include/functions.php:803
631
+ msgid "stroke Weight: "
632
+ msgstr "course Poids:"
633
+
634
+ #: ../include/functions.php:813
635
+ msgid "Fill Color: "
636
+ msgstr "Couleur de remplissage:"
637
+
638
+ #: ../include/functions.php:824
639
+ msgid "Fill Opacity: "
640
+ msgstr "Remplissez Opacité:"
641
+
642
+ #: ../include/functions.php:832
643
+ msgid "Use a number between 0 and 1, 0 is transparent. "
644
+ msgstr "Utilisez un nombre entre 0 et 1 , 0 est transparent."
645
+
646
+ #: ../include/functions.php:850
647
+ msgid "If you want to display the map in page / post:"
648
+ msgstr "Si vous voulez afficher la carte dans la page ou l'article:"
649
+
650
+ #: ../include/functions.php:851
651
+ msgid "Insert the map tag"
652
+ msgstr "Insérer le Shortcode de la carte"
653
+
654
+ #: ../include/functions.php:867
655
+ msgid "To display the points that belong to any category"
656
+ msgstr "Pour afficher les points qui appartiennent à une catégorie"
657
+
658
+ #: ../include/functions.php:976
659
+ msgid "Settings Updated"
660
+ msgstr "Paramètres Mise à jour"
661
+
662
+ #: ../include/functions.php:987
663
+ msgid ""
664
+ "Generate points dynamically from geolocation information included on images, "
665
+ "when images are uploaded to WordPress:"
666
+ msgstr ""
667
+ "Générer des points dynamiquement à partir des informations de "
668
+ "géolocalisation inclus sur les images , lorsque les images sont téléchargées "
669
+ "sur WordPress:"
670
+
671
+ #: ../include/functions.php:990
672
+ msgid ""
673
+ "The geolocation information is added to the images from your mobiles or "
674
+ "cameras, if they have associated GPS devices"
675
+ msgstr ""
676
+ "Les informations de géolocalisation est ajouté aux images de vos mobiles ou "
677
+ "de caméras , se ils ont associé les appareils GPS"
678
+
679
+ #: ../include/functions.php:995
680
+ msgid ""
681
+ "Generate points dynamically from geolocation information included on posts:"
682
+ msgstr ""
683
+ "Générer des points dynamiquement à partir des informations de "
684
+ "géolocalisation inclus dans les messages:"
685
+
686
+ #: ../include/functions.php:998
687
+ msgid ""
688
+ "The geolocation information is added to the post from WordPress app in your "
689
+ "mobile"
690
+ msgstr ""
691
+ "Les informations de géolocalisation est ajouté au article de WordPress dans "
692
+ "votre application mobile"
693
+
694
+ #: ../include/functions.php:1003
695
+ msgid "Use points information in search results:"
696
+ msgstr "Utilisez des points d'information dans les résultats de recherche:"
697
+
698
+ #: ../include/functions.php:1009
699
+ msgid "Highlight post when mouse move over related point on map:"
700
+ msgstr ""
701
+ "Mettre en évidence l'article lorsque la souris survole le point concerné sur "
702
+ "la carte:"
703
+
704
+ #: ../include/functions.php:1015
705
+ msgid "Highlight class:"
706
+ msgstr "Classe pour surligner et mettre en évidence"
707
+
708
+ #: ../include/functions.php:1021
709
+ msgid "Allow to associate a map to the post types:"
710
+ msgstr "Permettre d'associer une carte pour les types d'article:"
711
+
712
+ #: ../include/functions.php:1036
713
+ msgid "Posts and Pages are selected by default"
714
+ msgstr "Articles et Pages sont sélectionnés par défaut"
715
+
716
+ #: ../include/functions.php:1042
717
+ msgid "Update Settings"
718
+ msgstr "Mise à Jour"
719
+
720
+ #: ../include/functions.php:1585
721
+ msgid "Get directions"
722
+ msgstr "Itinéraire"
723
+
724
+ #: ../include/functions.php:1586
725
+ msgid "Display on map"
726
+ msgstr "Afficher sur la carte"
727
+
728
+ #: ../include/functions.php:1587
729
+ msgid "Display street view"
730
+ msgstr "Affichage vue sur la rue"
731
+
732
+ #: ../include/functions.php:1688
733
+ msgid "Request custom changes"
734
+ msgstr "Demande de Modifications personnalisées"
735
+
736
+ #: ../include/functions.php:1745
737
+ msgid "Title:"
738
+ msgstr "Titre:"
739
+
740
+ #: ../include/functions.php:1747
741
+ msgid "Enter the map's attributes:"
742
+ msgstr "Entrez les attributs de la carte:"
743
+
744
+ #: ../include/functions.php:1750
745
+ msgid ""
746
+ "To display the points that belong to an category, use the attribute: cat="
747
+ "\"2\", where 2 is the category's ID. To display the points that belong to "
748
+ "multiple categories, separate each one by the comma symbol: cat=\"2,5,8\". "
749
+ "To display all points on website, use the value -1 for category's ID, cat="
750
+ "\"-1\". If you want to display only the points associated with the current "
751
+ "post, don't use the \"cat\" attribute."
752
+ msgstr ""
753
+ "Pour afficher les points qui appartiennent à une catégorie , utiliser "
754
+ "l'attribut: cat = \"2\", où 2 est l'ID de la catégorie. Pour afficher les "
755
+ "points qui appartiennent à plusieurs catégories, separer par les catégories "
756
+ "par des virgules: cat =\"2,5,8\". Pour afficher tous les points sur le "
757
+ "site, utilisez la valeur -1 pour l'ID de la catégorie, cat = \"- 1\". Si "
758
+ "vous souhaitez afficher uniquement les points associés par le article "
759
+ "actuel, ne pas utiliser le \"chat\" attribut."
760
+
761
+ #~ msgid ""
762
+ #~ "The feature is available only for the commercial version of plugin. <a "
763
+ #~ "href=\"http://wordpress.dwbooster.com/content-tools/codepeople-post-"
764
+ #~ "map#download\">Click Here</a>"
765
+ #~ msgstr ""
766
+ #~ "cette option est fournie par la version commerciale de ce plugin. <a href "
767
+ #~ "= \"http://wordpress.dwbooster.com/content-tools/codepeople-post-"
768
+ #~ "map#download\" target = \"_blank\">Cliquez ici</a>."
769
+
770
+ #~ msgid ""
771
+ #~ "Multiple points in the same Post/Page are available only in the <a href="
772
+ #~ "\"http://wordpress.dwbooster.com/content-tools/codepeople-post-"
773
+ #~ "map#download\" target=\"_blank\">advanced version</a>."
774
+ #~ msgstr ""
775
+ #~ "Insérer plusieurs points dans le même article/page n'est disponible que "
776
+ #~ "dans la <a href = \"http://wordpress.dwbooster.com/content-tools/"
777
+ #~ "codepeople-post-map#download\" target = \"_blank\">version commerciale</"
778
+ #~ "a>."
779
+
780
+ #~ msgid "[ + more information]"
781
+ #~ msgstr "[en savoir plus]"
readme.txt ADDED
@@ -0,0 +1,605 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Google Maps CP ===
2
+ Contributors: codepeople
3
+ Donate link: http://wordpress.dwbooster.com/content-tools/codepeople-post-map
4
+ Tags:google maps,maps,marker,gmap,places,shortcode,map,categories,post map,point,location,address,images,geocoder,google,shape,list,grouping,cluster,infowindow,route,pin,streetview,post,posts,pages,widget,image,exif tag,plugin,sidebar,stylize,admin
5
+ Requires at least: 3.0.5
6
+ Tested up to: 4.9
7
+ Stable tag: trunk
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Google Maps CP allows to associate geolocation information to your posts and to integrate your blog with Google Maps in an easy and natural way.
12
+
13
+ == Description ==
14
+
15
+ Google Map features:
16
+
17
+ ► Insert a Google map in the best position within your blog
18
+ ► Deal with large volumes of dots or markers on the Google Maps
19
+ ► Uses Google Maps to discover additional entries related to the post
20
+ ► The location can be defined by physical address and point coordinates
21
+ ► Map markers customization
22
+ ► Allows to embed Google Maps in multiple languages
23
+ ► Allows several Google Maps controls and configuration options
24
+
25
+ **Google Maps CP** allows to insert a Google Maps in a post or in any of the WordPress templates that display multiple posts.
26
+
27
+ The Google Maps inserted in a single post displays a marker at the position indicated by the geolocation information pertaining to the post, but also shows markers of the last posts published in related categories. The number of markers to display on the Google Maps can be set in the plugin's settings.
28
+
29
+ The Google Maps inserted into a template displaying multiple posts will contain as many markers as posts making up the page with the associated geolocation info. When the mouse is hovered over the marker, the post to which it belongs gets highlighted.
30
+
31
+ **Google Maps** has a wide range of settings to make your maps more versatile and adaptable.
32
+
33
+ **More about the Main Features of Google Maps CP:**
34
+
35
+ * The plugin is capable of dealing with **large volumes of dots or markers**.
36
+ * Another way for users to discover **additional entries related** to the post.
37
+ * The **location information** can be defined by physical address and point coordinates.
38
+ * Allows to **insert the Google Maps** in the best position within your blog or simply **associate the geolocation information** to the post but without displaying the Google maps.
39
+ * Markers **customization**.
40
+ * Display or hide the bubbles with markers information.
41
+ * Allows to display a bubble opened by default.
42
+ * Based on **Google Maps Javascript API Version 3**.
43
+ * Allows to embed Google maps in **multiple languages**.
44
+ * Displays **markers** belonging to posts of the same categories.
45
+ * **Several customization options** are available: initial zoom, width, height, margins, alignment, map type, map language, the way the map is displayed in a single post (either fully deployed or icon to display the Google maps), enable or disable map controls, the number of points plotted on a Google map, as well as the class that will be assigned to the post when the mouse hovers over the marker associated with the post.
46
+
47
+ **Premium Features of Google Maps CP:**
48
+
49
+ * Load points belonging to specific pages or posts.
50
+ * Load in a same map all points that belong to a specific category.
51
+ * Load in a same map the points associated to all posts.
52
+ * Display the points that belong to the posts with a specific tag.
53
+ * The location information and description may be used in posts search.
54
+ * Allows to associate multiple Google maps points to each post/page.
55
+ * Allows to draw routes through points in the same post.
56
+ * Include a search box on the map for searching additional places.
57
+ * Draw shapes on the Google Maps.
58
+ * Allows to create a legend with categories, tags, or custom taxonomies, and display or hide the points, checking or unchecking legend items.
59
+ * Include a link to get directions to the point from Google Maps.
60
+ * Include a link to open the point directly on Google Maps.
61
+ * Include a link to display directly the street view in the specific point.
62
+ * Allows to display multiple Google Maps in the same post/page (but displays the same points in all maps on page).
63
+ * Allows to insert the map as widget on sidebars.
64
+ * Allows to styling the map.
65
+ * Allows grouping multiple markers in a cluster.
66
+ * Allows to display the user location on map.
67
+ * Allows to refresh the user location on map in the time interval defined in the map's settings.
68
+ * Generates dynamic points from the geolocation information, stored in the image's metadata when it is uploaded to WordPress, and includes a button for processing all previous images.
69
+ * Generates dynamic points on map, relative to the geolocation information, assigned to the posts from WordPress App.
70
+ * Allows to associate the Google maps with any public post_type in WordPress.
71
+ * In non singular webpages, Google Maps display a map for each post.
72
+ * Allows to export all points defined in the website to a CSV file.
73
+ * Allows to import the points from a CSV or KML file.
74
+ * Allows to load a KML layer on the map from a KML file.
75
+
76
+ The third, and most extended version of the plugin is the "Developer Version". The Developer version of the Google Maps CP plugin includes all features of the Premium version, and the features listed below:
77
+
78
+ **Developer Features of Google Maps CP**
79
+
80
+ * Allows design a Contact Form, and associate it with the points in the map.
81
+ * Send notification emails with the information collected by the form.
82
+ * Associate an email address to the points, to contact a different person by each point, or a global email address to be notified from all points.
83
+ * Allows to use the image associated with the point as the point's icon on map.
84
+
85
+ **Demo of the Developer Version of Google Maps CP Plugin**
86
+
87
+ [http://demos.net-factor.com/cp-google-maps/wp-login.php](http://demos.net-factor.com/cp-google-maps/wp-login.php "Click to access the administration area demo")
88
+
89
+ [http://demos.net-factor.com/cp-google-maps/](http://demos.net-factor.com/cp-google-maps/ "Click to access the Public Page")
90
+
91
+
92
+ Note 1: To display all points that belong to a specific category in the same Google Map, it is required to insert the following shortcode [codepeople-post-map cat="3"]. The number 3 represent the category ID, replace this number by the corresponding category's ID. To insert the code directly in a template, the snippet of code would be:
93
+
94
+ <?php echo do_shortcode('[codepeople-post-map cat="3"]'); ?>
95
+
96
+ Note 2: To display all points that belong to more than one category in a same Google Map, separate the categories IDs with the comma symbol [codepeople-post-map cat="3,5"]. The numbers 3 y 5 are the categories IDs, replace these numbers by the corresponding categories IDs. To insert the code directly in a template, the snippet of code would be:
97
+
98
+ <?php echo do_shortcode('[codepeople-post-map cat="3,5"]'); ?>
99
+
100
+ Note 3: To display all points defined in the website in a same Google Map, use -1 as the category's ID: [codepeople-post-map cat="-1"] or <?php echo do_shortcode('[codepeople-post-map cat="-1"]'); ?> for template.
101
+
102
+ Note 4: To display all points that belong to the posts with a specific tag assigned in a same Google Map, for example the tag name "mytag", use the shortcode's attribute "tag", as follows: [codepeople-post-map tag="mytag"]. To insert the code directly in a template, the snippet of code would be:
103
+
104
+ <?php echo do_shortcode('[codepeople-post-map tag="mytag"]'); ?>
105
+
106
+ Note 5: To display the points belonging to specific posts or pages in a same Google Map, enter their ids separated by comma through the "id" attribute in the shortcode as follows: [codepeople-post-map id="123"]. To insert the code directly in a template, the snippet of code would be:
107
+
108
+ <?php echo do_shortcode('[codepeople-post-map id="123"]'); ?>
109
+
110
+ The "id" attribute has preference over the rest of the filtering attributes.
111
+
112
+ If you prefer configure your map directly from the shortcode, then you must enter an attribute for each map feature to specify. For example:
113
+
114
+ [codepeople-post-map width="500" height="500"]
115
+
116
+ The complete list of allowed attributes are:
117
+
118
+ Very Important. Some of attributes are available only in the premium and developer versions of the plugin.
119
+
120
+ width: Values allowed, number or percentage. Defines the map's width. [codepeople-post-map width="300"] or [codepeople-post-map width="100%"]
121
+
122
+ height: Values allowed, number or percentage (In the web's development, the height in percentage is effective only if the parent element has a height defined). Defines the map's height. [codepeople-post-map height="300"]
123
+
124
+ align: Values allowed, left, right, center. Aligns the map's container to the left, right or center. [codepeople-post-map align="center"]
125
+
126
+ dynamic_zoom: Values allowed, 1 or 0. Adjust the zoom of map dynamically to display all points on map at the same time. [codepeople-post-map dynamic_zoom="1"]
127
+
128
+ zoom: Accepts a number to define the map's zoom. To apply a zoom to the map, the dynamic zoom should be 0. [codepeople-post-map dynamic_zoom="0" zoom="5"]
129
+
130
+ type: Values allowed, SATELLITE, ROADMAP, TERRAIN and HYBRID. Select the type of map to display. [codepeople-post-map type="ROADMAP"]
131
+
132
+ language: Values allowed, en for English, es for Spanish, pt for Portuguese, etc. (for the complete list, check the Google Maps documentation). Select a language to display on map. [codepeople-post-map language="en"]
133
+
134
+ route: Values allowed, 0 or 1. Draw or not the route between points in a same post or page. [codepeople-post-map route="1"]
135
+
136
+ mode: Values allowed, DRIVING, BICYCLING and WALKING. Define the type of route. [codepeople-post-map route="1" mode="DRIVING"]
137
+
138
+ show_window: Values allowed, 0 or 1. To enable or disable the infowindows. [codepeople-post-map show_window="1" ]
139
+
140
+ show_default: Values allowed, 0 or 1. Display or not an infowindow expanded by default. [codepeople-post-map show_window="1" show_default="1"]
141
+
142
+ markerclusterer: Values allowed, 0 or 1. Displays a cluster with the number of points in an area. [codepeople-post-map markerclusterer="1"]
143
+
144
+ mousewheel: Values allowed, 0 or 1. Enables the map's zoom with the mouse wheel. [codepeople-post-map mousewheel="1"]
145
+
146
+ zoompancontrol: Values allowed, 0 or 1. Displays or hide the zoom controls in the Google Maps. [codepeople-post-map zoompancontrol="1"]
147
+
148
+ typecontrol: Values allowed, 0 or 1. Displays or hide the type control in the Google Map. [codepeople-post-map typecontrol="1"]
149
+
150
+ streetviewcontrol: Values allowed, 0 or 1. Displays or hide the street-view control in the Google Map. [codepeople-post-map streetviewcontrol="1"]
151
+
152
+ defaultpost: Defines the post ID, for centring the map, and display by default the infowindow corresponding to the first point associated to this post. [codepeople-post-map defaultpost="396"]
153
+
154
+ center: To define the center of the map, but if the infowindows are configured to be opened by default, the map will be centered in the point with the infowindow opened. [codepeople-post-map center="40.7127837,-74.00594130000002"]
155
+
156
+ legend: Accepts a taxonomy name as value. Some common taxonomies names are: category and post_tag, for the categories and tags, respectively. Displays the legend with the list of elements that belong to the taxonomy and are assigned to the posts associated with the points. [codepeople-post-map legend="category"]
157
+
158
+ legend_title: Text to be used as legend title. [codepeople-post-map legend="category" legend_title="Select the categories to display on map"]
159
+
160
+ legend_class: Class name to be assigned to the legend. The legend design may be modified through CSS styles. Creates a class name, with the styles definition, and associates the new class name to the legend through the legend_class attribute. [codepeople-post-map legend="category" legend_class="my-legend-class"]
161
+
162
+ tag: Tags slugs separated by ",". Displays on map the points whose posts have assigned the tags.[codepeople-post-map tag="tag1,tag2,tag3"]
163
+
164
+ cat: Categories IDs separated by "," or -1. Displays on map the points whose posts belong to the categories. The special value -1, allows display on map all points defined in the website.[codepeople-post-map cat="2,4,56"] [codepeople-post-map cat="-1"]
165
+
166
+ excludecat: Categories IDs to exclude, separated by ",". From points to be displayed on map, the plugin excludes the points whose posts belong to the categories to exclude. [codepeople-post-map tag="tag1,tag2" excludecat="4"]
167
+
168
+ excludepost: Posts IDs to exclude separated by ",". [codepeople-post-map cat="-1" excludepost="235,260"]
169
+
170
+ excludetag: Tags IDs to exclude separated by ",". [codepeople-post-map excludetag="2,13"]
171
+
172
+ taxonomy: The taxonomy is a special attribute that should be combined with other attributes, depending of taxonomies to use for points filtering. Suppose the website includes two new taxonomies: taxonomyA and taxonomyB, and the map should display all points that belong to the posts with the value T1 for taxonomyA, and T3,T4 for taxonomyB, the shortcode would be: [codepeople-post-map taxonomy="taxonomyA,taxonomyB" taxonomyA="T1" taxonomyB="t2,t3"]
173
+
174
+ Note 5: The geolocation information is stored in image's metadata from mobiles or cameras with GPS devices.
175
+
176
+ Note 6: Some plugins interfere with the shortcodes replacements, and provokes that maps don't be loaded correctly, in this case should be passed a new parameter through the shortcode print=1
177
+
178
+ Passing the parameter print=1, displays the map at beginning of page/post content.
179
+
180
+ Note 7: To display in the Google Map all points in posts with a specific taxonomy assigned, or multiple taxonomies, should be used the "taxonomy" attribute in the shortcode, with the list of all taxonomies separated by the comma symbol, for example: taxonomy="taxonomy1,taxonomy2", and a new attribute for each taxonomy with the values corresponding. For example if you want select the points that belong to the posts with the values: "value1" for "taxonomy1", the shortcode would be: [codepeople-post-map taxonomy="taxonomy1" taxonomy1="value1"], for multiple taxonomies: [codepeople-post-map taxonomy="taxonomy1,taxonomy2" taxonomy1="value1" taxonomy2="value2,value3"].
181
+
182
+ post_type: In combination with other attributes like: cat, tag or taxonomy, it is possible to load on map only the points that belong to the post types in the list. [codepeople-post-map cat="-1" post_type="post,page"]
183
+
184
+ excludepost_type: In combination with other attributes like: cat, tag or taxonomy, it is possible to load on map only the points that do not belong to the post types in the list. [codepeople-post-map cat="-1" excludepost_type="post"]
185
+
186
+ kml: Absolute URL (http://...) to a KML file with the Keyhole Markup Language. [codepeople-post-map kml="http://www.yourwebsite.com/your-file.kml"]
187
+
188
+ If you want more information about this plugin or another one don't doubt to visit my website:
189
+
190
+ [http://wordpress.dwbooster.com/content-tools/codepeople-post-map](http://wordpress.dwbooster.com/content-tools/codepeople-post-map "Google Maps CP")
191
+
192
+ == Installation ==
193
+
194
+ **To install Google Maps CP, follow these steps:**
195
+
196
+ 1. Download and unzip the plugin
197
+ 2. Upload the entire codepeople-post-map/ directory to the /wp-content/plugins/ directory
198
+ 3. Activate the plugin through the Plugins menu in WordPress
199
+
200
+ == Interface ==
201
+
202
+ **Google Maps** offers several setting options and is highly flexible. Options can be set up in the Settings page (and will become the **default setup** for all maps added to posts in the future), or may be **specific to each post** to be associated with the Google maps (in this case the values are entered in the editing screen of the post in question.)
203
+
204
+ The settings are divided into two main groups, those belonging to the Google maps and those belonging to the geolocation point.
205
+
206
+ **Google Maps configuration options:**
207
+
208
+ * Map zoom: Initial map zoom.
209
+ * Dynamic zoom: Allows to adjust the map's zoom dynamically to display all points at the same time.
210
+ * Map width: Width of the map.
211
+ * Map height: Height of the map.
212
+ * Map margin: Margin of the map.
213
+ * Map align: Aligns the map at left, center or right of area.
214
+ * Map type: Select one of the possible types of maps to load (roadmap, satellite, terrain, hybrid).
215
+ * Map language: a large number of languages is available to be used on maps, select the one that matches your blog's language.
216
+ * Allow drag the map: allows drag the map to see other places.
217
+ * Map route: Draws the route through the points that belong to the same post (available only in the premium and developer versions of plugin)
218
+ * Travel Mode: Travel mode used in route drawing (available only in the premium and developer versions of plugin)
219
+ * Include Traffic Layer: Displays a traffic layer over the map.
220
+ * Show info bubbles: display or hide the bubbles with the information associated to the points.
221
+ * Display a bubble by default: display a bubble opened by default.
222
+ * Display map in post / page: When the Google maps are inserted in a post you can select whether to display the Google maps or display an icon, which displays the map, when pressed (if the Google maps are inserted into a template that allows multiple posts, this option does not apply)
223
+ * Options: This setting allows you to select which map controls should be available.
224
+ * Display a bundle of points in the same area, like a cluster: Allows grouping multiple points in a cluster (available only in the premium and developer versions of plugin)
225
+ * Display Featured Image by default: Displays the Featured Image in posts and pages in the infowindows, if the points don't have associated an image.
226
+ * Display the user's location: Displays a marker with the location of user that is visiting the webpage (available only in the premium and developer versions of plugin)
227
+ * Refresh the user's location every: Integer number that represent the interval in milliseconds to refresh the user's location (available only in the premium and developer versions of plugin)
228
+ * Title of user's location: Enter the title of infowindow belonging to the user's marker (available only in the premium and developer versions of plugin)
229
+ * Display the get directions link: Displays a link in the infowindow to get the directions to the point (available only in the premium and developer versions of plugin)
230
+ * Display a link to Google Maps: Displays a link in the infowindow to load the point directly on Google Maps.
231
+ * Display a link to Street View: Displays a link in the infowindow to display the street view in the specific point.
232
+ * Enter the number of points on the post / page map: When the Google maps are inserted into a post, points that belong to the same categories will be shown on the same Google map. This option allows you to set the number of points to be shown. When the Google maps are inserted into a template that allows multiple posts this option does not apply.
233
+ * Generate points dynamically from geolocation information included on images, when images are uploaded to WordPress: If the image uploaded to WordPress includes geolocation information is generated a point with related to the geolocation information.
234
+ * Generate points dynamically from geolocation information included on posts: Displays new points on maps, if the post includes geolocation information, generated by WordPress App.
235
+ * Allow stylize the maps: Allows to define a JSON object to stylize the maps.
236
+ * Display maps legends: Check the option to display a legend with categories, tags, or custom taxonomies, to display or hide the points on map dynamically.
237
+ * Select the taxonomy to display on legend: Select the taxonomies to display on legend.
238
+ * Enter a title for legend: Enter the title to display in the legend.
239
+ * Enter a classname to be applied to the legend: To customize the legend appearance, associate to it a classname, and set the class definition in any of style files in your website.
240
+ * Highlight post when mouse hovers over related point on map: When the Google maps are inserted into a template that allows multiple posts, hovering the mouse over one of the points will highlight the associated post through assignment of a class in the next setup option.
241
+ * Highlight class: Name of the class to be assigned to a post to highlight when the mouse is hovered over the point associated with that post on the Google map.
242
+ * Use points information in search results: Allows search in the points information ( available only in the premium and developer versions of plugin )
243
+ * Allow to associate a map to the post types: Allows to associate points to custom post types in website ( available only in the premium and developer versions of plugin )
244
+
245
+ **Configuration options related to the points location**
246
+
247
+ * Location name: Name of the place you are indicating on the Google maps, alternatively, the name of the post can be used.
248
+ * Location description: Description of the place you are showing on the Google maps. If left blank, the post summary will be used.
249
+ * Select an image from media library: Select an image to associate with the localization point.
250
+ * Address: Physical address of the geolocation point.
251
+ * Latitude: Latitude of the geolocation point (gotten from Google Maps).
252
+ * Longitude: Longitude of the geolocation point (gotten from Google Maps).
253
+ * Verify: This button allows you to check the accuracy of the geolocation point address by updating the latitude and longitude where necessary.
254
+ * Select the marker by clicking on the images: Select the bookmark icon to show on the Google Maps.
255
+ * Insert the map tag: Inserts a shortcode in the content of the post where the Google Map is displayed with the features selected in the setup. You can attach geolocation information to a post but choose not to show the Google maps in the content of the post. In case you do want to display a map in the post content, use this button.
256
+
257
+ **Configure Shapes**
258
+
259
+ * Check the box over the "Insert the map tag" button.
260
+ * Enter the stroke weight of shape.
261
+ * Enter the color of shape.
262
+ * Enter the opacity of shape.
263
+ * Press with the mouse on map at right to draw the shape.
264
+
265
+ **Inserting maps as widgets on sidebars** (available only in the premium and developer versions of plugin)
266
+
267
+ To insert the maps as widget on sidebars, go to the menu option "Appearance / Widgets", and drag the "CP Google Maps" widget to the sidebar.
268
+
269
+ It is possible define, for each map on sidebar, all attributes available with the format attr="value". The map's width is set to the 100% of sidebar by default.
270
+
271
+ **Translations**
272
+
273
+ The Google Maps CP uses the English language by default, but includes the following language packages:
274
+
275
+ * Spanish
276
+ * French
277
+
278
+ Note: The languages packages are generated dynamically. If detects any errors in the translation, please, contact us to correct it.
279
+
280
+ == Frequently Asked Questions ==
281
+
282
+ = Q: Why the Google Map shortcode is not inserted on page content? =
283
+
284
+ A: There are some content editors, available as WordPress plugins, that provoke some compatibility issues with WordPress, in this case you should type the shortcode manually:
285
+ [codepeople-post-map]
286
+
287
+ = Q: How many Google Maps I can insert into a post? =
288
+
289
+ A: In the free version of plugin only one map with only one point associated in each post/page. In the premium version of plugin it is possible associate multiple points to the post and insert multiple shortcodes ( if there are multiple maps included in the same post/page, all of them will display the same points)
290
+
291
+ = Q: How to insert Google Maps into a template? =
292
+
293
+ A: Load the template in which you want to place the map in the text editor of your choice and place the following code in the position where you want to display the Google maps:
294
+
295
+ <?php echo do_shortcode ('[codepeople-post-map]'); ?>
296
+
297
+ = Q: Is possible to load all points that belong to the posts with a tag assigned in a same Google Map? =
298
+
299
+ A: To display all points that belong to the posts with a specific tag assigned, for example the tag name "mytag", use the shortcode's attribute "tag", as follows: [codepeople-post-map tag="mytag"]. To insert the code directly in a template, the snippet of code would be:
300
+
301
+ <?php echo do_shortcode('[codepeople-post-map tag="mytag"]'); ?>
302
+
303
+ = Q: How to know the ID of a category? =
304
+
305
+ A: The explanation to determine the ID of a category is applied to other taxonomies.
306
+
307
+ Access to the categories through the menu option: "Posts/Categories". After accessing to the categories page, click the "Edit" link corresponding to the category, and pays special attention to the parameter "tag_ID", in the URL on browser. The value in this parameter correspond to the ID of the category.
308
+
309
+ = Q: Is possible to load all points in a category in a same Google Map? =
310
+
311
+ A: To display all points that belong to a specific category, it is required to insert the following shortcode [codepeople-post-map cat="3"]. The number 3 represent the category ID, replace this number by the corresponding category's ID. To insert the code directly in a template, the snippet of code would be:
312
+
313
+ <?php echo do_shortcode ('[codepeople-post-map cat="3"]'); ?>
314
+
315
+ = Q: How to exclude the points in a category? =
316
+
317
+ A: To exclude the points that belong to a specific category, or various categories, inserts the attribute excludecat in the shortcode [codepeople-post-map excludecat="3,4"]. The number 3 and 4 represent the categories IDs.
318
+
319
+ = Q: How to exclude the points in a post? =
320
+
321
+ A: To exclude the points that belong to a post, or various posts, inserts the attribute excludepos in the shortcode [codepeople-post-map excludepost="3,4"]. The number 3 and 4 represent the posts IDs.
322
+
323
+ = Q: How to exclude the points in posts with tag? =
324
+
325
+ A: To exclude the points that belong to the post with a specific tag, or various tags, inserts the attribute excludetag in the shortcode [codepeople-post-map excludetag="3,4"]. The number 3 and 4 represent the tags IDs.
326
+
327
+ = Q: Is possible to load all points in more than one category in a same Google Map? =
328
+
329
+ A: To display all points that belong to multiple categories, it is required separate the categories IDs with comma "," [codepeople-post-map cat="3,5"]. The numbers 3 and 5 are the categories IDs, replace these numbers with the corresponding categories IDs. To insert the code directly in a template, the snippet of code would be:
330
+
331
+ <?php echo do_shortcode ('[codepeople-post-map cat="3,5"]'); ?>
332
+
333
+ = Q: Is possible to load all points in the website in a same Google Map? =
334
+
335
+ A: To display all points in the website use -1 as the category ID: [codepeople-post-map cat="-1"] or &lt;?php echo do_shortcode ('[codepeople-post-map cat="-1"]'); ?&gt; for template.
336
+
337
+ = Q: If I link geolocation information to a post but do not insert a Google map in it, will the geolocation information be available? =
338
+
339
+ A: If you have inserted a Google map into a template where multiple posts are displayed, then the geolocation information associated with posts is displayed on the map.
340
+
341
+ = Q: How can I disable the information window of point opened by default? =
342
+
343
+ A: Go to the settings of map (the settings page of plugin for settings of all maps, or the settings of a particular map), and uncheck the option "Display a bubble by default"
344
+
345
+ = Q: How can I disable all information windows of points? =
346
+
347
+ A: Go to the settings of map (the settings page of plugin for settings of all maps, or the settings of a particular map), and uncheck the option "Show info bubbles"
348
+
349
+ = Q: How can I stylize the Google Maps? =
350
+
351
+ A: In the premium version of plugin is possible define a JSON object to stylize the maps: the maps' colors, labels, etc.
352
+
353
+ To generate the styles used on maps, I personally recommend to visit the following link that publishes a visual generator of styles, and get the JSON object, to be use in our plugin:
354
+
355
+ [http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html](http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html "How to use the Styled Maps Wizard")
356
+
357
+
358
+ = Q: How can I use different icons, in the points markers? =
359
+
360
+ A: To use your own icons, you only should to upload the icons images to the following location: "/wp-content/plugins/codepeople-post-map/images/icons/", and then select the image from the list in the point's definition.
361
+
362
+ = Q: How can I use particular settings in a map? =
363
+
364
+ A: You may use a particular settings in a map, defining the options directly as attributes of shortcode: [codepeople-post-map width="100%"]
365
+
366
+ If you are inserting the map in a particular page/post, you may check the field named "Use particular settings for this map", and then entering the particular values in the settings options.
367
+
368
+ = Q: Is possible to display the map as responsive design? =
369
+
370
+ A: Yes, that is possible, you only should to define the width of map with values in percent. For example: 100%
371
+ Pay attention the height definition with percent is not recommended, because it is only possible if the map's container has a fixed height.
372
+
373
+ = Q: How to get the directions to the point? =
374
+
375
+ A: Go to the settings page of plugin and check the box to display the "Get directions" link in the infowindow. The "Get directions" link will be displayed in the infowindow.
376
+
377
+ = Q: Is possible to include multiple taxonomies in the maps' legends? =
378
+
379
+ A: In the shortcode can be defined the attribute "legend" for selecting the taxonomy to use in the legend of map: [codepeople-post-map legend="category"], but from the version 5.0.6 of the plugin it is possible to define in the legend multiple taxonomies separated by comma, to include all of them in the map's legend: [codepeople-post-map legend="category,post_tag"]
380
+
381
+ = Q: How to open the point on Google Maps? =
382
+
383
+ A: If you want to display a link to open the point directly on Google Maps, go to the settings page of plugin, and checks the box to display the link in the infowindow.
384
+
385
+ = Q: Could I insert the map as widget? =
386
+
387
+ A: Yes, you can. Go to the menu option: "Appearance / Widgets" and insert the "CP Google Maps" widget on side bar.
388
+
389
+ = Q: My images include geolocation information. Is possible use the geolocaion information stored in the image to generate points on map? =
390
+
391
+ A: Go to the settings page of plugin and select the corresponding option to allow processing the information stored on image's metadata, and then if an image uploaded to WordPress, includes geolocation information, will be generated a point with this information dynamically, that will be displayed on map.
392
+
393
+ = Q: Why the maps are not showing on website? =
394
+
395
+ A: Some plugins interfere with the shortcodes replacements, and provokes that maps don't be loaded correctly, in this case should be passed a new parameter through the shortcode print=1
396
+ Passing the parameter print=1, displays the map at beginning of page/post content.
397
+
398
+ = Q: It is possible to draw routes for flights between countries? =
399
+
400
+ A: By default Google draws routes between points connected by cars, bus, trains, etc, but not for flights. So, in this case should be used polylines. To connect points with polylines, tick the attribute: "Connect the points with polylines, even if there is not a route between points", in the settings page of maps.
401
+
402
+ = Q: How can I change the route between address? =
403
+
404
+ A: The route depends on the order of the points. If you want change the route, you should change the order of point. Takes the point by the handle's icon, and drag it to its correct position in the points list.
405
+
406
+ = Q: What are the differences between routes and polylines? =
407
+
408
+ A: The routes are drawn on maps, only if there are known routes between the locations, based in the travelling mode (driving, walking), but if Google unknown a way between both address, is not able to draw the route. The polylines are straight lines connecting two addresses, even if there is not a route. It is main difference between both concepts, and why the polylines are preferred for representing flights.
409
+
410
+ = Q: Is possible create routes between points in different posts? =
411
+
412
+ A: Yes, it's possible to draw a route including points belonging to different posts/pages, but in the current version of the plugin would be needed duplicate some points. Visit the following link to our technical blog with detailed instructions:
413
+
414
+ [http://blog.net-factor.com/how-connecting-multiple-posts-on-a-route/](http://blog.net-factor.com/how-connecting-multiple-posts-on-a-route/ "How connecting multiple posts on a route?")
415
+
416
+ = Q: How can I centring the map in a point defined a specific post, and display its infowindow? =
417
+
418
+ A: Use the "defaultpost" attribute, in the map's shortcode, as follows:
419
+
420
+ [codepeople-post-map defaultpost="231"]
421
+
422
+ The number is the post's ID
423
+
424
+ = Q: I've configured the sizes of the map to be displayed with a responsive design, but the map is not showing =
425
+
426
+ A: To display the maps with a responsive design, you should define the map's width with percentages (for example 100% if you want that the map width be the same that its container), but PAY ATTENTION, in web development the treatment of the width and height is different. The page width is limited by the browser's width, but with the height it is not apply. So, you should enter a fixed height(for example 320px).
427
+
428
+ The only way to define the map's height in percentages, is if the element that contain the map has defined a fixed height.
429
+
430
+ = Q: Can be inserted a link in the infowindow? =
431
+
432
+ A: It is possible insert links, and any other HTML element in the infowindow. You only should insert HTML tags directly in the point description. For example, to insert a link to our web page: &lt;a href="http://wordpress.dwbooster.com"&gt;Click Here&lt;/a&gt;
433
+
434
+ = Q: After entering an address, and to press the verify button, the address is modified, and the pin is displayed in a different location of the map =
435
+
436
+ A: If after pressing the "verify" button, the address is modified dynamically, and the pin is displayed in another location, the cause is simple. If Google Maps does not recognize an address, it uses the nearest known address, and displays the pin on this location.
437
+
438
+ To solve the issue, you simply should drag and drop the pin in the correct location, and type the address again, but this time "DON'T PRESS AGAIN THE VERIFY BUTTON".
439
+
440
+ = Q: I've inserted an image in the page, but have not been generated a new point in the map =
441
+
442
+ A: First, be sure you have checked the option "Generate points dynamically from geolocation information included on images, when images are uploaded to WordPress", from the settings page of the plugin.
443
+
444
+ Second, be sure the image includes the Exif tags with the geolocation information (latitude and longitude)
445
+
446
+ Finally, you should upload the image from the "Add Media" button of the page or post, and not from the media library.
447
+
448
+ = Q: Can be generated a point from the page publication, with the location of the author? =
449
+
450
+ A: Yes, that is possible but only from the WordPress App, available for iPhone, iPad and Android, with the option for sharing the location enabled in the application. Furthermore, from the settings page of the plugin, should be checked the option: "Generate points dynamically from geolocation information included on posts"
451
+
452
+ = Q: How to display a map in the search results page, with the points defined in the resulting posts and pages? =
453
+
454
+ A: To insert a map in the results page with the points defined in the resulting posts and pages, you simply should identify the template file, in the active theme on your WordPress, that is used in the search page (usually it is called search.php), and inserts the map's shortcode directly in the file's content:
455
+
456
+ <?php echo do_shortcode( '[codepeople-post-map]' ); ?>
457
+
458
+ = Q: Can be searched in the website by the points information? =
459
+
460
+ A: If was checked the option "Use points information in search results", from the settings page of the plugin. The searching process will consider the points information too, and the posts and pages resulting could be selected by its points.
461
+
462
+ Pay attention, the results of search will be the posts and pages that include the points, not the point directly.
463
+
464
+ = Q: What styles are used in the infowindows? =
465
+
466
+ A: The design of infowindows is defined through styles in the cpm-styles.css file, located in "/wp-content/plugins/codepeople-post-map/styles/cpm-styles.css", specifically with the styles:
467
+
468
+ .cpm-infowindow {margin:0; padding:0px; min-height:80px; font-size:11px; clear:both;}
469
+ .cpm-infowindow .cpm-content {float:left;width:100%; color:black;}
470
+ .cpm-infowindow .cpm-content .title {font-size:12px; line-height: 18px; font-weight:bold; color:black;}
471
+ .cpm-infowindow .cpm-content .address {font-weight:bold; font-size:9px;}
472
+ .cpm-infowindow .cpm-content .description {font-size:10px;}
473
+
474
+ = Q: Can be hidden the local listings from Google Maps API? =
475
+
476
+ A: Yes of course, if you want hide the local listings from Google Maps API, open the settings page of plugin, select the "Allow stylize the maps" attribute, and finally, paste the following code in the textarea:
477
+
478
+ [
479
+ {
480
+ featureType: "poi",
481
+ stylers: [
482
+ { visibility: "off" }
483
+ ]
484
+ }
485
+ ]
486
+
487
+ = Q: Can be highlighted the post or page related with the point on map? =
488
+
489
+ A: From the settings page of the plugin, there are two options:
490
+
491
+ * Highlight post when mouse move over related point on map
492
+ * Highlight class
493
+
494
+ If you check the option: "Highlight post when mouse move over related point on map", and enter a class name in the "Highlight class" attribute, in the maps inserted on pages with multiple entries, the class name will be applied to the post, or page, when the mouse is moved over a point associated in the corresponding page or post.
495
+
496
+ = Q: How can be created shapes on map? =
497
+
498
+ A: In the map's definition, directly in the page or post where the map is being inserted, there is the checkbox: "Do you want display a shape on map?", please, tick the checkbox to expand the shape's section.
499
+
500
+ The shape's section includes some options like: the stroke weight (if you don't want to display an stroke around the shape, set its value to zero), the fill colour (the colour code with the format: #FFFFFF, to select the shape colour), and the opacity to be applied to the shape, take into consideration than zero is transparent and 1 is opaque. Remember, the shape is displayed over the map, if you set the opacity to 1, won't be possible to see the map's area.
501
+
502
+ Now the most important part create the shape's area. To create the shape's area is sufficient with click in the map at right (Don't worry, the pins are not included in the final map, are inserted in the preview map to allow modify the shape's area). Through the pins at right map it is possible modify the shape's area, click on the pin to delete it, or drag the pin to another location to vary the shape.
503
+
504
+ == Screenshots ==
505
+
506
+ 01. Maps in action
507
+ 02. Styling the maps
508
+ 03. Map with user's location
509
+ 04. Map with shape
510
+ 05. Global maps settings
511
+ 06. Point insertion's form
512
+ 07. Inserting map on sidebars
513
+ 08. Generates points, from the geolocation information stored on image's metadata
514
+ 09. Contact Form Builder (only available in the Developer version of the plugin)
515
+ 10. Associate the contact form with the point, and define an email address between the point's data (only available in the Developer version of the plugin)
516
+ 11. Export/Import section (only available in the Developer version of the plugin)
517
+
518
+ == Changelog ==
519
+
520
+ = 1.0.13 =
521
+
522
+ * Fixes the issue in the plugin that clears the general settings when the updates are installed.
523
+
524
+ = 1.0.12 =
525
+
526
+ * Allows to select the information to display in the tooltips associated to the pins (the point location name, the address, or none).
527
+
528
+ = 1.0.11 =
529
+
530
+ * Fixes an issue processing the latitudes and longitudes.
531
+
532
+ = 1.0.10 =
533
+
534
+ * Removes the invalid characters from the points' latitudes and longitudes.
535
+
536
+ = 1.0.9 =
537
+
538
+ * Uses correct protocol in the markers' urls.
539
+
540
+ = 1.0.8 =
541
+
542
+ * Allows the integration with the Gutenberg Editor, the text editor that will be distributed with the next versions of WordPress.
543
+
544
+ = 1.0.7 =
545
+
546
+ * Replaces the maps' shortcodes into the WordPress "Text" widget.
547
+ * Fixes an issue in the javascript code.
548
+
549
+ = 1.0.6 =
550
+
551
+ * Modifies the plugin to use the new controls of Google Maps like the fullscreen control.
552
+
553
+ = 1.0.5 =
554
+
555
+ * Checks if the get_post_meta does not unserialize the result, and applies the unserialize it if corresponds.
556
+
557
+ = 1.0.4 =
558
+
559
+ * Fixes a Cross Site Scripting vulnerability modifying the form's action, in the settings page of the plugin. Fortunately, this vulnerability can be exploded only by users with access to the settings page of the plugin that is restricted only to the website's administrators. The vulnerability was Discovered with DefenseCode WebScanner Security Analyzer by Neven Biruski.
560
+
561
+ = 1.0.3 =
562
+
563
+ * Includes a "Troubleshoot Section" in the settings page of the plugin to load the resources used by the plugin in the body or footer of webpage to prevent conflicts with other plugins.
564
+
565
+ = 1.0.2 =
566
+
567
+ * Allows to display a traffic layer over the map.
568
+ * Fixes some errors.
569
+ * Modifies the menu options to improve the access to the plugin documentation.
570
+
571
+ = 1.0.1 =
572
+
573
+ * Allows to get the latitude and longitude of points from the point definition
574
+ * Corrects some conflicts with styles defined in some themes that interfere with the Google Maps styles.
575
+ * Allows display the maps, in themes that use AJAX to load the posts and pages.
576
+ * Corrects some issues related with the update in the version of jQuery Framework, and force the inclusion of jQuery if it is not loaded by the website.
577
+ * Improves the plugin interface to allow modify the maps settings easily.
578
+ * Allows controlling the maps settings directly through attributes in the shortcode.
579
+ * Corrects an issue with the insertion of maps with a responsive design.
580
+ * Allows insert links in the points description.
581
+ * Include online demos.
582
+ * Change the icons URL to preserve the references with domain changes.
583
+ * Allows display and hide map when is inserted like an icon in page.
584
+ * Allows the selection of point images as thumbnail to optimize the page load.
585
+ * Changes the HTML generated to meet the W3C validation
586
+ * Include the use of nonce fields to protect the maps settings form.
587
+ * The Google Api is loaded with the same schema of webpage, and use https if it is required.
588
+
589
+ = 1.0 =
590
+
591
+ * Insert a Google Map in template files page with multiple entries.
592
+ * Improves of meta-boxes calling.
593
+ * Correct some bugs in Internet Explorer 8.
594
+ * Integrate the Google Map with non-standard WordPress themes.
595
+ * Allows the use of language files in the plugin
596
+ * Allows set an icon by default in the points of map.
597
+ * Uses Google Maps to discover additional entries related to the post
598
+ * The location can be defined by physical address and point coordinates
599
+ * Allows the map markers customization
600
+ * Allows to embed Google Maps in multiple languages
601
+ * Allows several Google Maps controls and configuration options
602
+
603
+ = 0.9b =
604
+
605
+ * First stable version released
styles/cpm-admin-styles.css ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * CodePeople Post Map
3
+ * Version: 1.0.1
4
+ * Author: CodePeople
5
+ * Plugin URI: http://wordpress.dwbooster.com
6
+ */
7
+
8
+ #cpm_icon_cont {width:98%;height:126px;float:left;overflow-y:auto;padding:2px;border:solid #CCC 1px;}
9
+ .cpm_icon {float:left;cursor:pointer;margin:1px;padding:1px;border:solid 1px #F9F9F9;cursor:pointer;width:37px;height:37px;}
10
+ .cpm_selected {border:solid #CCC 1px !important;background-color:#BBBBBB;}
11
+ .cpm_label {padding:5px;text-align:left;}
12
+ #icon_credit {clear:both;padding-top:3px;width:167px;float:right;}
13
+ #cpm_thumbnail_container {clear:both;overflow:auto;width:100%;height:65px;}
14
+ .cpm_thumb {padding:4px;width:40px;height:40px;float:left;}
15
+ .cpm_thumb_selected, .cpm_thumb:hover{border:solid #CCC 1px !important;}
16
+ .cpm_more_info{ border: 1px solid #E6DB55; background-color: #FFFFE0; padding: 10px; margin: 10px 0; display:none; }
17
+
18
+ .cpm_blink_me {
19
+ animation-name: cpm_blinker;
20
+ animation-duration: 1s;
21
+ animation-timing-function: linear;
22
+ animation-iteration-count: infinite;
23
+
24
+ -webkit-animation-name: cpm_blinker;
25
+ -webkit-animation-duration: 1s;
26
+ -webkit-animation-timing-function: linear;
27
+ -webkit-animation-iteration-count: infinite;
28
+ }
29
+
30
+ @-moz-keyframes cpm_blinker { /* Decimal not necessary, 0 and 1 is enough */
31
+ 0% { opacity: 1.0; }
32
+ 50% { opacity: 0.0; }
33
+ 100% { opacity: 1.0; }
34
+ }
35
+
36
+ @-webkit-keyframes cpm_blinker {
37
+ 0% { opacity: 1.0; }
38
+ 50% { opacity: 0.0; }
39
+ 100% { opacity: 1.0; }
40
+ }
41
+
42
+ @keyframes cpm_blinker {
43
+ 0% { opacity: 1.0; }
44
+ 50% { opacity: 0.0; }
45
+ 100% { opacity: 1.0; }
46
+ }
styles/cpm-styles.css ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * CodePeople Post Map
3
+ * Version: 1.0.1
4
+ * Author: CodePeople
5
+ * Plugin URI: http://wordpress.dwbooster.com
6
+ */
7
+
8
+ body .content .cpm-map img, .cpm-map img{ max-width: none !important; height: auto !important; background: none !important;border:0 !important;margin:0 !important;padding:0 !important;}
9
+ .cpm-map *{box-sizing:content-box;-moz-box-sizing:content-box;}
10
+ .cpm-mapicon { width:20px; height:34px; cursor:pointer;background:url(../images/icons/marker.png) no-repeat 0 0; }
11
+ .cpm-infowindow {margin:0; padding:0px; min-height:80px; font-size:11px; clear:both;}
12
+ .cpm-infowindow .cpm-content {float:left;width:100%; color:black;}
13
+ .cpm-infowindow .cpm-content .title {font-size:12px; line-height: 18px; font-weight:bold; color:black;}
14
+ .cpm-infowindow .cpm-content .address {font-weight:bold; font-size:9px;}
15
+ .cpm-infowindow .cpm-content .description {font-size:10px;}
16
+ .cpm_highlight{background:rgba(253,253,253,0.5);}