I am trying to pick up an in-depth understanding of how post-formats relate to posts ‘in the database’ – i.e. what meta information when compiled together constitutes a post format. And yes, I do mean a post format (NOT a post type).
All of the documentation I can find assumes a starting point where post_format is selected from the meta box on the ‘New Post’ page. I’m working with a plugin (wootumblog) which uses a custom ‘save_post’ function, so need to understand more about how this actually works.
I see several tables involved including *wp_terms* (where the post_format slug is referenced against term_id) and *wp_term_relationships* (where the term_id is referenced against the post_id or object_id as the column is named) but I’m unclear as to whether wp_postmeta needs to be updated or are these two ‘terms’ tables sufficient for wordpress to work with?
I basically have a problem integrating the wootumblog and wpmu sitewide tags plugins together, and suspect this may be caused by the different protocols they use to save a post.
This seems a pretty barren area for documentation, so if someone speaks the post format lingo, it would be really useful to outline how it all works at a ‘data’ level.
Post format for the post is
term
of nativepost_format
taxonomy.It can be set for the post by
set_post_format()
function. As with any taxonomy you can also use some deeper level function, but really there is no need. And I definitely don’t recommend to try and deal with terms and taxonomies directly in database (sanity at risk).Core seems to be setting it in
edit_theme()
function.