From 733332d4efad8f326deaec4768c56f3a35121547 Mon Sep 17 00:00:00 2001 From: Iris Abarquez Date: Thu, 8 Aug 2024 10:59:18 +1000 Subject: [PATCH] WPCIVIUX-154 Do not output location info if there is none --- civicrm-ux.php | 2 +- rest/json-all-events.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/civicrm-ux.php b/civicrm-ux.php index 7c8c9ad..a7bd063 100644 --- a/civicrm-ux.php +++ b/civicrm-ux.php @@ -9,7 +9,7 @@ * Plugin Name: WP CiviCRM UX * Plugin URI: https://github.com/agileware/wp-civicrm-ux * Description: A better user experience for integrating WordPress and CiviCRM - * Version: 1.14.1 + * Version: 1.14.2 * Requires at least: 5.8 * Requires PHP: 7.4 * Requires Plugins: civicrm diff --git a/rest/json-all-events.php b/rest/json-all-events.php index c671e3e..e06954c 100644 --- a/rest/json-all-events.php +++ b/rest/json-all-events.php @@ -238,9 +238,11 @@ protected function generate_event_html($event, $upload, $colors, $image_src_fiel $template .= '
' . $event['event_type_id:label'] . '
' . $event['title'] . '
-
' . $event_time . '
-
' . $event_location . '
'; +
' . $event_time . '
'; + if ( !empty($event_location) ) { + $template .= '
' . $event_location . '
'; + } $template .= $event['is_online_registration'] ? '
Click here to register
' : '';