Plugin Directory

Changeset 633255


Ignore:
Timestamp:
12/03/2012 01:03:37 AM (13 years ago)
Author:
maxcutler
Message:

Version 0.9 release.

Location:
xml-rpc-modernization/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • xml-rpc-modernization/trunk/class-wp-xmlrpc-server-ext.php

    r548544 r633255  
    1010        // hook filter to add the new methods after the existing ones are added in the parent constructor
    1111        add_filter( 'xmlrpc_methods' , array( &$this, 'wxm_xmlrpc_methods' ) );
    12 
    13         // patch wp.uploadFile to return ID
    14         add_filter( 'wp_handle_upload', array( &$this, 'wxm_handle_upload' ) );
    1512
    1613        // add new options
     
    2926        $new_methods['wp.getUser']          = array( &$this, 'wp_getUser' );
    3027        $new_methods['wp.getUsers']         = array( &$this, 'wp_getUsers' );
    31         $new_methods['wp.getUserInfo']      = array( &$this, 'wp_getUserInfo' );
     28        $new_methods['wp.getProfile']       = array( &$this, 'wp_getProfile' );
     29        $new_methods['wp.editProfile']      = array( &$this, 'wp_editProfile' );
    3230
    3331        // custom post type management
     
    3937        $new_methods['wp.getPostType']      = array( &$this, 'wp_getPostType' );
    4038        $new_methods['wp.getPostTypes']     = array( &$this, 'wp_getPostTypes' );
     39        $new_methods['wp.getRevisions']     = array( &$this, 'wp_getRevisions' );
     40        $new_methods['wp.restoreRevision']  = array( &$this, 'wp_restoreRevision' );
    4141
    4242        // custom taxonomy management
     
    5757            $methods['wp.getMediaLibrary'] = array( &$this, 'wxm_wp_getMediaLibrary' );
    5858        }
     59        if ( $version < 3.5 ) {
     60            // for pre-3.5, explicitly override the core implementation of uploads and posts
     61            $methods['wp.uploadFile'] = array( &$this, 'wxm_wp_uploadFile' );
     62            $methods['metaWeblog.newMediaObject'] = array( &$this, 'wxm_wp_uploadFile' );
     63
     64            $methods['wp.newPost'] = array( &$this, 'wxm_wp_newPost' );
     65            $methods['wp.editPost'] = array( &$this, 'wxm_wp_editPost' );
     66            $methods['wp.getPosts'] = array( &$this, 'wxm_wp_getPosts' );
     67            $methods['wp.getPost'] = array( &$this, 'wxm_wp_getPost' );
     68        }
    5969
    6070        // array_merge will take the values defined in later arguments, so
     
    103113     */
    104114    protected function wxm_prepare_user( $user, $fields ) {
    105         $contact_methods = _wp_get_user_contactmethods();
    106 
    107         $user_contacts = array();
    108         foreach ( $contact_methods as $key => $value ) {
    109             $user_contacts[$key] = $user->$key;
    110         }
    111 
    112         $_user = array( 'user_id' => $user->ID );
     115        $_user = array( 'user_id' => strval( $user->ID ) );
    113116
    114117        $user_fields = array(
     
    123126            'url'               => $user->user_url,
    124127            'display_name'      => $user->display_name,
    125             'capabilities'      => $user->wp_capabilities,
    126             'user_level'        => $user->wp_user_level,
    127             'user_contacts'     => $user_contacts
     128            'roles'             => $user->roles,
    128129        );
    129130
    130131        if ( in_array( 'all', $fields ) ) {
    131132            $_user = array_merge( $_user, $user_fields );
    132         }
    133         else {
     133        } else {
    134134            if ( in_array( 'basic', $fields ) ) {
    135135                $basic_fields = array( 'username', 'email', 'registered', 'display_name', 'nicename' );
     
    200200            'post_excerpt'      => $post['post_excerpt'],
    201201            'post_content'      => $post['post_content'],
     202            'post_parent'       => strval( $post['post_parent'] ),
     203            'post_mime_type'    => $post['post_mime_type'],
    202204            'link'              => post_permalink( $post['ID'] ),
     205            'guid'              => $post['guid'],
     206            'menu_order'        => intval( $post['menu_order'] ),
    203207            'comment_status'    => $post['comment_status'],
    204208            'ping_status'       => $post['ping_status'],
     
    719723     *  - 'url'
    720724     *  - 'display_name'
    721      *  - 'capabilities'
    722      *  - 'user_level'
    723      *  - 'user_contacts'
     725     *  - 'roles'
    724726     */
    725727    function wxm_wp_getUser( $args ) {
     
    744746        do_action( 'xmlrpc_call', 'wp.getUser' );
    745747
     748        if ( ! current_user_can( 'edit_user', $user_id ) )
     749            return new IXR_Error( 401, __( 'Sorry, you cannot edit users.' ) );
     750
    746751        $user_data = get_userdata( $user_id );
    747752
     
    749754            return new IXR_Error( 404, __( 'Invalid user ID' ) );
    750755
    751         if ( ! ( $user_id == $user->ID || current_user_can( 'edit_users' ) ) )
    752             return new IXR_Error( 401, __( 'Sorry, you cannot edit users.' ) );
    753 
    754         $user = $this->_prepare_user( $user_data, $fields );
    755 
    756         return $user;
     756        return $this->_prepare_user( $user_data, $fields );
    757757    }
    758758
     
    761761     *
    762762     * The optional $filter parameter modifies the query used to retrieve users.
    763      * Accepted keys are 'number' (default: 50), 'offset' (default: 0), and 'role'.
     763     * Accepted keys are 'number' (default: 50), 'offset' (default: 0), 'role',
     764     * 'who', 'orderby', and 'order'.
    764765     *
    765766     * The optional $fields parameter specifies what fields will be included
     
    791792            $fields = $args[4];
    792793        else
    793             $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'basic' ), 'wp.getUsers' );
     794            $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUsers' );
    794795
    795796        if ( ! $user = $this->login( $username, $password ) )
     
    798799        do_action( 'xmlrpc_call', 'wp.getUsers' );
    799800
    800         if ( ! current_user_can( 'edit_users' ) )
    801             return new IXR_Error( 401, __( 'Sorry, you cannot edit users.' ) );
    802 
    803         $query = array();
    804 
    805         // only retrieve IDs since wp_getUser will ignore anything else
    806         $query['fields'] = array( 'ID' );
     801        if ( ! current_user_can( 'list_users' ) )
     802            return new IXR_Error( 401, __( 'Sorry, you cannot list users.' ) );
     803
     804        $query = array( 'fields' => 'all_with_meta' );
    807805
    808806        $query['number'] = ( isset( $filter['number'] ) ) ? absint( $filter['number'] ) : 50;
    809807        $query['offset'] = ( isset( $filter['offset'] ) ) ? absint( $filter['offset'] ) : 0;
     808
     809        if ( isset( $filter['orderby'] ) ) {
     810            $query['orderby'] = $filter['orderby'];
     811
     812            if ( isset( $filter['order'] ) )
     813                $query['order'] = $filter['order'];
     814        }
    810815
    811816        if ( isset( $filter['role'] ) ) {
     
    816821        }
    817822
     823        if ( isset( $filter['who'] ) ) {
     824            $query['who'] = $filter['who'];
     825        }
     826
    818827        $users = get_users( $query );
    819828
    820829        $_users = array();
    821830        foreach ( $users as $user_data ) {
    822             $_users[] = $this->_prepare_user( get_userdata( $user_data->ID ), $fields );
    823         }
    824 
     831            if ( current_user_can( 'edit_user', $user_data->ID ) )
     832                $_users[] = $this->_prepare_user( $user_data, $fields );
     833        }
    825834        return $_users;
    826835    }
     
    837846     * @return array (@see wp_getUser)
    838847     */
    839     function wxm_wp_getUserInfo( $args ) {
     848    function wxm_wp_getProfile( $args ) {
    840849        if ( ! $this->minimum_args( $args, 3 ) )
    841850            return $this->error;
     
    850859            $fields = $args[3];
    851860        else
    852             $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUserInfo' );
     861            $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getProfile' );
    853862
    854863        if ( ! $user = $this->login( $username, $password ) )
    855864            return $this->error;
    856865
    857         do_action( 'xmlrpc_call', 'wp.getUserInfo' );
     866        do_action( 'xmlrpc_call', 'wp.getProfile' );
     867
     868        if ( ! current_user_can( 'edit_user', $user->ID ) )
     869            return new IXR_Error( 401, __( 'Sorry, you cannot edit your profile.' ) );
    858870
    859871        $user_data = get_userdata( $user->ID );
    860         $user = $this->_prepare_user( $user_data, $fields );
    861 
    862         return $user;
     872
     873        return $this->_prepare_user( $user_data, $fields );
     874    }
     875
     876    /**
     877     * Edit user's profile.
     878     *
     879     * @uses wp_update_user()
     880     * @param array $args Method parameters. Contains:
     881     *  - int     $blog_id
     882     *  - string  $username
     883     *  - string  $password
     884     *  - array   $content_struct
     885     *      It can optionally contain:
     886     *      - 'first_name'
     887     *      - 'last_name'
     888     *      - 'website'
     889     *      - 'display_name'
     890     *      - 'nickname'
     891     *      - 'nicename'
     892     *      - 'bio'
     893     * @return bool True, on success.
     894     */
     895    function wxm_wp_editProfile( $args ) {
     896        if ( ! $this->minimum_args( $args, 4 ) )
     897            return $this->error;
     898
     899        $this->escape( $args );
     900
     901        $blog_id        = (int) $args[0];
     902        $username       = $args[1];
     903        $password       = $args[2];
     904        $content_struct = $args[3];
     905
     906        if ( ! $user = $this->login( $username, $password ) )
     907            return $this->error;
     908
     909        do_action( 'xmlrpc_call', 'wp.editProfile' );
     910
     911        if ( ! current_user_can( 'edit_user', $user->ID ) )
     912            return new IXR_Error( 401, __( 'Sorry, you cannot edit your profile.' ) );
     913
     914        // holds data of the user
     915        $user_data = array();
     916        $user_data['ID'] = $user->ID;
     917
     918        // only set the user details if it was given
     919        if ( isset( $content_struct['first_name'] ) )
     920            $user_data['first_name'] = $content_struct['first_name'];
     921
     922        if ( isset( $content_struct['last_name'] ) )
     923            $user_data['last_name'] = $content_struct['last_name'];
     924
     925        if ( isset( $content_struct['url'] ) )
     926            $user_data['user_url'] = $content_struct['url'];
     927
     928        if ( isset( $content_struct['display_name'] ) )
     929            $user_data['display_name'] = $content_struct['display_name'];
     930
     931        if ( isset( $content_struct['nickname'] ) )
     932            $user_data['nickname'] = $content_struct['nickname'];
     933
     934        if ( isset( $content_struct['nicename'] ) )
     935            $user_data['user_nicename'] = $content_struct['nicename'];
     936
     937        if ( isset( $content_struct['bio'] ) )
     938            $user_data['description'] = $content_struct['bio'];
     939
     940        $result = wp_update_user( $user_data );
     941
     942        if ( is_wp_error( $result ) )
     943            return new IXR_Error( 500, $result->get_error_message() );
     944
     945        if ( ! $result )
     946            return new IXR_Error( 500, __( 'Sorry, the user cannot be updated.' ) );
     947
     948        return true;
    863949    }
    864950
     
    877963     *      - post_title
    878964     *      - post_author
    879      *      - post_exerpt
     965     *      - post_excerpt
    880966     *      - post_content
    881967     *      - post_date_gmt | post_date
     
    911997        unset( $content_struct['ID'] );
    912998
    913         return $this->_insert_post( $user, $content_struct );
     999        return $this->wxm_insert_post( $user, $content_struct );
    9141000    }
    9151001
     
    9621048                break;
    9631049            default:
    964                 $post_data['post_status'] = 'draft';
     1050                if ( ! get_post_status_object( $post_data['post_status'] ) )
     1051                    $post_data['post_status'] = 'draft';
    9651052                break;
    9661053        }
     
    10271114            if ( ! $post_data['post_thumbnail'] )
    10281115                delete_post_thumbnail( $post_ID );
    1029             elseif ( ! set_post_thumbnail( $post_ID, $post_data['post_thumbnail'] ) )
     1116            elseif ( ! get_post( absint( $post_data['post_thumbnail'] ) ) )
    10301117                return new IXR_Error( 404, __( 'Invalid attachment ID.' ) );
     1118            set_post_thumbnail( $post_ID, $post_data['post_thumbnail'] );
    10311119            unset( $content_struct['post_thumbnail'] );
    10321120        }
     
    11391227        $post_data = apply_filters( 'xmlrpc_wp_insert_post_data', $post_data, $content_struct );
    11401228
    1141         $post_ID = wp_insert_post( $post_data, true );
     1229        $post_ID = $update ? wp_update_post( $post_data, true ) : wp_insert_post( $post_data, true );
    11421230        if ( is_wp_error( $post_ID ) )
    11431231            return new IXR_Error( 500, $post_ID->get_error_message() );
     
    11861274            return new IXR_Error( 404, __( 'Invalid post ID.' ) );
    11871275
     1276        if ( isset( $content_struct['if_not_modified_since'] ) ) {
     1277            // If the post has been modified since the date provided, return an error.
     1278            if ( mysql2date( 'U', $post['post_modified_gmt'] ) > $content_struct['if_not_modified_since']->getTimestamp() ) {
     1279                return new IXR_Error( 409, __( 'There is a revision of this post that is more recent.' ) );
     1280            }
     1281        }
     1282
    11881283        // convert the date field back to IXR form
    11891284        $post['post_date'] = $this->_convert_date( $post['post_date'] );
     
    11991294        $merged_content_struct = array_merge( $post, $content_struct );
    12001295
    1201         $retval = $this->_insert_post( $user, $merged_content_struct );
     1296        $retval = $this->wxm_insert_post( $user, $merged_content_struct );
    12021297        if ( $retval instanceof IXR_Error )
    12031298            return $retval;
     
    13211416            return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
    13221417
    1323         return $this->_prepare_post( $post, $fields );
     1418        return $this->wxm_prepare_post( $post, $fields );
    13241419    }
    13251420
     
    13291424     * The optional $filter parameter modifies the query used to retrieve posts.
    13301425     * Accepted keys are 'post_type', 'post_status', 'number', 'offset',
    1331      * 'orderby', and 'order'.
     1426     * 'orderby', 'order', and 's'.
    13321427     *
    13331428     * The optional $fields parameter specifies what fields will be included
     
    13961491        }
    13971492
     1493        if ( isset( $filter['s'] ) ) {
     1494            $query['s'] = $filter['s'];
     1495        }
     1496
    13981497        $posts_list = wp_get_recent_posts( $query );
    13991498
     
    14091508                continue;
    14101509
    1411             $struct[] = $this->_prepare_post( $post, $fields );
     1510            $struct[] = $this->wxm_prepare_post( $post, $fields );
    14121511        }
    14131512
     
    19762075    }
    19772076
    1978     function wxm_handle_upload( $struct ) {
    1979         // prior to WP3.4, 'id' was not included in the struct returned by metaWeblog.newMediaObject/wp.uploadFile.
    1980         // to add it, we need to find the most recent attachment with post_title equal to the filename.
    1981         if ( ! in_array( 'id', $struct ) ) {
    1982             global $wpdb;
    1983             $id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title='%s' AND post_type='attachment' ORDER BY post_date DESC", $struct['file'] ) );
    1984             if ( $id !== null ) {
    1985                 $struct['id'] = $id;
    1986             }
    1987         }
     2077    /**
     2078     * Retrieve revisions for a specific post.
     2079     *
     2080     * The optional $fields parameter specifies what fields will be included
     2081     * in the response array.
     2082     *
     2083     * @uses wp_get_post_revisions()
     2084     * @see wp_getPost() for more on $fields
     2085     *
     2086     * @param array $args Method parameters. Contains:
     2087     *  - int     $blog_id
     2088     *  - string  $username
     2089     *  - string  $password
     2090     *  - int     $post_id
     2091     *  - array   $fields
     2092     * @return array contains a collection of posts.
     2093     */
     2094    function wxm_wp_getRevisions( $args ) {
     2095        if ( ! $this->minimum_args( $args, 4 ) )
     2096            return $this->error;
     2097
     2098        $this->escape( $args );
     2099
     2100        $blog_id    = (int) $args[0];
     2101        $username   = $args[1];
     2102        $password   = $args[2];
     2103        $post_id    = (int) $args[3];
     2104
     2105        if ( isset( $args[4] ) )
     2106            $fields = $args[4];
     2107        else
     2108            $fields = apply_filters( 'xmlrpc_default_revision_fields', array( 'post_date', 'post_date_gmt' ), 'wp.getRevisions' );
     2109
     2110        if ( ! $user = $this->login( $username, $password ) )
     2111            return $this->error;
     2112
     2113        do_action( 'xmlrpc_call', 'wp.getRevisions' );
     2114
     2115        if ( ! $post = get_post( $post_id ) )
     2116            return new IXR_Error( 404, __( 'Invalid post ID' ) );
     2117
     2118        if ( ! current_user_can( 'edit_post', $post_id ) )
     2119            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit posts.' ) );
     2120
     2121        // Check if revisions are enabled.
     2122        if ( ! WP_POST_REVISIONS || ! post_type_supports( $post->post_type, 'revisions' ) )
     2123            return new IXR_Error( 401, __( 'Sorry, revisions are disabled.' ) );
     2124
     2125        $revisions = wp_get_post_revisions( $post_id );
     2126
     2127        if ( ! $revisions )
     2128            return array();
     2129
     2130        $struct = array();
     2131
     2132        foreach ( $revisions as $revision ) {
     2133            if ( ! current_user_can( 'read_post', $revision->ID ) )
     2134                continue;
     2135
     2136            // Skip autosaves
     2137            if ( wp_is_post_autosave( $revision ) )
     2138                continue;
     2139
     2140            $struct[] = $this->wxm_prepare_post( get_object_vars( $revision ), $fields );
     2141        }
     2142
    19882143        return $struct;
     2144    }
     2145
     2146    /**
     2147     * Restore a post revision
     2148     *
     2149     * @uses wp_restore_post_revision()
     2150     *
     2151     * @param array $args Method parameters. Contains:
     2152     *  - int     $blog_id
     2153     *  - string  $username
     2154     *  - string  $password
     2155     *  - int     $post_id
     2156     * @return bool false if there was an error restoring, true if success.
     2157     */
     2158    function wxm_wp_restoreRevision( $args ) {
     2159        if ( ! $this->minimum_args( $args, 3 ) )
     2160            return $this->error;
     2161
     2162        $this->escape( $args );
     2163
     2164        $blog_id     = (int) $args[0];
     2165        $username    = $args[1];
     2166        $password    = $args[2];
     2167        $revision_id = (int) $args[3];
     2168
     2169        if ( ! $user = $this->login( $username, $password ) )
     2170            return $this->error;
     2171
     2172        do_action( 'xmlrpc_call', 'wp.restoreRevision' );
     2173
     2174        if ( ! $revision = wp_get_post_revision( $revision_id ) )
     2175            return new IXR_Error( 404, __( 'Invalid post ID' ) );
     2176
     2177        if ( wp_is_post_autosave( $revision ) )
     2178            return new IXR_Error( 404, __( 'Invalid post ID' ) );
     2179
     2180        if ( ! $post = get_post( $revision->post_parent ) )
     2181            return new IXR_Error( 404, __( 'Invalid post ID' ) );
     2182
     2183        if ( ! current_user_can( 'edit_post', $revision->post_parent ) )
     2184            return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     2185
     2186        // Check if revisions are disabled.
     2187        if ( ! WP_POST_REVISIONS || ! post_type_supports( $post->post_type, 'revisions' ) )
     2188            return new IXR_Error( 401, __( 'Sorry, revisions are disabled.' ) );
     2189
     2190        $post = wp_restore_post_revision( $revision_id );
     2191
     2192        return (bool) $post;
     2193    }
     2194
     2195    /**
     2196     * Uploads a file, following your settings.
     2197     *
     2198     * @param array $args Method parameters.
     2199     * @return array
     2200     */
     2201    function wxm_wp_uploadFile($args) {
     2202        global $wpdb;
     2203
     2204        $blog_ID     = (int) $args[0];
     2205        $username  = $wpdb->escape($args[1]);
     2206        $password   = $wpdb->escape($args[2]);
     2207        $data        = $args[3];
     2208
     2209        $name = sanitize_file_name( $data['name'] );
     2210        $type = $data['type'];
     2211        $bits = $data['bits'];
     2212
     2213        if ( !$user = $this->login($username, $password) )
     2214            return $this->error;
     2215
     2216        do_action('xmlrpc_call', 'metaWeblog.newMediaObject');
     2217
     2218        if ( !current_user_can('upload_files') ) {
     2219            $this->error = new IXR_Error( 401, __( 'You do not have permission to upload files.' ) );
     2220            return $this->error;
     2221        }
     2222
     2223        if ( $upload_err = apply_filters( 'pre_upload_error', false ) )
     2224            return new IXR_Error(500, $upload_err);
     2225
     2226        if ( !empty($data['overwrite']) && ($data['overwrite'] == true) ) {
     2227            // Get postmeta info on the object.
     2228            $old_file = $wpdb->get_row("
     2229                SELECT ID
     2230                FROM {$wpdb->posts}
     2231                WHERE post_title = '{$name}'
     2232                    AND post_type = 'attachment'
     2233            ");
     2234
     2235            // Delete previous file.
     2236            wp_delete_attachment($old_file->ID);
     2237
     2238            // Make sure the new name is different by pre-pending the
     2239            // previous post id.
     2240            $filename = preg_replace('/^wpid\d+-/', '', $name);
     2241            $name = "wpid{$old_file->ID}-{$filename}";
     2242        }
     2243
     2244        $upload = wp_upload_bits($name, null, $bits);
     2245        if ( ! empty($upload['error']) ) {
     2246            $errorString = sprintf(__('Could not write file %1$s (%2$s)'), $name, $upload['error']);
     2247            return new IXR_Error(500, $errorString);
     2248        }
     2249        // Construct the attachment array
     2250        $post_id = 0;
     2251        if ( ! empty( $data['post_id'] ) ) {
     2252            $post_id = (int) $data['post_id'];
     2253
     2254            if ( ! current_user_can( 'edit_post', $post_id ) )
     2255                return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) );
     2256        }
     2257        $attachment = array(
     2258            'post_title' => $name,
     2259            'post_content' => '',
     2260            'post_type' => 'attachment',
     2261            'post_parent' => $post_id,
     2262            'post_mime_type' => $type,
     2263            'guid' => $upload[ 'url' ]
     2264        );
     2265
     2266        // Save the data
     2267        $id = wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id );
     2268        wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) );
     2269
     2270        do_action( 'xmlrpc_call_success_mw_newMediaObject', $id, $args );
     2271
     2272        $struct = array(
     2273            'id'   => strval( $id ),
     2274            'file' => $name,
     2275            'url'  => $upload[ 'url' ],
     2276            'type' => $type
     2277        );
     2278        return apply_filters( 'wp_handle_upload', $struct, 'upload' );
    19892279    }
    19902280
     
    19922282        $wp34_options = array(
    19932283            // Read only options
     2284            'home_url'          => array(
     2285                 'desc'         => __( 'Home URL' ),
     2286                'readonly'      => true,
     2287                'option'        => 'home'
     2288            ),
    19942289            'image_default_link_type' => array(
    19952290                'desc'          => __( 'Image default link type' ),
  • xml-rpc-modernization/trunk/readme.txt

    r548544 r633255  
    33Tags: xmlrpc, xml-rpc, api
    44Requires at least: 3.3
    5 Tested up to: 3.4
     5Tested up to: 3.5
    66Stable tag: trunk
    77License: GPLv2 or later
     
    2626* wp.editUser - edit user information
    2727* wp.deleteUser - delete a specfic user
     28
     293.5 Methods for pre-3.5 sites:
     30
    2831* wp.getUser - get information about a specific user
    2932* wp.getUsers - retrieve a list of users
    30 * wp.getUserInfo - get information about the requesting user
     33* wp.getProfile - retrieve information about the requesting user
     34* wp.editProfile - edit the profile of the requesting user
     35* wp.getRevisions - retrieve revisions for a specific post
     36* wp.restoreRevision - restore a post revision
    3137
    32383.4 Methods for pre-3.4 sites:
     
    4854
    4955== Changelog ==
     56
     57= 0.9 =
     58* Alignment with WordPress core version of wp.getUser and wp.getUsers.
     59* Renamed wp.getUserInfo to wp.getProfile to match 3.5 core.
     60* Added wp.editProfile to match WordPress core.
     61* Added wp.getRevisions and wp.restoreRevision methods to match 3.5 core.
     62* Added 'post_id" parameter to wp.uploadFile.
     63* Added 's' parameter to wp.getPosts.
     64* Added 'if_not_modified_since' parameter to wp.editPost.
     65* Added 'post_parent', 'guid', 'post_mime_type' and 'menu_order' to _prepare_post.
     66* Fixed several small bugs in wp.editPost.
    5067
    5168= 0.8.2 =
  • xml-rpc-modernization/trunk/wp-xmlrpc-modernization.php

    r548544 r633255  
    44 * Plugin Name: wp-xmlrpc-modernization
    55 * Description: This plugin extends the basic XML-RPC API exposed by WordPress. Derived from GSoC '11 project.
    6  * Version: 0.8.2
     6 * Version: 0.9
    77 * Author: Max Cutler
    88 * Author URI: http://www.maxcutler.com
Note: See TracChangeset for help on using the changeset viewer.