| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | function delete_weekly_cron_handler($hook, $entity_type, $return_value, $params) { |
||
| 16 | echo "<p>Starting up the cron job for the delete old notification (delete_old_notif plugin)</p>"; |
||
| 17 | elgg_load_library('elgg:old_notification:functions'); |
||
| 18 | |||
| 19 | $cutoff_timestamp = time() - ( elgg_get_plugin_setting('delete_old_notif_cutoff', 'delete_old_notif', 90) * 24 * 60 * 60 ); |
||
| 20 | $err = initialize_list( $cutoff_timestamp ); |
||
| 21 | |||
| 22 | if (!$err) |
||
| 23 | delete_notifications(); |
||
| 24 | } |