Use post_type_supports() to check for whether a post type supports post formats. Only posts support it by default. props mikeschinkel. see #14746
git-svn-id: http://svn.automattic.com/wordpress/trunk@16196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -155,7 +155,7 @@ echo esc_html( $visibility_trans ); ?></span>
|
||||
</div><?php // /misc-pub-section ?>
|
||||
|
||||
<?php
|
||||
if ( 'post' == $post->post_type && current_theme_supports( 'post-formats' ) ) :
|
||||
if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) :
|
||||
$post_formats = get_theme_support( 'post-formats' );
|
||||
|
||||
$post_formats_display = get_post_format_strings();
|
||||
|
||||
Reference in New Issue
Block a user