Make WordPress Core

Opened 5 years ago

Last modified 3 years ago

#22540 closed enhancement

Requirement : Drilling category relevant posts — at Initial Version

Reported by: nidhi.patel Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: XML-RPC Keywords: needs-patch
Focuses: Cc:


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( $filtercategory? ) )

$querycategory? = $filtercategory?;

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($postpost_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

Change History (1)

5 years ago

with updated patch to filter posts via category

Note: See TracTickets for help on using tickets.