Description
Filter an event before it is added to the activity log of an automatic import. Return false to leave the event out of the log. The totals displayed on the Activity page are updated anyway. Available since Video Hub 2.3.7. See Import estimate and activity log.
Parameters
- $entry
- (array|false)(required) The event, with the keys
time(timestamp),type(run,idle,new_uploads,error,completed,reset,paused,started,createdorupdated),user(the user ID,0for the events of the import queue) anddata(the event details). - $feed_id
- (int)(required) The post ID of the automatic import.
Examples
Don’t record the checks that found nothing to import.
add_filter( 'cbc_import_log_entry', function( $entry, $feed_id ) {
if ( is_array( $entry ) && 'idle' === $entry['type'] ) {
return false;
}
return $entry;
}, 10, 2 );