function node_registration_preprocess_page in Node registration 7
Implements hook_preprocess_page().
@TODO Find a better way for this? Whatever this is...
File
- ./
node_registration.module, line 497
Code
function node_registration_preprocess_page(&$vars) {
if (!($node = menu_get_object()) || !_node_registration_node_type_enabled($node->type)) {
if (isset($vars['tabs']['#primary']) && is_array($vars['tabs']['#primary'])) {
foreach ($vars['tabs']['#primary'] as $i => $tab) {
if ($tab['#link']['path'] == 'node/%/node_registration') {
if (!isset($tab['#link']['access_callback']) || $tab['#link']['access_callback'] != 'node_registration_node_access') {
unset($vars['tabs']['#primary'][$i]);
}
}
}
}
}
}