Description

Filter cvm_video_post_content is triggered before a new video post is created from a Vimeo video. This allows manipulation of post content before creating the actual post.

Parameters

$post_content
(string)(required) The video description retrieved from Vimeo that will be put into the post content

Default:None
$video_details
(array)(optional) The details of the video (video ID, title, description, etc.) retrieved from Vimeo

Default:None
$import_as_theme_post
(boolean)(optional) If the WP theme is compatible with the plugin and the user has selected to import video as theme post, this variable will be set to (boolean)true.

Default:False

Examples

Do not allow descriptions longer than 50 words.

function truncate_video_post_content( $post_content ){
    $trimmed = wp_trim_words( $post_content, $num_words = 50, $more = null );
    return $trimmed;
}
add_filter( 'cvm_video_post_content', 'truncate_video_post_content' );

Related