From 0aa6f2f7628ad9389767cfdbcfa7c6a216620cda Mon Sep 17 00:00:00 2001 From: olatechpro Date: Wed, 24 Jul 2024 16:57:51 +0100 Subject: [PATCH] Fix filter --- modules/calendar/calendar.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/calendar/calendar.php b/modules/calendar/calendar.php index 680ee54f..c448e016 100644 --- a/modules/calendar/calendar.php +++ b/modules/calendar/calendar.php @@ -1175,6 +1175,11 @@ public function get_filters() // phpcs:disable WordPress.Security.NonceVerification.Recommended $current_user = wp_get_current_user(); + + if (!empty($_REQUEST['reset_user_filter'])) { + $this->update_user_meta($current_user->ID, self::USERMETA_KEY_PREFIX . 'filters', []); + } + $filters = []; $old_filters = $this->get_user_meta($current_user->ID, self::USERMETA_KEY_PREFIX . 'filters', true); @@ -1838,6 +1843,7 @@ class="co-filter content_calendar_filters() as $select_id => $select_name) { echo ''; } ?> +