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

git-svn-id: https://develop.svn.wordpress.org/trunk@16645 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2010-12-01 12:31:27 +00:00
parent d04665df0e
commit 80c79e5607

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 );