Make WordPress Core

Changeset 20305


Ignore:
Timestamp:
03/28/2012 12:00:50 PM (13 years ago)
Author:
westi
Message:

XMLRPC: Add the object ID to the return data of wp.uploadFile/metaWeblog.newMediaObject so that it can be used in other api calls e.g. setting featured image see #15098 props maxcutler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r20271 r20305  
    44604460        do_action( 'xmlrpc_call_success_mw_newMediaObject', $id, $args );
    44614461
    4462         return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ), 'upload' );
     4462        $struct = array(
     4463            'id'   => strval( $id ),
     4464            'file' => $name,
     4465            'url'  => $upload[ 'url' ],
     4466            'type' => $type
     4467        );
     4468        return apply_filters( 'wp_handle_upload', $struct, 'upload' );
    44634469    }
    44644470
Note: See TracChangeset for help on using the changeset viewer.