| 1 |
<?php |
| 2 |
/** |
| 3 |
* Defines functions that are called by WordPress' Cron. |
| 4 |
* |
| 5 |
* @package WP_To_Buffer |
| 6 |
* @author WP Zinc |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Define the WP Cron function to perform the log cleanup |
| 11 |
* |
| 12 |
* @since 3.9.8 |
| 13 |
*/ |
| 14 |
function wp_to_buffer_log_cleanup_cron() { |
| 15 |
|
| 16 |
// Initialise Plugin. |
| 17 |
$wp_to_buffer = WP_To_Buffer::get_instance(); |
| 18 |
$wp_to_buffer->initialize(); |
| 19 |
|
| 20 |
// Call CRON Log Cleanup function. |
| 21 |
$wp_to_buffer->get_class( 'cron' )->log_cleanup(); |
| 22 |
|
| 23 |
// Shutdown. |
| 24 |
unset( $wp_to_buffer ); |
| 25 |
|
| 26 |
} |
| 27 |
add_action( 'wp_to_buffer_log_cleanup_cron', 'wp_to_buffer_log_cleanup_cron' ); |
| 28 |
|