From 81f34cd6104d60f73e14aaaa366504789c507b71 Mon Sep 17 00:00:00 2001 From: Szymon Kasprzyk Date: Tue, 1 Aug 2023 12:04:01 +0200 Subject: [PATCH] updates CH query to include primary position for people profiles --- wp-content/plugins/vf-group-header-block/template.php | 4 +++- wp-content/plugins/vf-members-block/template.php | 5 +++-- wp-content/plugins/vf-members-block/vf-person/template.php | 2 ++ wp-content/plugins/vf-members-internal/template.php | 4 +++- .../vf-members-internal/vf-person-internal/template.php | 2 ++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/wp-content/plugins/vf-group-header-block/template.php b/wp-content/plugins/vf-group-header-block/template.php index 24a769536..1c4d2b956 100644 --- a/wp-content/plugins/vf-group-header-block/template.php +++ b/wp-content/plugins/vf-group-header-block/template.php @@ -63,7 +63,9 @@ 'hide[team,mobile,phones]' => 1, 'sort-field-value[changed]' => 'DESC', 'filter-ref-entity[field_person_positions][title]' => "", - 'filter-field-value[field_person_positions.entity.field_position_membership]' => 'leader' + 'filter-field-value[field_person_positions.entity.field_position_membership]' => 'leader', + 'filter-ref-entity[field_person_positions][field_position_primary]' => 1 + ); if ($is_minimal) { diff --git a/wp-content/plugins/vf-members-block/template.php b/wp-content/plugins/vf-members-block/template.php index 7770baf6c..f98999ebf 100644 --- a/wp-content/plugins/vf-members-block/template.php +++ b/wp-content/plugins/vf-members-block/template.php @@ -45,7 +45,8 @@ 'sort-field-value[field_person_full_name]' => 'ASC', 'filter-fields-empty' => 'field_person_visible_internally', 'filter-ref-entity[field_person_positions][title]' => "", - 'hide[team,' . $hide_fields . ']' => 1 + 'hide[team,' . $hide_fields . ']' => 1, + 'filter-ref-entity[field_person_positions][field_position_primary]' => 1 ); if ($leader !== true) { @@ -120,7 +121,7 @@ $content = preg_replace( '#^(\s*<[^>]+?vf-content-hub-html)#', - '$1 vf-grid vf-grid__col-' . $columns, + '$1 vf-grid vf-grid__col-' . $columns . ' | vf-u-margin__bottom--800', $content ); diff --git a/wp-content/plugins/vf-members-block/vf-person/template.php b/wp-content/plugins/vf-members-block/vf-person/template.php index 249200a93..9012e0521 100644 --- a/wp-content/plugins/vf-members-block/vf-person/template.php +++ b/wp-content/plugins/vf-members-block/vf-person/template.php @@ -67,6 +67,8 @@ 'limit' => 1, 'filter-ref-entity[field_person_positions][title]' => "", 'hide[' . $hide_fields . ']' => 1, + 'filter-ref-entity[field_person_positions][field_position_primary]' => 1 + ), $url); // Add search field query var diff --git a/wp-content/plugins/vf-members-internal/template.php b/wp-content/plugins/vf-members-internal/template.php index 2fa1c638d..0bdeeb4f5 100644 --- a/wp-content/plugins/vf-members-internal/template.php +++ b/wp-content/plugins/vf-members-internal/template.php @@ -45,7 +45,9 @@ 'sort-field-value[field_person_name_last]' => 'DSC', 'filter-fields-empty' => 'field_person_visible_internally', 'filter-ref-entity[field_person_positions][title]' => "", - 'hide[team,' . $hide_fields . ']' => 1 + 'hide[team,' . $hide_fields . ']' => 1, + 'filter-ref-entity[field_person_positions][field_position_primary]' => 1 + ); if ($leader !== true) { diff --git a/wp-content/plugins/vf-members-internal/vf-person-internal/template.php b/wp-content/plugins/vf-members-internal/vf-person-internal/template.php index 3c1a077fe..37ff29cb8 100644 --- a/wp-content/plugins/vf-members-internal/vf-person-internal/template.php +++ b/wp-content/plugins/vf-members-internal/vf-person-internal/template.php @@ -67,6 +67,8 @@ 'limit' => 1, 'filter-ref-entity[field_person_positions][title]' => "", 'hide[' . $hide_fields . ']' => 1, + 'filter-ref-entity[field_person_positions][field_position_primary]' => 1 + ), $url); // Add search field query var