[wp-trac] [WordPress Trac] #25406: XMLRPC wp_getPosts $filter argument should support more values
WordPress Trac
noreply at wordpress.org
Tue Sep 24 09:08:03 UTC 2013
#25406: XMLRPC wp_getPosts $filter argument should support more values
--------------------------------------+-----------------------------
Reporter: wordpressplugindeveloper | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: XML-RPC | Version: trunk
Severity: normal | Keywords: needs-patch
--------------------------------------+-----------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25406>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list