function restrict_ip_preprocess_page in Restrict IP 7.2
Same name and namespace in other branches
- 8.2 restrict_ip.module \restrict_ip_preprocess_page()
- 8 restrict_ip.module \restrict_ip_preprocess_page()
- 6 restrict_ip.module \restrict_ip_preprocess_page()
- 7 restrict_ip.module \restrict_ip_preprocess_page()
- 3.x restrict_ip.module \restrict_ip_preprocess_page()
Override of template_preprocess_page().
Unsets tabs and various other page elements for blocked users so they are not rendered.
File
- ./
restrict_ip.module, line 372 - Holds hooks for the restrict_ip module.
Code
function restrict_ip_preprocess_page(&$page) {
if (ip_restricted()) {
if (isset($page['tabs'])) {
if (isset($page['tabs']['#primary'])) {
$page['tabs']['#primary'] = array();
}
if (isset($page['tabs']['#secondary'])) {
$page['tabs']['#primary'] = array();
}
}
$page['title_prefix'] = array();
$page['title_suffix'] = array();
$page['main_menu'] = array();
$page['secondary_menu'] = array();
$page['action_links'] = array();
}
}