Sindbad~EG File Manager

Current Path : /var/www/html/cisuenolar.sumar.com.py/wp-content/plugins/peepso/classes/
Upload File :
Current File : /var/www/html/cisuenolar.sumar.com.py/wp-content/plugins/peepso/classes/maintenancecore.php

<?php
if(class_exists('PeepSoMaintenanceFactory')) {
    class PeepSoMaintenanceCore extends PeepSoMaintenanceFactory
    {
        public static function deleteOldNotifications()
        {
            global $wpdb;

            $days = 30;

            if(defined('PEEPSO_DELETE_NOTIFICATIONS_AFTER_DAYS')) {
                $days = intval(PEEPSO_DELETE_NOTIFICATIONS_AFTER_DAYS);
            }

            if($days == 0) { return 0; }

            // look for items more than 20 days old
            $dt = date('Y-m-d', strtotime($days.' days ago'));

            // TODO: use PeepSoNotifications class constant for table name
            $sql = "DELETE FROM `{$wpdb->prefix}peepso_notifications` " .
                " WHERE CAST(`not_timestamp` AS DATE) < %s ";
            return $wpdb->query($wpdb->prepare($sql, $dt));
        }

        // TODO: delete any mail queue items that are `status`=PeepSoMailQueue::STATUS_SENT and more than 24 hours old
    }
}

// EOF

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists