cbc yt error unpublish threshold

Description

Filter how many consecutive YouTube errors an automatic import can return before it is switched to draft and taken out of the import queue. Used only when Stop importing a playlist that keeps returning errors is checked (Settings, tab Import options). Default 5; the count starts over after a successful import. See Troubleshooting automatic imports. Available since Video Hub 2.0.

Parameters

$threshold
(int)(required) Number of consecutive errors.
$playlist_id
(int)(required) Post ID of the automatic import.

Examples

Stop an automatic import after 10 errors in a row.

add_filter( 'cbc_yt_error_unpublish_threshold', function( $threshold, $playlist_id ) {
    return 10;
}, 10, 2 );

Start importing in minutes

Bring your YouTube content into WordPress and let it update itself. Includes automatic updates and support.