Don't show the Post Format if the current theme doesn't support them. Fixes #15625.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2010-12-01 12:31:27 +00:00
parent 2d2dea8fa2
commit e8471af340

View File

@ -1604,7 +1604,7 @@ function _post_states($post) {
$post_states[] = _x('Pending', 'post state');
if ( is_sticky($post->ID) )
$post_states[] = __('Sticky');
if ( get_post_format( $post->ID ) )
if ( current_theme_supports('post-formats') && get_post_format( $post->ID ) )
$post_states[] = '<span>[</span>' . get_post_format_string( get_post_format( $post->ID ) ) . '<span>]</span>';
$post_states = apply_filters( 'display_post_states', $post_states );