function tft_og_tft_folder_menu_links_alter in Taxonomy File Tree 7.2
Implements hook_tft_folder_menu_links_alter().
File
- modules/
tft_og/ tft_og.module, line 106 - Hook implementations for TFT OG.
Code
function tft_og_tft_folder_menu_links_alter(&$links, $tid) {
$og_nid = tft_og_get_og_nid($tid);
if ($og_nid) {
if (!empty($links['reorder_items']) && !og_user_access('node', $og_nid, TFT_PERM__REORDER_ITEMS)) {
unset($links['reorder_items']);
}
elseif (empty($links['reorder_items']) && og_user_access('node', $og_nid, TFT_PERM__REORDER_ITEMS)) {
$links['reorder_items'] = array(
'title' => t("reorder elements"),
'href' => "tft/terms/reorder/{$tid}",
'attributes' => array(
'id' => 'manage-folders',
'class' => array(
'folder-menu-ops-link',
),
),
'query' => array(
'destination' => (!empty($_SESSION['tft']['q']) ? $_SESSION['tft']['q'] : '') . "#tft/{$tid}",
),
);
}
}
}