Handling private and protected posts when querying multiple post types
|Reported by:||tamlyn||Owned by:|
When querying multiple post types (e.g. new WP_Query(array('slug'=>$slug, 'post_type'=>'any') the automatic handling of protected and private posts fails because it looks for capabilities 'edit_any' and 'read_any' which don't exist.
The attached patch illustrates the problem with a suggested fix. However it's possible I have misunderstood how this is supposed to work.