• I used to use your code addition below to find the thumbnail when saving a draft and it worked perfectly, but am unsure about how and where to implement it in the latest 2.1 version of the plugin since the code has change so much over the past couple of years.

    // Find video thumbnail when saving a post, but not on autosave
    
    add_action('new_to_publish', 'save_video_thumbnail', 10, 1);
    add_action('draft_to_publish', 'save_video_thumbnail', 10, 1);
    add_action('pending_to_publish', 'save_video_thumbnail', 10, 1);
    add_action('future_to_publish', 'save_video_thumbnail', 10, 1);

    and immediately after add this:

    // Save with draft
    
    add_action('save_post', 'save_draft_video_thumbnail', 10, 1);
    
    function save_draft_video_thumbnail($post_id) {
    	$postdata = get_postdata($post_id);
    	if ($postdata['post_status'] == 'draft') {
    		get_video_thumbnail( $post_id );
    	}
    }

    http://wordpress.org/plugins/video-thumbnails/

  • The topic ‘Find Thumbail when saving Draft’ is closed to new replies.