Drilling categories for relevant posts via XML-RPC
|Reported by:||nidhi.patel||Owned by:|
Description (last modified by scribu)
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 :
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.
Change History (16)
- Description modified (diff)
- Keywords 2nd-opinion needs-refresh removed
- Summary changed from Requirement : Drilling category relevant posts to Drilling categories for relevant posts via XML-RPC
17 months ago
- Keywords needs-patch added
- Severity changed from major to normal
- Version changed from 3.4.2 to 3.4