category__in now shows posts from children categories too
|Reported by:||linuxologos||Owned by:|
Until 3.0.4 category_in parameter of query_posts() does not show posts from any children of the categories given to it, as currently stated in the codex too. In 3.1-RC2 it does show posts from child-categories.
Let's say we have a category with some subcategories. Posts are assigned either to parent category or to children of the category (not both to parent and child). If we use
query_posts( array( 'category__in' => array($parent_category_id) ) )
in 3.0.4 only posts assigned to parent category are shown.
But in 3.1 posts from parent as well as subcategories are shown with the same code.
I'm not sure if it is a bug or just the way the parameter will work since 3.1, but people using this parameter that way will possibly see their sites working unexpectedly after upgrading to 3.1.