Make WordPress Core

Ticket #16047: 16047.11.diff

File 16047.11.diff, 3.5 KB (added by helen, 12 years ago)
  • wp-admin/includes/class-wp-posts-list-table.php

     
    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 
    265262                $taxonomies = array();
    266263
    267264                $taxonomies = get_object_taxonomies( $post_type, 'objects' );
     
    541538
    542539                                $pad = str_repeat( '— ', $level );
    543540                                echo "<td $attributes><strong>";
     541
     542                                if ( $format = get_post_format( $post->ID ) ) {
     543                                        $label = get_post_format_string( $format );
     544
     545                                        echo '<a href="' . esc_url( add_query_arg( array( 'post_format' => $format, 'post_type' => $post->post_type ), 'edit.php' ) ) . '" class="post-state-format format-' . $format . '" title="' . $label . '">' . $label . ":</a> ";
     546                                }
     547
    544548                                if ( $can_edit_post && $post->post_status != 'trash' ) {
    545549                                        echo '<a class="row-title" href="' . $edit_link . '" title="' . esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ) . '">' . $pad . $title . '</a>';
    546550                                } else {
     
    655659                        <?php
    656660                        break;
    657661
    658                         case 'format':
    659                         ?>
    660                         <td <?php echo $attributes ?>><?php
    661                                 if ( get_post_format( $post->ID ) )
    662                                         printf( '<a href="%s">%s</a>', add_query_arg( array( 'post_format' => get_post_format( $post->ID ), 'post_type' => $post->post_type ), 'edit.php' ), get_post_format_string( get_post_format( $post->ID ) ) );
    663                                 else
    664                                         echo '&#8212;';
    665                         ?></td>
    666                         <?php
    667                         break;
    668 
    669662                        default:
    670663                                if ( 'categories' == $column_name )
    671664                                        $taxonomy = 'category';
  • wp-admin/css/wp-admin.css

     
    26852685        padding: 0 0 .2em 1px;
    26862686}
    26872687
    2688 span.post-state-format {
    2689         font-weight: normal;
     2688a.post-state-format {
     2689        overflow: hidden;
     2690        display: inline-block;
     2691        vertical-align: middle;
     2692        height: 16px;
     2693        width: 16px;
     2694        margin-right: 5px;
     2695        background-image: url(../images/post-formats.png);
     2696        background-repeat: no-repeat;
     2697        text-indent: -999em;
    26902698}
    26912699
     2700a.post-state-format.format-image {
     2701        background-position: -40px -8px;
     2702}
    26922703
     2704a.post-state-format.format-gallery {
     2705        background-position: -72px -8px;
     2706}
     2707
     2708a.post-state-format.format-audio {
     2709        background-position: -104px -8px;
     2710}
     2711
     2712a.post-state-format.format-video {
     2713        background-position: -135px -8px;
     2714}
     2715
     2716a.post-state-format.format-chat {
     2717        background-position: -168px -8px;
     2718}
     2719
     2720a.post-state-format.format-status {
     2721        background-position: -200px -8px;
     2722}
     2723
     2724a.post-state-format.format-aside {
     2725        background-position: -232px -8px;
     2726}
     2727
     2728a.post-state-format.format-quote {
     2729        background-position: -264px -8px;
     2730}
     2731
     2732a.post-state-format.format-link {
     2733        background-position: -296px -8px;
     2734}
     2735
     2736
    26932737/*------------------------------------------------------------------------------
    26942738  10.1 - Inline Editing
    26952739------------------------------------------------------------------------------*/
     
    90749118                background-size: 16px 16px;
    90759119        }
    90769120
     9121        a.post-state-format {
     9122                background-image: url(../images/post-formats-2x.png);
     9123                background-size: 320px 32px;
     9124        }
     9125
    90779126        th .comment-grey-bubble {
    90789127                background-image: url('../images/comment-grey-bubble-2x.png');
    90799128                background-size: 12px 12px;