<?php
function pawshake_notification_add($notification_type, $external_id, $uid = 0, $expire = -1, $variables = array()) {
$notification = array(
'created' => time(),
'notification_type' => $notification_type,
'external_id' => $external_id,
'variables' => $variables,
);
// User id is optional.
if ($uid) {
$notification['uid'] = $uid;
}
// If no expire is send, default to one day.
if ($expire == -1) {
$notification['expire'] = time() + 86400;
}
echo $notification['expire'];
}
$expire = time() + 86400 + 86400;
pawshake_notification_add('thread_start', 0, 0, $expire);
preferences:
33.16 ms | 402 KiB | 5 Q