[wp-testers] post-format 'standard'?

Andrew Nacin wp at andrewnacin.com
Tue Jan 4 18:23:32 UTC 2011


On Tue, Jan 4, 2011 at 1:12 PM, Dougal Campbell <dougal at gunters.org> wrote:

> So, why doesn't get_post_format() return 'standard' for regular posts?
>
> It returns an empty string, and as a result, we have special-case handlers
> sprinkled throughout the rest of the code to handle converting the empty
> result to the string 'standard'. Is there a reason for this that I'm
> overlooking?
>
> (this is in response to Chip Bennett's query about it on Twitter and on my
> blog)


We don't store the standard post format in the database. Having a "standard"
format is no different from having no format. Thus has_post_format() returns
false, and get_post_format() returns empty -- it's by design.

Nacin


More information about the wp-testers mailing list