Make WordPress Core

Ticket #16047: 16047.7.diff

File 16047.7.diff, 1.5 KB (added by markjaquith, 12 years ago)
  • wp-admin/includes/class-wp-posts-list-table.php

    class WP_Posts_List_Table extends WP_List_Table { 
    259259                if ( post_type_supports( $post_type, 'author' ) )
    260260                        $posts_columns['author'] = __( 'Author' );
    261261
     262                if ( post_type_supports( $post_type, 'post-formats' ) )
     263                        $posts_columns['format'] = _x( 'Format', 'post format' );
     264
    262265                $taxonomies = array();
    263266
    264267                $taxonomies = get_object_taxonomies( $post_type, 'objects' );
    class WP_Posts_List_Table extends WP_List_Table { 
    646649                        <?php
    647650                        break;
    648651
     652                        case 'format':
     653                        ?>
     654                        <td <?php echo $attributes ?>><?php
     655                                if ( get_post_format( $post->ID ) )
     656                                        echo get_post_format_string( get_post_format( $post->ID ) );
     657                                else
     658                                        echo get_post_format_string( 'standard' );
     659                        ?></td>
     660                        <?php
     661                        break;
     662
    649663                        default:
    650664                                if ( 'categories' == $column_name )
    651665                                        $taxonomy = 'category';
  • wp-admin/includes/template.php

    function _post_states($post) { 
    14491449                }
    14501450        }
    14511451
    1452         if ( get_post_format( $post->ID ) )
    1453                 echo ' - <span class="post-state-format">' . get_post_format_string( get_post_format( $post->ID ) ) . '</span>';
    14541452}
    14551453
    14561454function _media_states( $post ) {