XMLRPC wp_getPosts $filter argument should support more values
|Reported by:||wordpressplugindeveloper||Owned by:||chriscct7|
|Component:||XML-RPC||Keywords:||dev-feedback has-patch commit|
Although "see get_posts() for more on $filter values" is written in the doc, it actually supports
'post_type', 'post_status', 'number', 'offset', 'orderby', and 'order' only, and there is one hidden value 's' that didn't mention in the doc.
Currently, the $filter argument is handled by function wp_getPosts like this:
$query = array(); if ( isset( $filter['offset'] ) ) $query['offset'] = absint( $filter['offset'] ); .... wp_get_recent_posts( $query );
I think it'd be better if you can use get_posts() instead and simply pass $filter as its argument.
just my 2 cents though.
Change History (4)
11 months ago
- Keywords has-patch commit added; needs-patch removed
- Milestone changed from Awaiting Review to 4.4
- Owner set to chriscct7
- Status changed from new to assigned