[wp-trac] [WordPress Trac] #22540: Drilling categories for relevant posts via XML-RPC

WordPress Trac noreply at wordpress.org
Thu Nov 22 17:51:15 UTC 2012


#22540: Drilling categories for relevant posts via XML-RPC
-------------------------+------------------------------
 Reporter:  nidhi.patel  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  XML-RPC      |     Version:  3.4.2
 Severity:  major        |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by nidhi.patel):

 Replying to [comment:6 markoheijnen]:
 > Point 1: Yes it works but only for 1 taxonomy and not for custom ones.
 It should be a total solution.
 >
 > Point 2:
 > This code makes it bulletproof for if the site is used by the mobile.
 > You do now need to send fifth parameter as: array( 'post', 'terms',
 'custom_fields', 'autop' )
 >
 >
 > {{{
 > add_filter( 'xmlrpc_prepare_post', 'xmlrpc_prepare_post_autop' );
 >
 > function xmlrpc_prepare_post_autop( $_post, $post, $fields ) {
 >       if( in_array( 'autop', $fields ) )
 >               $post['post_content'] = wpautop( $_post['post_content'] );
 >
 >       return $_post;
 > }
 > }}}
 >
 > ps: didn't test it ^^


 Point#1 : Agreed , haven't provided for multiple category, as it only
 expects the integer, if a string "," separated than it could resolve it.

 I think eventually that should be the optimal solution, currently what I
 provided only drills for single id, it depends how custom category are
 stored, if they utilize the same field , can make that work, just how the
 access point is defined need more logic, which again depends on the usage.

 Point#2: This mean you suggesting to add with in the same xmlrpc file?

 Regards,
 Nidhi

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22540#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list