Actions
Feature #14969
closed'Campus' filter support for the activity directory
Start date:
2021-11-16
Due date:
% Done:
0%
Estimated time:
Deployment actions:
Description
Hi Ray - I came across this while making some changes today: https://github.com/cuny-academic-commons/cac/blob/07f5167714bc7bfbcf159de0fd6d43e8bb78f341/wp-content/themes/bp-nelo/parts/home/activity.php#L176
How can we add '?campus=' support to the activity directory? It's going to be ugly. Something like:
'filter_query' => [
'relation' => 'OR',
'campus_members' => [
'column' => 'user_id',
'value' => members_of_campus( $campus ),
'compare' => 'IN',
],
'campus_groups' => [
'relation' => 'AND',
[
'column' => 'item_id',
'value' => groups_of_campus( $campus ),
'compare' => 'IN',
],
[
'column' => 'component',
'value' => 'groups',
]
],
'campus_sites' => [
'relation' => 'AND',
[
'column' => 'item_id',
'value' => sites_of_campus( $campus ),
'compare' => 'IN',
],
[
'column' => 'component',
'value' => 'blogs',
]
],
]
Does this seem like the right approach? Can you have a go at it? Or are we going to have to scrap it for 1.19.0?
Files
Actions