[wp-trac] [WordPress Trac] #22540: Requirement : Drilling category relevant posts

WordPress Trac noreply at wordpress.org
Thu Nov 22 16:46:52 UTC 2012


#22540: Requirement : Drilling category relevant posts
-------------------------------------------------+-------------------------
 Reporter:  nidhi.patel                          |       Type:  enhancement
   Status:  new                                  |   Priority:  normal
Milestone:  Awaiting Review                      |  Component:  XML-RPC
  Version:  3.4.2                                |   Severity:  major
 Keywords:  has-patch 2nd-opinion dev-feedback   |
  needs-refresh needs-testing                    |
-------------------------------------------------+-------------------------
 Hello WordPress,

 Requirement for us was to drill down the category relevant posts, and I
 have implemented the solution using xmlrpc for the .net env using c#.

 The trouble is there is no available option to filter using category for
 the posts.

 So I have done following changes, please recommend if we can do any better
 to avoid the override of the change may be by upgrading the next version
 with it from WordPress version natively.

 Describing the basic nitty-gritty with in :

 After doing some cross referencing I was able to figure out adding
 following code shouldn't harm :

 1: With in LLN#1374 function wp_getPosts( $args )
 I added the filter option for category as follows on LN#1410

 if ( isset( $filter['category'] ) )
     $query['category'] = $filter['category'];

 I have done few tests and seems to be working fine, just its expects the
 categoryId to drill the category relevant posts for me.

 I wonder if you could integrate this from WordPress.

 2: Our second requirement was to get out of the box wpautop for the
 content, so we don't need to worry about adding <p><p/> tags.

 hence the another change of code I had integrated with in the file is as
 following :

 with in protected function _prepare_post( $post, $fields ) on LN#624 , I
 had added the wpautop call to surrounds to post_content as in follows :

 'post_content'      => wpautop($post['post_content']),


 Please guide or suggest how to avoid the override when upgrading the
 WordPress, one option is WordPress integrate these changes out of the box
 and until that we keep an eye and on ever upgrade keep doing the change.

 Please feel free to reach me with any possible suggestions.

 Regards,
 Nidhi

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


More information about the wp-trac mailing list