﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
16149,Allow querying for the standard post format,nacin,,"So, you currently can't query the standard post format through /type/standard/. It's not actually a term that gets stored in the database, which made this a fun puzzle to solve over the last few hours. (Props Mark as well.)

The attached patch:

 - Establishes a shell 'standard' term, to prevent us from faking too much more. This is enforced in set_post_format() to ensure it never goes far.

 - Reroutes the 'standard' post format request to a tax_query that does a NOT IN for every other format. It plays as nice as possible by appending to an existing tax_query and simply forcing AND.

 - Corrects the query flags and the queried object, ensuring proper template selection and such.

 - Performs other black magic.

This is required for 1:1 support for people who used categories. The only side effect here is, well, that it doesn't work. It's very well contained.

This additionally fixes a bug:

For taxonomies, post_type is set to 'any'. We only want post_type = 'post' for formats -- or more accurately, any post type that has chosen to support formats. Anyone doing this will need to both add_post_type_support and register_taxonomy_for_object_type, and the latter is easily fetchable with $tax->object_type. Thus, post_type is set to that.",enhancement,closed,normal,,Query,3.1,normal,maybelater,has-patch,alexkingorg@… mikeschinkel@… xoodrew@… travis@… mike@… carstenbach
