function sharebar_preprocess_region in ShareBar 7
Same name and namespace in other branches
- 8 sharebar.module \sharebar_preprocess_region()
Preprocess variables for region.tpl.php.
File
- ./
sharebar.module, line 228 - Various module information.
Code
function sharebar_preprocess_region(&$variables) {
if ($variables['region'] == 'content') {
// Revoking on 404 pages.
$status = drupal_get_http_header('Status');
if (arg(0) != 'admin' && $status != '404 Not Found') {
if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == '' && variable_get('sharebar_bar_posts_' . _sharebar_get_node_type($variables) . '_enabled', TRUE) || !(arg(0) == 'node' && is_numeric(arg(1))) && arg(1) != 'add' && arg(2) != 'edit' && arg(3) != 'edit' && variable_get('sharebar_bar_pages_enabled', TRUE) && variable_get('sharebar_bar_onblock', FALSE) == '0') {
$variables['content'] = sharebar_onblock() . $variables['content'];
}
}
}
}