Thread Starter
mzaz
(@mzaz)
I made a little quick fix for this myself. Reusing some of the code I created a new cron event that calls the function to delete all posts and then refesh them all. I have only tested this as a “once a day” event.
Add the following to inc\cron.php (I added at line 153)
function rssmi_schedule_prune_feeds() {
$feedperiodnumber = 24;
$feed_display_period = 'daily';
if ( ! wp_next_scheduled( 'wp_rss_multi_event_prunefeeds' ) ) {
wp_schedule_event( time(), $feed_display_period, 'wp_rss_multi_event_prunefeeds' );
}
add_action( 'wp_rss_multi_event_prunefeeds', 'wp_rss_prune_all_in_db' );
}
add_action( 'init', 'rssmi_schedule_prune_feeds' );
function wp_rss_prune_all_in_db(){
rssmi_delete_all_custom_posts();
rssmi_fetch_all_feed_items();
}
Also have a look at rssmi_schedule_import_feeds() in inc\cron.php to see how it probably should ahve been done 😉