Updaten van attachment description
-
Hallo,
Ik moet in frontend attachments kunnen wijzigen van title of description..
$postinfo = array( 'guid' => $uploadedfile, 'post_mime_type' => $filetype['type'], 'post_title' => $post->post_title . ' employee photograph', 'post_content' => $mycontent, 'post_status' => 'inherit', ); $filename = $attachment['file']; $attach_id = wp_insert_attachment( $postinfo, $filename, $postid ); // Make sure that this file is included, as wp_generate_attachment_metadata() depends on it. require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-admin/includes/image.php' ); $attach_data = wp_generate_attachment_metadata( $attach_id, $filename ); wp_update_attachment_metadata( $attach_id, $attach_data );
Echter, hij blijft nu nieuwe thumbnails aanmaken IPV de huidige up te daten???
2 reacties aan het bekijken - 1 tot 2 (van in totaal 2)
2 reacties aan het bekijken - 1 tot 2 (van in totaal 2)
- Het onderwerp ‘Updaten van attachment description’ is gesloten voor nieuwe reacties.