From b69f83ac6f1ee54378877abe049ef47aaa30307b Mon Sep 17 00:00:00 2001 From: Amandine Eoxia Date: Thu, 26 Jul 2018 14:30:32 +0200 Subject: [PATCH] 2.1.0: Fix default marker --- modules/annonce/shortcode/annonce.shortcode.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/annonce/shortcode/annonce.shortcode.php b/modules/annonce/shortcode/annonce.shortcode.php index 0161e24..bdd6e8e 100644 --- a/modules/annonce/shortcode/annonce.shortcode.php +++ b/modules/annonce/shortcode/annonce.shortcode.php @@ -107,7 +107,9 @@ public function annonces_display_shortcode( $atts ) { $parent->list_tax_id = substr( $parent->list_tax_id, 0, -1 ); /** Pin color of the child */ - $parent->marker = PLUGIN_ANNONCES_URL . 'modules/annonce/asset/img/pin-' . get_field( 'icon', $parent ) . '.png'; + $parent_marker_data = get_field( 'icon', $parent ); + $parent_marker_data = ( ! empty( $parent_marker_data ) ) ? $parent_marker_data : 'red'; + $parent->marker = PLUGIN_ANNONCES_URL . 'modules/annonce/asset/img/pin-' . $parent_marker_data . '.png'; } /** Title of filter bloc */