WordPress.org

Make WordPress Core

Ticket #15098: 15098.patch

File 15098.patch, 691 bytes (added by maxcutler, 6 years ago)

Return ID with wp.uploadFile/metaWeblog.newMediaObject

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

     
    42994299
    43004300                do_action( 'xmlrpc_call_success_mw_newMediaObject', $id, $args );
    43014301
    4302                 return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ), 'upload' );
     4302                $struct = array(
     4303                        'id'   => strval( $id ),
     4304                        'file' => $name,
     4305                        'url'  => $upload[ 'url' ],
     4306                        'type' => $type
     4307                );
     4308                return apply_filters( 'wp_handle_upload', $struct, 'upload' );
    43034309        }
    43044310
    43054311        /* MovableType API functions