tonykwon/wp-disable-posts — pull request #4 by forgetfuljames (2014-05-11 08:08:17+00:00)
Title: improve post type comparison logic

I ran into a problem while querying custom post types. Although my WP_Query object was showing that the only 'post_type' being passed was 'network', I was getting ALL of my registered 'post_type's returned. So, I started to poke around and found that every time there is a query, wp-disable-posts resets the query's 'post_type' to everything except 'post', "undoing the work" of the original query's 'post_type' parameter.

By using the original query's 'post_type' parameter, we avoid resetting the 'post_type' to all _queried_ 'post_type's except 'post'.