function og_views_query_substitutions in Organic groups 6
Same name and namespace in other branches
- 5.8 og_views.inc \og_views_query_substitutions()
- 5 og_views.inc \og_views_query_substitutions()
- 5.3 og_views.inc \og_views_query_substitutions()
- 5.7 og_views.inc \og_views_query_substitutions()
- 6.2 modules/og_views/og_views.views.inc \og_views_query_substitutions()
Implementation of hook_views_query_substitutions().
File
- modules/
og_views/ og_views.views.inc, line 115
Code
function og_views_query_substitutions($view) {
$groupnode = og_get_group_context();
// return -1 instead of 0 to avoid matching all posts without a group
return array(
'***CURRENT_GID***' => $groupnode ? $groupnode->nid : -1,
);
}