| Server IP : 74.208.236.16 / Your IP : 216.73.216.220 Web Server : Apache System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux User : u102440577 ( 7172810) PHP Version : 8.4.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /homepages/44/d845879113/htdocs/app849812966/wp-content/plugins/statify/inc/ |
Upload File : |
<?php
/**
* Statify: Statify_Cron class
*
* This file contains the derived class for the plugin's cron features.
*
* @package Statify
* @since 1.4.0
*/
// Quit if accessed outside WP context.
defined( 'ABSPATH' ) || exit;
/**
* Statify_Cron
*
* @since 1.4.0
*/
class Statify_Cron extends Statify {
/**
* Cleanup obsolete DB values
*
* @since 0.3.0
* @version 1.4.0
*/
public static function cleanup_data() {
// Global.
global $wpdb;
// Remove items.
$wpdb->query(
$wpdb->prepare(
"DELETE FROM `$wpdb->statify` WHERE created <= SUBDATE(%s, %d)",
current_time( 'Y-m-d' ),
(int) self::$_options['days']
)
);
// Optimize DB.
$wpdb->query(
"OPTIMIZE TABLE `$wpdb->statify`"
);
}
}