I am using a Tube plugin that is creating my posts and pulling in thumbnail images that it is using on the main page to link to the posts. While it is creating and displaying thumbnails these are NOT "Featured Images" however I was hoping that it would be possible to use these thumbs to create a "featured Image" seeing as they are already there and the perfect size etc. Is there a way to drop
<?php set_post_thumbnail( $post, $thumbnail_id ); ?>
in there somehow or something like that?....
The thumbs are here (this is a network install) wp-content/uploads/sites/2/thumbs
Here is the function it is using. I was hoping that within this function it could also be set as the "Featured Image" for the particular post...
function my_thumb($prefix,$title){
$saved_thmb = get_post_meta( get_the_ID(),'saved_thmb',true);
$subPath = my_sub_dir_path(get_the_ID());
$upload_dir = wp_upload_dir();
$thumb_url = $upload_dir[baseurl]."/my-thumbs/".$subPath."/";
if($saved_thmb==1){
$thumb = $thumb_url."/".get_the_ID()."_1.jpg";
} elseif($saved_thmb>1) {
$def_thmb = get_post_meta( get_the_ID(),'def_thmb',true);
$thumb = $thumb_url."/".get_the_ID()."_".$def_thmb.".jpg";
}