Changeset 4526

Show
Ignore:
Timestamp:
11/24/06 16:39:51 (2 years ago)
Author:
ryan
Message:

Upload filters in xmlrpc. fixes #3388

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/xmlrpc.php

    r4495 r4526  
    834834        } 
    835835 
     836        if ( $upload_err = apply_filters( "pre_upload_error", false ) ) 
     837            return new IXR_Error(500, $upload_err); 
     838 
    836839        $upload = wp_upload_bits($name, $type, $bits); 
    837840        if ( ! empty($upload['error']) ) { 
     
    839842            return new IXR_Error(500, 'Could not write file '.$name); 
    840843        } 
    841  
    842         return array('url' => $upload['url']); 
     844        return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ) ); 
    843845    } 
    844846 
     
    12161218        $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_content', 'comment_type'); 
    12171219 
    1218         wp_new_comment($commentdata); 
    1219         do_action('pingback_post', $wpdb->insert_id); 
     1220        $comment_ID = wp_new_comment($commentdata); 
     1221        do_action('pingback_post', $comment_ID); 
    12201222 
    12211223        return "Pingback from $pagelinkedfrom to $pagelinkedto registered. Keep the web talking! :-)";