From ac27ff2e03b2c6905b97e485e307795beed7f154 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sat, 27 Mar 2021 14:34:09 -0700 Subject: [PATCH] CRM_Core_Region - Apply programmatic filters before sorting --- CRM/Core/Region.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Region.php b/CRM/Core/Region.php index 388d8d17f2..4d9f733068 100644 --- a/CRM/Core/Region.php +++ b/CRM/Core/Region.php @@ -61,6 +61,8 @@ class CRM_Core_Region implements CRM_Core_Resources_CollectionInterface, CRM_Cor $this->snippets['default']['markup'] = $default; } + Civi::dispatcher()->dispatch('civi.region.render', \Civi\Core\Event\GenericHookEvent::create(['region' => $this])); + $this->sort(); $cms = CRM_Core_Config::singleton()->userSystem; @@ -142,7 +144,6 @@ class CRM_Core_Region implements CRM_Core_Resources_CollectionInterface, CRM_Cor } }; - Civi::dispatcher()->dispatch('civi.region.render', \Civi\Core\Event\GenericHookEvent::create(['region' => $this])); foreach ($this->snippets as $snippet) { if (empty($snippet['disabled'])) { $renderSnippet($snippet); -- 2.25.1