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

Chip Bennett chip at chipbennett.net
Wed Jan 5 20:58:14 UTC 2011


Sorry; I started testing way late in the cycle. :(

On a related note, something else for 3.2: expose Post Format in the
Quick-Edit form.

Chip

On Wed, Jan 5, 2011 at 2:40 PM, Mark Jaquith <markjaquith at gmail.com> wrote:

> On Tue, Jan 4, 2011 at 1:43 PM, Dougal Campbell <dougal at gunters.org>
> wrote:
> > But for reading post information, why not move the special casing into
> > get_post_format(), instead of duplicating it?
> >
> > get_post_format(), get_post_format_string(), get_post_class(),
> > wp_xmlrpc_server::mw_getPost(), and wp_xmlrpc_server::mw_getRecentPosts()
> > all have special case 'if' clauses, all immediately after calling
> > get_post_format(). (I only checked wp-includes, there might be more cases
> in
> > the wp-admin code).
> >
> > Seems it would make more sense to let get_post_format() return
> 'standard',
> > and eliminate a lot of checking in other parts of core. It would also
> help
> > future-proof against future code changes that might miss the exception.
>
> It's a reasonable suggestion, but it's too late in the cycle. People
> will be doing things like:
>
> if ( !get_post_format() ) {
>    // foo
> }
>
> And if that starts returning 'standard', they're going to break.
>
> What we can do, in 3.2, is to have another function for getting the
> string, which replaces all the logic checks you mentioned.
>
> --
> Mark Jaquith
>http://markjaquith.com/
>http://coveredwebservices.com/
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


More information about the wp-testers mailing list