Skip to content

Commit

Permalink
Merge pull request #1262 from visual-framework/misc-updates
Browse files Browse the repository at this point in the history
updates CH query to include primary position for people profiles
  • Loading branch information
kasprzyk-sz authored Aug 1, 2023
2 parents 94685c1 + b4a54cb commit d40e207
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
4 changes: 3 additions & 1 deletion wp-content/plugins/vf-group-header-block/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions wp-content/plugins/vf-members-block/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
);

Expand Down
2 changes: 2 additions & 0 deletions wp-content/plugins/vf-members-block/vf-person/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion wp-content/plugins/vf-members-internal/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion wp-content/themes/vf-wp-groups/template-trec-events.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,27 @@ class="vf-search__button | vf-button vf-button--tertiary vf-button--sm">
'orderby' => 'meta_value_num',
'meta_key' => 'vf_event_start_date',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'vf_event_start_date',
'value' => $current_date,
'compare' => '>=',
'type' => 'numeric'
),
array(
'key' => 'vf_event_end_date',
'value' => $current_date,
'compare' => '>=',
'type' => 'numeric'
),
array(
'key' => 'vf_event_start_date',
'value' => date('Ymd', strtotime('now')),
'type' => 'numeric',
'compare' => '>=',
)
) ));
$current_month = ""; ?>
$current_month = ""; ?>
<?php while ($forthcomingLoop->have_posts()) : $forthcomingLoop->the_post();?>
<?php
include(locate_template('partials/vf-summary--trec-event.php', false, false)); ?>
Expand Down

0 comments on commit d40e207

Please sign in to comment.