function notifications_subscription_get_link in Notifications 6.4
Get subscribe / unsubscribe page link for subscription
Parameters
$op: Operation: 'subscribe', 'unsubscribe'
$subscription: Subscription object, may be instance or not
$options: Link options
2 calls to notifications_subscription_get_link()
- NotificationsAnonymousTests::testAnonymousSubscriptions in tests/
notifications_anonymous.test - Notifications_Subscription::build_link in includes/
notifications_subscription.class.inc - Build subscribe /unsubscribe link
File
- ./
notifications.module, line 1578 - Notifications module
Code
function notifications_subscription_get_link($op, $subscription, $options = array()) {
$options += array(
'destination' => $_GET['q'],
);
if ($op == 'subscribe' && variable_get('notifications_ui_subscribe_links', 0)) {
$options += array(
'signed' => TRUE,
'confirm' => FALSE,
);
}
if ($op == 'unsubscribe' && variable_get('notifications_ui_unsubscribe_links', 0)) {
$options += array(
'signed' => TRUE,
'confirm' => FALSE,
);
}
return notifications_build_link($op, $options, 'subscription', $subscription);
}