Changeset 547780
- Timestamp:
- 05/23/2012 04:27:18 AM (14 years ago)
- Location:
- xml-rpc-modernization/trunk
- Files:
-
- 3 edited
-
class-wp-xmlrpc-server-ext.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
wp-xmlrpc-modernization.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
xml-rpc-modernization/trunk/class-wp-xmlrpc-server-ext.php
r543520 r547780 1375 1375 1376 1376 if ( isset( $filter['number'] ) ) 1377 $query['number '] = absint( $filter['number'] );1377 $query['numberposts'] = absint( $filter['number'] ); 1378 1378 1379 1379 if ( isset( $filter['offset'] ) ) … … 1968 1968 1969 1969 function wxm_handle_upload( $struct ) { 1970 $attachment_id = url_to_postid( $struct['url'] ); 1971 $struct['id'] = $attachment_id; 1970 // prior to WP3.4, 'id' was not included in the struct returned by metaWeblog.newMediaObject/wp.uploadFile. 1971 // to add it, we need to find the most recent attachment with post_title equal to the filename. 1972 if ( ! in_array( 'id', $struct ) ) { 1973 global $wpdb; 1974 $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'] ) ); 1975 if ( $id !== null ) { 1976 $struct['id'] = $id; 1977 } 1978 } 1972 1979 return $struct; 1973 1980 } -
xml-rpc-modernization/trunk/readme.txt
r543520 r547780 49 49 == Changelog == 50 50 51 = 0.8.1 = 52 * Fixed broken 'number' filter parameter behavior for wp.getPosts. 53 * Fixed broken 'id' return value of wp.uploadFile and metaWeblog.newMediaObject. 54 51 55 = 0.8 = 52 56 * Alignment with WordPress core progress (RC1). -
xml-rpc-modernization/trunk/wp-xmlrpc-modernization.php
r543520 r547780 4 4 * Plugin Name: wp-xmlrpc-modernization 5 5 * Description: This plugin extends the basic XML-RPC API exposed by WordPress. Derived from GSoC '11 project. 6 * Version: 0.8 6 * Version: 0.8.1 7 7 * Author: Max Cutler 8 8 * Author URI: http://www.maxcutler.com
Note: See TracChangeset
for help on using the changeset viewer.