The feedwordpress_update_complete
hook is invoked when finished checking all of the feeds to be checked in the most recent update round.
Hooked in functions receive as an argument an array containing the number of new posts added and the number of posts updated during this most recent update round. This event can be used to display status information about the most recent update; it is also commonly used to execute additional code to process recently imported posts, or to clean up after an update process.
Sample
This example of usage is taken from the source code for the FWP+: SIC ‘Em (Syndicated Image Cacher) add-on module:
class SicEm {
/* ... */
public function __construct () {
/* ... */
add_filter('feedwordpress_update_complete', array($this, 'process_captured_images'), -1000, 1);
/* ... */
} /* SicEm::__construct() */
/* ... */
public function process_captured_images ($delta) {
global $post, $wpdb;
// Let's do this.
$q = new WP_Query(array(
'post_type' => 'any',
'meta_key' => '_syndicated_image_capture',
'posts_per_page' => 10,
));
while ($q->have_posts()) : $q->the_post();
/* ... processes each flagged post ... */
/* ... and then, if successful, removes the flag ... */
if ($zapit) :
delete_post_meta($post->ID, '_syndicated_image_capture');
endif;
endwhile;
} /* SicEm::process_captured_images () */
/* ... */
} /* class SicEm */