function subscriptions_init in Subscriptions 6
Same name and namespace in other branches
- 7 subscriptions.module \subscriptions_init()
- 2.0.x subscriptions.module.old.php \subscriptions_init()
Implementation of hook_init().
File
- ./
subscriptions.module, line 26 - Subscriptions module.
Code
function subscriptions_init() {
define('SUBSCRIPTIONS_UNAVAILABLE', '<span class="error" title="' . t('(unavailable to regular users)') . '">¤</span>');
if (subscriptions_arg(0) == 'subscriptions' || subscriptions_arg(2) == 'subscriptions') {
include_once drupal_get_path('module', 'subscriptions') . '/subscriptions.admin.inc';
// TODO: do we need this?
}
if (subscriptions_arg(0) == 's' && subscriptions_arg(1) == 'del') {
$router_item = menu_get_item('subscriptions/rem/' . substr($_GET['q'], 6));
if (isset($router_item) && $router_item['access']) {
menu_set_item($_GET['q'], $router_item);
}
}
}