| 1 |
<?php |
| 2 |
/** |
| 3 |
* Define the WP Cron function to perform the log cleanup |
| 4 |
* |
| 5 |
* @since 3.9.8 |
| 6 |
*/ |
| 7 |
function wp_to_buffer_log_cleanup_cron() { |
| 8 |
|
| 9 |
// Initialise Plugin |
| 10 |
$wp_to_buffer = WP_To_Buffer::get_instance(); |
| 11 |
$wp_to_buffer->initialize(); |
| 12 |
|
| 13 |
// Call CRON Log Cleanup function |
| 14 |
$wp_to_buffer->get_class( 'cron' )->log_cleanup(); |
| 15 |
|
| 16 |
// Shutdown |
| 17 |
unset( $wp_to_buffer ); |
| 18 |
|
| 19 |
} |
| 20 |
add_action( 'wp_to_buffer_log_cleanup_cron', 'wp_to_buffer_log_cleanup_cron' ); |