diff --git a/WPEvents.php b/WPEvents.php index 6fe1825..7744734 100644 --- a/WPEvents.php +++ b/WPEvents.php @@ -4,7 +4,7 @@ Plugin URI: https://github.com/matiere-noire/ Description: Gestion des événements Author: Matière Noire -Version: 1.4.1 +Version: 1.5.2 Author URI: https://github.com/matiere-noire/ Text Domain: mn-wp-events Domain Path: /languages diff --git a/src/Classes/WPQueryEventsFilters.php b/src/Classes/WPQueryEventsFilters.php index 3581d40..d99de02 100644 --- a/src/Classes/WPQueryEventsFilters.php +++ b/src/Classes/WPQueryEventsFilters.php @@ -107,7 +107,8 @@ public function jointDateTable($join, $wp_query) global $wpdb; if ($this->isQueryEvents($wp_query)) { - $join .= " LEFT JOIN {$wpdb->wpe_dates} as wpe_dates on wpe_dates.wpe_event_id = {$wpdb->posts}.ID "; + $leftJoin = apply_filters('wpe/event_join_table', "LEFT JOIN {$wpdb->wpe_dates} as wpe_dates on wpe_dates.wpe_event_id = {$wpdb->posts}.ID "); + $join .= $leftJoin; } return $join; } @@ -207,7 +208,7 @@ public function eventsQueryResults($posts, $wp_query) : array private function areDatesFieldsConcatened($wp_query) { - return !(isset($wp_query->query_vars['wpe_date_query']) || $this->isOrderByEvent($wp_query->query_vars['orderby'])) || is_search(); + return !(isset($wp_query->query_vars['wpe_date_query']) || $this->isOrderByEvent($wp_query->query_vars['orderby'])); } /**