Ticket #18684: newmediaobject.diff
| File newmediaobject.diff, 836 bytes (added by , 14 years ago) |
|---|
-
wp-includes/class-wp-xmlrpc-server.php
3084 3084 logIO('O', '(MW) ' . $errorString); 3085 3085 return new IXR_Error(500, $errorString); 3086 3086 } 3087 3088 $post_excerpt = isset( $data['post_excerpt'] ) ? $data['post_excerpt'] : ''; 3089 $post_content = isset( $data['post_content'] ) ? $data['post_content'] : ''; 3090 3087 3091 // Construct the attachment array 3088 3092 // attach to post_id 0 3089 3093 $post_id = 0; 3090 3094 $attachment = array( 3091 3095 'post_title' => $name, 3092 'post_content' => '', 3096 'post_excerpt' => $post_excerpt, 3097 'post_content' => $post_content, 3093 3098 'post_type' => 'attachment', 3094 3099 'post_parent' => $post_id, 3095 3100 'post_mime_type' => $type,