[wp-trac] [WordPress Trac] #19570: Post Formats: admin UI + fallbacks for themes that don't support them
WordPress Trac
noreply at wordpress.org
Tue Jan 8 04:00:54 UTC 2013
#19570: Post Formats: admin UI + fallbacks for themes that don't support them
-------------------------+------------------------------
Reporter: alexkingorg | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 3.3
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by matveb):
I'm excited that things are in motion! Posting this just as initial food
for thought.
Replying to [ticket:19570 alexkingorg]:
> Creating structured data to support post formats makes them more
powerful and allows themes to do more with them, but it also causes a
potential backward compatibility problem for users that change to a theme
that doesn't support post formats.
There's another way we could tackle this without the need of implementing
a fallback. And it's by always having all the data stored on {{{
the_content}}}, not in separate fields to begin with. We could use
something like the HTML inline comments that are currently used to
generate post page breaks, or the more tag, for structuring the data into
retrievable pieces.
Those are examples of structuring data without fragmenting the data.
(Which I think is worth considering/discussing for this.)
Example: for a '''Quote''' post we could have a {{{<!-- the quote -->}}}
comment before the quote data, then a {{{<!-- the quote author -->}}} one
before the author of said quote. If you were to output {{{the_content}}}
you will get all the data in a way that makes sense when reading, without
losing anything. But a theme aware of the post format structure can make
use of specific template tags (that look for those comments) to output the
chunks of data in the way it pleases, like {{{the_quote()}}} and
{{{the_quote_author()}}}.
On the UI side, when you create a post using the post formats UI you'd
never interact with {{{the_content}}} directly, just with specific input
fields for the structured data (quote, quote author). But, if you were to
change the format of that post back to a "standard" post, it would
transition seamlessly, still holding every bit of data you entered when it
was a quote-post.
tl:dr. The input of the information could appear to the user as structured
fields, but all the data could then be stored on the same place
({{{the_content}}}) with "marks" to structure it without fragmenting it.
Themers can then rely on specific template tags to craft their designs.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19570#comment:16>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list