You are here

function subscriptions_init in Subscriptions 2.0.x

Same name and namespace in other branches
  1. 6 subscriptions.module \subscriptions_init()
  2. 7 subscriptions.module \subscriptions_init()

Implements hook_init().

File

./subscriptions.module.old.php, line 32
Subscriptions module.

Code

function subscriptions_init() {
  define('SUBSCRIPTIONS_UNAVAILABLE', '<span class="error" title="' . t('(unavailable to regular users)') . '">&curren;</span>');
  if (subscriptions_arg(0) == 's' && subscriptions_arg(1) == 'del') {
    $router_item = menu_get_item('subscriptions/rem/' . substr(current_path(), 6));
    if (isset($router_item) && $router_item['access']) {
      menu_set_item(current_path(), $router_item);
    }
  }
}