cbc override post video settings

Description

Filter whether the player settings of the plugin are used for a video post instead of the player settings saved in the post’s Video settings box. The default comes from the Same player for every video option (Settings, tab Embed options). Video shortcode attributes and Post Video block settings still apply. Available since Video Hub 2.3.4.

Parameters

$override
(bool)(required) Whether the settings of the post are ignored.
$post_id
(int)(required) Post ID of the video; 0 when the check isn’t made for a post.

Examples

Keep the settings of each post for the videos of the “Featured” category, while every other video uses the same player.

add_filter( 'cbc_override_post_video_settings', function( $override, $post_id ) {
    if ( $post_id && has_term( 'featured', 'videos', $post_id ) ) {
        return false;
    }
    return $override;
}, 10, 2 );

Start importing in minutes

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