Module hooks

Classified Ads defines three notification hooks, which a module can implement to notify users of the impending or occurred expiration or purge of their ads.

For an implementation example, look into function classified_notifications_classified_purge_alter() in file classsified_notification.module.

Note that, although these are "alter" hooks, modification of the $ads array has no impact on the actions performed by Classified Ads: they will only affect other modules with a higher weight also implementing the same hook.

Format of the $ads array

The three hooks receive an array in the same format:

$data =  array(
  uid1 => array(
    nid11 => title11,
    nid12 => title12,
    nid... => title...,
  ),
  uid2 => array(
    nid21 => title21,
    nid22 => title22,
    nid... => title...,
  ),
  uid... => array(
    nid... => title...,
  ),
);