PluginProbe
Social Media Auto Poster – Schedule & Publish to Buffer / trunk
Social Media Auto Poster – Schedule & Publish to Buffer vtrunk
6.2.3 6.2.2 6.2.1 6.2.0 6.1.2 6.1.1 6.1.0 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 6.0.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 All 124 releases
wp-to-buffer / includes / cron.php

cron.php in Social Media Auto Poster – Schedule & Publish to Buffer trunk, at includes/cron.php

49 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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
29 /**
30 * Define the WP Cron function to perform the Media Library cleanup
31 * of Text to Image generations
32 *
33 * @since 4.1.0
34 */
35 function wp_to_buffer_media_cleanup_cron() {
36
37 // Initialise Plugin.
38 $wp_to_buffer = WP_To_Buffer::get_instance();
39 $wp_to_buffer->initialize();
40
41 // Call Media Cleanup function.
42 $wp_to_buffer->get_class( 'media_library' )->cleanup();
43
44 // Shutdown.
45 unset( $wp_to_buffer );
46
47 }
48 add_action( 'wp_to_buffer_media_cleanup_cron', 'wp_to_buffer_media_cleanup_cron' );
49