WordPress.org

Make WordPress Core

Ticket #18684: newmediaobject.diff

File newmediaobject.diff, 836 bytes (added by skithund, 10 years ago)

Add possibility for setting post_excerpt and post_content

  • wp-includes/class-wp-xmlrpc-server.php

     
    30843084                        logIO('O', '(MW) ' . $errorString);
    30853085                        return new IXR_Error(500, $errorString);
    30863086                }
     3087
     3088                $post_excerpt = isset( $data['post_excerpt'] ) ? $data['post_excerpt'] : '';
     3089                $post_content = isset( $data['post_content'] ) ? $data['post_content'] : '';
     3090
    30873091                // Construct the attachment array
    30883092                // attach to post_id 0
    30893093                $post_id = 0;
    30903094                $attachment = array(
    30913095                        'post_title' => $name,
    3092                         'post_content' => '',
     3096                        'post_excerpt' => $post_excerpt,
     3097                        'post_content' => $post_content,
    30933098                        'post_type' => 'attachment',
    30943099                        'post_parent' => $post_id,
    30953100                        'post_mime_type' => $type,