Google Maps CP - Version 1.0.39

Version Description

  • Includes three new filters, cmp-point, cpm-point-infowindow-template, and cpm-point-infowindow, to edit the attributes of the point, modify the infowindows template, and edit the generated infowindows, respectively.
Download this release

Release Info

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

Code changes from version 1.0.37 to 1.0.39

Files changed (3) hide show
  1. codepeople-post-map.php +1 -1
  2. include/functions.php +6 -5
  3. readme.txt +9 -1
codepeople-post-map.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Google Maps CP
4
  Text Domain: codepeople-post-map
5
- Version: 1.0.37
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
2
  /*
3
  Plugin Name: Google Maps CP
4
  Text Domain: codepeople-post-map
5
+ Version: 1.0.39
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
include/functions.php CHANGED
@@ -130,7 +130,7 @@ class CPM {
130
  delete_post_meta($post_id,'cpm_map');
131
 
132
  $new_cpm_point = ( isset( $_POST['cpm_point'] ) ) ? $_POST['cpm_point'] : array();
133
- $new_cpm_map = $this->array_map_recursive(array($this, 'sanitize_html'), $new_cpm_point);
134
  $new_cpm_map = ( isset( $_POST['cpm_map'] ) ) ? $_POST['cpm_map'] : array();
135
  $new_cpm_map = $this->array_map_recursive('sanitize_text_field', $new_cpm_map);
136
 
@@ -141,7 +141,7 @@ class CPM {
141
  if($new_cpm_map['single']){
142
  $new_cpm_point['address'] = esc_attr( ( !empty( $new_cpm_point['address'] ) ) ? $new_cpm_point['address'] : '' );
143
  $new_cpm_point['name'] = esc_attr( ( !empty( $new_cpm_point['name'] ) ) ? $new_cpm_point['name'] : '' );
144
- $new_cpm_point['description'] = esc_attr( ( !empty( $new_cpm_point['description'] ) ) ? $new_cpm_point['description'] : '' );
145
 
146
 
147
  $new_cpm_map['zoompancontrol'] = ($new_cpm_map['zoompancontrol'] == true);
@@ -1105,7 +1105,7 @@ class CPM {
1105
  }
1106
  $point['post_id'] = $post_id;
1107
  if(!in_array($point, $this->points)){
1108
- $this->points[] = $point;
1109
  }
1110
  }
1111
  }
@@ -1464,6 +1464,7 @@ class CPM {
1464
 
1465
  $windowhtml = "";
1466
  $windowhtml_frame = $this->get_configuration_option('windowhtml');
 
1467
 
1468
  $point_title = (!empty($point['name'])) ? $point['name'] : get_the_title($point['post_id']);
1469
  $point_link = (!empty($point['post_id'])) ? get_permalink($point['post_id']) : '';
@@ -1503,11 +1504,11 @@ class CPM {
1503
  }
1504
 
1505
  $find = array("%title%","%link%","%thumbnail%", "%excerpt%","%description%","%address%","%width%","\r\n","\f","\v","\t","\r","\n","\\","\"");
1506
- $replace = array($point_title,$point_link,$point_img,"",$point_description,$point_address,$html_width,"","","","","","","","'");
1507
 
1508
  $windowhtml = str_replace( $find, $replace, $windowhtml_frame);
1509
 
1510
- return $windowhtml;
1511
  } // End _get_windowhtml
1512
 
1513
  /**
130
  delete_post_meta($post_id,'cpm_map');
131
 
132
  $new_cpm_point = ( isset( $_POST['cpm_point'] ) ) ? $_POST['cpm_point'] : array();
133
+ $new_cpm_point = $this->array_map_recursive(array($this, 'sanitize_html'), $new_cpm_point);
134
  $new_cpm_map = ( isset( $_POST['cpm_map'] ) ) ? $_POST['cpm_map'] : array();
135
  $new_cpm_map = $this->array_map_recursive('sanitize_text_field', $new_cpm_map);
136
 
141
  if($new_cpm_map['single']){
142
  $new_cpm_point['address'] = esc_attr( ( !empty( $new_cpm_point['address'] ) ) ? $new_cpm_point['address'] : '' );
143
  $new_cpm_point['name'] = esc_attr( ( !empty( $new_cpm_point['name'] ) ) ? $new_cpm_point['name'] : '' );
144
+ $new_cpm_point['description'] = ( !empty( $new_cpm_point['description'] ) ) ? $new_cpm_point['description'] : '';
145
 
146
 
147
  $new_cpm_map['zoompancontrol'] = ($new_cpm_map['zoompancontrol'] == true);
1105
  }
1106
  $point['post_id'] = $post_id;
1107
  if(!in_array($point, $this->points)){
1108
+ $this->points[] = apply_filters('cpm-point', $point);
1109
  }
1110
  }
1111
  }
1464
 
1465
  $windowhtml = "";
1466
  $windowhtml_frame = $this->get_configuration_option('windowhtml');
1467
+ $windowhtml_frame = apply_filters('cpm-point-infowindow-template', $windowhtml_frame, $point);
1468
 
1469
  $point_title = (!empty($point['name'])) ? $point['name'] : get_the_title($point['post_id']);
1470
  $point_link = (!empty($point['post_id'])) ? get_permalink($point['post_id']) : '';
1504
  }
1505
 
1506
  $find = array("%title%","%link%","%thumbnail%", "%excerpt%","%description%","%address%","%width%","\r\n","\f","\v","\t","\r","\n","\\","\"");
1507
+ $replace = array($point_title,$point_link,$point_img,"",do_shortcode($point_description),$point_address,$html_width,"","","","","","","","'");
1508
 
1509
  $windowhtml = str_replace( $find, $replace, $windowhtml_frame);
1510
 
1511
+ return apply_filters('cpm-point-infowindow', $windowhtml, $point);
1512
  } // End _get_windowhtml
1513
 
1514
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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: 5.7
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -636,6 +636,14 @@ Now the most important part create the shape's area. To create the shape's area
636
 
637
  == Changelog ==
638
 
 
 
 
 
 
 
 
 
639
  = 1.0.37 =
640
 
641
  * Modifies the interaction with the Google APIs to prevent the limits on Google requests, affect our plugin.
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: 5.8
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
636
 
637
  == Changelog ==
638
 
639
+ = 1.0.39 =
640
+
641
+ * Includes three new filters, cmp-point, cpm-point-infowindow-template, and cpm-point-infowindow, to edit the attributes of the point, modify the infowindows template, and edit the generated infowindows, respectively.
642
+
643
+ = 1.0.38 =
644
+
645
+ * Allows the use of shortcodes into the points' descriptions.
646
+
647
  = 1.0.37 =
648
 
649
  * Modifies the interaction with the Google APIs to prevent the limits on Google requests, affect our plugin.