Skip to content

Commit aa09b3f

Browse files
authored
Merge pull request #63 from OpenWebconcept/feature/OWC-159
Feature/owc 159
2 parents 04c2598 + 69d5e7a commit aa09b3f

File tree

5 files changed

+36
-3
lines changed

5 files changed

+36
-3
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## v0.2.6
4+
- Flush cache when saving settings.
5+
6+
## v0.2.5
7+
- Added settings for default latitude, longitude and zoom level.
8+
- Fixed bugs for map not showing when there are no markers (AS-21249).
9+
10+
## v0.2.4
11+
- Set default marker color to blue (AS-20050).
12+
13+
## v0.2.2
14+
- Initialize JavaScript only when the div for the map is present (AS-19732).
15+
16+
## v0.2.1
17+
- Update composer dependencies.
18+
19+
## v0.2.0
20+
- Several bug fixes and new features.
21+
322
## v0.1.2
423
- Prepare the plugin for the use of the OpenKaarten Geodata Addon Plugin.
524

openkaarten-base.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Plugin Name: OpenKaarten Base
1414
* Plugin URI: https://www.openwebconcept.nl
1515
* Description: The OpenKaarten Base plugin.
16-
* Version: 0.2.4
16+
* Version: 0.2.6
1717
* Author: Acato
1818
* Author URI: https://www.acato.nl
1919
* License: EUPL-1.2
@@ -27,7 +27,7 @@
2727
die;
2828
}
2929

30-
define( 'OWC_OPENKAARTEN_BASE_VERSION', '0.2.4' );
30+
define( 'OWC_OPENKAARTEN_BASE_VERSION', '0.2.6' );
3131

3232
if ( ! defined( 'OWC_OPENKAARTEN_BASE_ABSPATH' ) ) {
3333
define( 'OWC_OPENKAARTEN_BASE_ABSPATH', plugin_dir_path( __FILE__ ) );

phpcs.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
6767
<properties>
6868
<property name="prefixes" type="array">
69+
<element value="openkaarten"/>
6970
<element value="Openkaarten_Base"/>
7071
<element value="OWC_OPENKAARTEN_BASE"/>
7172
</property>

src/admin/class-datalayers.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,21 @@ public static function add_markers_metaboxes() {
574574
]
575575
);
576576

577+
$cmb->add_field(
578+
[
579+
'name' => __( 'Default marker icon', 'openkaarten-base' ),
580+
'desc' => __( 'Select the default icon for the marker for the whole datalayer.', 'openkaarten-base' ),
581+
'id' => 'default_marker_icon',
582+
'type' => 'select',
583+
'show_option_none' => true,
584+
'options_cb' => [ 'Openkaarten_Base_Plugin\Admin\Datalayers', 'cmb2_marker_icons_options' ],
585+
]
586+
);
587+
577588
$cmb->add_field(
578589
[
579590
'name' => __( 'Default marker color', 'openkaarten-base' ),
591+
'desc' => __( 'Select the default color for the marker for the whole datalayer.', 'openkaarten-base' ),
580592
'id' => 'default_marker_color',
581593
'type' => 'select',
582594
'default' => 'marker-blue', // default 'Blue'.
@@ -635,6 +647,7 @@ public static function add_markers_metaboxes() {
635647
$group_field_id,
636648
[
637649
'name' => __( 'Marker color', 'openkaarten-base' ),
650+
'desc' => __( 'Select the color for the marker.', 'openkaarten-base' ),
638651
'id' => 'marker_color',
639652
'type' => 'select',
640653
'default' => 'marker-black', // Default 'Black'.

src/admin/class-locations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public static function get_location_marker( $datalayer_id, $location_id = false,
273273
$markers = get_post_meta( $datalayer_id, 'markers', true );
274274

275275
$color = get_post_meta( $datalayer_id, 'default_marker_color', true );
276-
$icon = false;
276+
$icon = get_post_meta( $datalayer_id, 'default_marker_icon', true );
277277

278278
$datalayer_url_type = get_post_meta( $datalayer_id, 'datalayer_url_type', true ) ? : 'import';
279279

0 commit comments

Comments
 (0)