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

WordPress Trac noreply at wordpress.org
Thu Nov 22 17:46:37 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 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 ^^

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


More information about the wp-trac mailing list