function tft_og_context_handler in Taxonomy File Tree 7
OG Context handler. Determine context for certain internal pages.
Return value
array
1 string reference to 'tft_og_context_handler'
- tft_og_context_negotiation_info in ./
tft.module - Implements hook_og_context_negotiation_info
File
- ./
tft.module, line 1631 - Module hooks.
Code
function tft_og_context_handler() {
if (preg_match('/^tft\\/(term\\/(edit|delete|archive)|terms\\/reorder)\\/[0-9]+/', current_path())) {
$tid = array_pop(explode('/', current_path()));
}
elseif (current_path() == 'tft/term/add' && !empty($_GET['parent'])) {
$tid = $_GET['parent'];
}
if (!empty($tid)) {
$gid = tft_get_og_nid($tid);
if (!empty($gid)) {
return array(
'node' => array(
$gid,
),
);
}
}
}