[wp-hackers] get_theme_support( 'post-formats' )

Chip Bennett chip at chipbennett.net
Wed Jan 12 13:57:40 UTC 2011


One more Post Format-related question: what is the best way to get the array
of Post Format types supported by the current Theme?

I assume it would be *get_theme_support( 'post-formats'
)<http://core.trac.wordpress.org/browser/trunk/wp-includes/theme.php#L1769>
* - or, at least, that would be the starting point?

If I'm reading source correctly, that should return the argument array
passed into add_theme_support( 'post-formats' )?

If so, then something like:

$my_theme_supports = get_theme_support( 'post-formats' );


...should result in, e.g.

$my_theme_supports = array( 'aside', 'gallery' );


Or am I misreading that?

Chip


More information about the wp-hackers mailing list