Skip to content

Commit 42514fa

Browse files
committed
map plugin updated, version 2.0.1 released
1 parent 3ca64d1 commit 42514fa

File tree

5 files changed

+51
-25
lines changed

5 files changed

+51
-25
lines changed

assets/css/cbxgooglemap-admin.css

Lines changed: 41 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/cbxgooglemap-public.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cbxgooglemap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Plugin Name: CBX Map for Google Map & OpenStreetMap
1717
* Plugin URI: https://codeboxr.com/product/cbx-google-map-for-wordpress/
1818
* Description: Easy responsive embed of google map and openstreet map
19-
* Version: 2.0.0
19+
* Version: 2.0.1
2020
* Author: Codeboxr
2121
* Author URI: https://codeboxr.com
2222
* License: GPL-2.0+
@@ -33,7 +33,7 @@
3333
}
3434

3535
defined( 'CBXGOOGLEMAP_PLUGIN_NAME' ) or define( 'CBXGOOGLEMAP_PLUGIN_NAME', 'cbxgooglemap' );
36-
defined( 'CBXGOOGLEMAP_PLUGIN_VERSION' ) or define( 'CBXGOOGLEMAP_PLUGIN_VERSION', '2.0.0' );
36+
defined( 'CBXGOOGLEMAP_PLUGIN_VERSION' ) or define( 'CBXGOOGLEMAP_PLUGIN_VERSION', '2.0.1' );
3737
defined( 'CBXGOOGLEMAP_BASE_NAME' ) or define( 'CBXGOOGLEMAP_BASE_NAME', plugin_basename( __FILE__ ) );
3838
defined( 'CBXGOOGLEMAP_ROOT_PATH' ) or define( 'CBXGOOGLEMAP_ROOT_PATH', plugin_dir_path( __FILE__ ) );
3939
defined( 'CBXGOOGLEMAP_ROOT_URL' ) or define( 'CBXGOOGLEMAP_ROOT_URL', plugin_dir_url( __FILE__ ) );

includes/CBXGoogleMapAdmin.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ public function metabox_save($post_id, $post, $update)
487487
if (isset($_POST[$meta_prefix.$id])) {
488488

489489
if (isset($_POST[$meta_prefix.$id])) {
490-
$updated_value = sanitize_text_field(wp_unslash($_POST[$meta_prefix.$id]));
490+
$updated_value = wp_unslash($_POST[$meta_prefix.$id]);
491491

492492

493493
if ($field_type == 'text') {
@@ -498,6 +498,9 @@ public function metabox_save($post_id, $post, $update)
498498
if ($sanitize_callback !== null && is_callable($sanitize_callback)) {
499499
$updated_value = call_user_func($sanitize_callback, $updated_value);
500500
}
501+
else{
502+
$updated_value = sanitize_text_field(wp_unslash($updated_value));
503+
}
501504
}
502505

503506
$is_sortable = isset($field['sortable']) ? $field['sortable'] : false;
@@ -1134,7 +1137,7 @@ public function render_block($attributes)
11341137
//$general_settings = get_option( 'cbxgooglemap_general', [] );
11351138

11361139
$api_key = $settings->get_field('apikey', 'cbxgooglemap_general', '');
1137-
$map_source = intval($settings->get_field('mapsource', 'cbxgooglemap_general', 1));
1140+
$map_source = (int) $settings->get_field( 'mapsource', 'cbxgooglemap_general', 1 );
11381141

11391142
if ($map_source == 1 && $api_key == '') {
11401143
echo '<p style="text-align: center;">'.esc_html__('Google Map Api Key is invalid!', 'cbxgooglemap').'</p>';
@@ -1160,7 +1163,7 @@ public function render_block($attributes)
11601163
}
11611164

11621165
if (isset($attributes['height'])) {
1163-
$attr['height'] = intval($attributes['height']);
1166+
$attr['height'] = (int) $attributes['height'];
11641167
}
11651168

11661169
if (isset($attributes['zoom'])) {

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://codeboxr.com
44
Tags: google map, openstreetmap, openstreet, gutenberg block, elementor addons
55
Requires at least: 5.3
66
Tested up to: 6.8
7-
Stable tag: 2.0.0
7+
Stable tag: 2.0.1
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

0 commit comments

Comments
 (0)