cbc video is short

Description

Filter whether a video is treated as a YouTube Short. By default a video is a Short when it is vertical or square and no longer than 3 minutes. The result is used by the Skip YouTube Shorts option of the automatic imports and by the Short labels and Hide YouTube Shorts option of the Import videos page. See YouTube Shorts and vertical videos. Available since Video Hub 2.3.2.

Parameters

$is_short
(bool)(required) Whether the video is considered a Short.
$video
(\WPYTHub\Video)(required) The video object.

Examples

Treat vertical videos up to 60 seconds as Shorts, the way YouTube did before October 2024.

add_filter( 'cbc_video_is_short', function( $is_short, $video ) {
    return $is_short && $video->get_duration() <= 60;
}, 10, 2 );

Start importing in minutes

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