PluginProbe
Social Media Auto Poster – Schedule & Publish to Buffer / 6.2.5
Social Media Auto Poster – Schedule & Publish to Buffer v6.2.5
6.2.5 6.2.4 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 All 126 releases
← All changes | includes/cron.php +21 -0 3.8.56.2.5 View file →
@@ -24,4 +24,25 @@
24 24 unset( $wp_to_buffer );
25 25
26 26 }
27 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' );