Make WordPress Core

Changeset 4612 for trunk/xmlrpc.php


Ignore:
Timestamp:
12/05/2006 10:37:19 PM (18 years ago)
Author:
ryan
Message:

Attachment data abstraction from mdawaffe. fixes #3440

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r4569 r4612  
    872872        );
    873873        // Save the data
    874         $id = wp_insert_attachment($attachment, $upload[ 'file' ], $post_id);
    875         add_post_meta($id, '_wp_attachment_metadata', array());
     874        $id = wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id );
     875        wp_update_attachment_metadata( $id, array() );
    876876
    877877        return apply_filters( 'wp_handle_upload', array( 'file' => $upload[ 'file' ], 'url' => $upload[ 'url' ], 'type' => $type ) );
Note: See TracChangeset for help on using the changeset viewer.