WordPress.org

Make WordPress Core

Ticket #14746: hide-format.diff

File hide-format.diff, 601 bytes (added by greenshady, 9 years ago)

Hides post format if theme doesn't support 'post-formats'

  • template.php

     
    16081608                $post_states[] = _x('Pending', 'post state');
    16091609        if ( is_sticky($post->ID) )
    16101610                $post_states[] = __('Sticky');
    1611         if ( get_post_format( $post->ID ) )
     1611        if ( get_post_format( $post->ID ) && current_theme_supports( 'post-formats' ) )
    16121612                $post_states[] = '<span>[</span>' . get_post_format_string( get_post_format( $post->ID ) ) . '<span>]</span>';
    16131613
    16141614        $post_states = apply_filters( 'display_post_states', $post_states );