Description

Filter cvm_video_post_excerpt allows the manipulation of the post excerpt of any newly imported Vimeo video before the WordPress post is created.

Parameters

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

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

Truncate the post excerpt to 50 words using WordPress function wp_trim_words().

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

Related