You are here

function notifications_url_options in Notifications 7

Wrapper for url() function with some more options

2 calls to notifications_url_options()
Notifications_Subscription::element_link in ./notifications.subscription.inc
Get link element
notifications_tokens in ./notifications.module
Implements hook_tokens().

File

./notifications.module, line 1357
Notifications module

Code

function notifications_url_options($path, $options = array()) {
  $options += array(
    'skip_confirmation' => FALSE,
    'query' => array(),
  );

  // If skip confirmation, links need to be signed
  $options += array(
    'signed' => $options['skip_confirmation'],
  );

  // If signed, add timestamp and signature, and maybe skip confirmation
  if ($options['signed']) {
    $options['query'] += array(
      'timestamp' => REQUEST_TIME,
    );
    if ($options['skip_confirmation']) {
      $options['query']['skip'] = 1;
    }
    $options['query']['signature'] = notifications_url_signature($path, $options['query']);
  }
  return $options;
}