lordmazus
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
Forum: Plugins
In reply to: [Videopack] Thumbnail not automatically setting as featured imageThis is the code:
// upload video thumbnail if(isset($posted_data['video-thumbnail']) && $posted_data['video-thumbnail'] != ''){ $file_location = ''; if(!$contact_form_7){ $file_location = $posted_data['video-thumbnail']; } else { $file_name = $posted_data["video-thumbnail"]; $uploaded_files = $contact_form_7->uploaded_files(); $file_location = $uploaded_files["video-thumbnail"]; } $upload_dir = wp_upload_dir(); $image_data = file_get_contents($file_location); $filename = basename($file_location); if(wp_mkdir_p($upload_dir['path'])) $file = $upload_dir['path'] . '/' . $filename; else $file = $upload_dir['basedir'] . '/' . $filename; file_put_contents($file, $image_data); $wp_filetype = wp_check_filetype($filename, null ); $attachment = array( 'post_mime_type' => $wp_filetype['type'], 'post_title' => sanitize_file_name($filename), 'post_content' => '', 'post_status' => 'inherit' ); $attach_id = wp_insert_attachment( $attachment, $file, $new_ID ); require_once(ABSPATH . 'wp-admin/includes/image.php'); $attach_data = wp_generate_attachment_metadata( $attach_id, $file ); $res1 = wp_update_attachment_metadata( $attach_id, $attach_data ); $res2 = set_post_thumbnail( $new_ID, $attach_id ); }
Forum: Plugins
In reply to: [Videopack] Thumbnail not automatically setting as featured imageI run 4.6.14 of your plugin.
For frontend uploading I’m using cactus video plugin/contact form 7 form (videoPro theme).Forum: Plugins
In reply to: [Videopack] Thumbnail not automatically setting as featured imageHi Kyle, Thank you for the reply.
Plugin work correctly and I have FFMPEG. Thumbnail generate correctly and attach to post/video.I would like that Thumbnail attach to frontend submitted post/video
Forum: Plugins
In reply to: [Videopack] Thumbnail not automatically setting as featured imageHi,
My customers can upload videos from frontend. How I can set the featured image of post with generated thumbnail?Forum: Plugins
In reply to: [Get Use APIs - JSON Content Importer] Can't make it workHello, try this:
[jsoncontentimporter url="https://telessaude.ifes.edu.br/salus/api/v1/estatisticas/visao_geral/?format=json"] <ul><li>{id} <b>{total_requisicoes}</b> {total_especialistas}</li></ul> [/jsoncontentimporter]
Forum: Plugins
In reply to: [Get Use APIs - JSON Content Importer] ubermenu contentok, i solved this. Now i need to get specific ID from feed. Work with pro version only?
EDIT: And exclude or include specific ID.
Viewing 6 replies - 1 through 6 (of 6 total)