Find Jobs
Hire Freelancers

wordpress image a la une

€8-30 EUR

Cerrado
Publicado hace casi 10 años

€8-30 EUR

Pagado a la entrega
Bonjour, J'ai un bug sur une fonction d'attachement d'une image à la une sur wordpress téléchargée avec curl, le fichier ce télécharge bien dans la bibliothèque mais l'attachement ne fonctionne pas.. Voici le code : $post_id = wp_insert_post( $my_post ); // Fetured Image inspired by GPL code of Tsai I-Ta [login to view URL] $imageUrl = $value[5]; // Get image from url & check if is an available image // Get the file name $filename = substr($imageUrl, (strrpos($imageUrl, '/'))+1); if (!(($uploads = wp_upload_dir(current_time('mysql')) ) && false === $uploads['error'])) { echo "upload errors"; } // Generate unique file name $filename = wp_unique_filename( $uploads['path'], $filename ); // Move the file to the uploads dir $new_file = $uploads['path'] . "/$filename"; $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_URL, $imageUrl); $file_data = curl_exec($c); curl_close($c); if (!$file_data) { echo "missing image file data"; } file_put_contents($new_file, $file_data); // Set correct file permissions $stat = stat( dirname( $new_file )); $perms = $stat['mode'] & 0000666; @ chmod( $new_file, $perms ); $wp_filetype = wp_check_filetype( $filename, $mimes ); extract( $wp_filetype ); if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) { return null; } $url = $uploads['url'] . "/$filename"; $attachment = array( 'post_mime_type' => $type, 'guid' => $url, 'post_parent' => null, 'post_title' => $filename, 'post_content' => '', ); $thumb_id = wp_insert_attachment($attachment, $filename, $post_id); if ( !is_wp_error($thumb_id) ) { require_once(ABSPATH . '/wp-admin/includes/[login to view URL]'); // Added fix by misthero as suggested wp_update_attachment_metadata( $thumb_id, wp_generate_attachment_metadata( $thumb_id, $new_file ) ); update_attached_file( $thumb_id, $new_file ); } Seriez vous capable de trouver ce bug et sous quel tarif et delais? Merci
ID del proyecto: 6230688

Información sobre el proyecto

6 propuestas
Proyecto remoto
Activo hace 10 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
6 freelancers están ofertando un promedio de €29 EUR por este trabajo
Avatar del usuario
Ready to start "Right Now" Give me chance to prove my ability and also quality work i am waiting your positive replay from your side i am highly interested to work with you
€38 EUR en 1 día
4,9 (682 comentarios)
8,2
8,2
Avatar del usuario
hello i can do fix this issue with great perfection and timely manner as per your requirement. please discuss in message.
€14 EUR en 1 día
4,8 (139 comentarios)
7,4
7,4
Avatar del usuario
Hi, I am ready to start it. But i have some questions for you. So kindly leave message for me, then i'll discuss it in depth.
€29 EUR en 1 día
4,9 (186 comentarios)
6,8
6,8
Avatar del usuario
Dear Sir, Award the project to get the work start. I have total 4 years of experience in php/wordpress/html/css. I have gone through your little requirement. Please check my reviews and feedback for your reference. Thanks & Regards eGlobalSoft
€22 EUR en 1 día
4,8 (77 comentarios)
6,3
6,3
Avatar del usuario
A proposal has not yet been provided
€10 EUR en 5 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de FRANCE
ECHIROLLES, France
0,0
0
Miembro desde jul 18, 2014

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.