Description

Filter cvm_video_post_status can be used to change the post status before creating the video post.
This filter is useful if, for example, you want videos to pass certain conditions when you import them and you want to set the posts that fail the conditions to have a different status, like pending review or draft.

Parameters

$status
(string)(required) The post status. Can be any WordPress post status (ie. draft, private …)

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

Set post status to pending if video duration is less than 30 seconds.

function change_post_status( $post_status, $video ){
    if( $video['duration'] < 30 ){
        $post_status= 'pending';
    }
    return $post_status;
}
add_filter( 'cvm_video_post_status', 'change_post_status', 10, 2 );

Related