WordPress.org

Make WordPress Core

Ticket #17958: 17958.3.diff

File 17958.3.diff, 2.7 KB (added by DH-Shredder, 3 years ago)

This includes the thumbs for pages as well, if it's desired.

  • wp-admin/includes/class-wp-posts-list-table.php

     
    524524 
    525525                                        $pad = str_repeat( '— ', $level ); 
    526526?> 
    527                         <td <?php echo $attributes ?>><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states( $post ); echo isset( $parent_name ) ? ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html( $parent_name ) : ''; ?></strong> 
     527                        <td <?php echo $attributes ?>><?php if ( has_post_thumbnail() ) { echo "<div class='column-title-thumb'>"; the_post_thumbnail(array(32,32)); echo "</div>"; } ?><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states( $post ); echo isset( $parent_name ) ? ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html( $parent_name ) : ''; ?></strong> 
    528528<?php 
    529529                                } 
    530530                                else { 
    531531                                        $attributes = 'class="post-title page-title column-title"' . $style; 
    532532?> 
    533                         <td <?php echo $attributes ?>><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ); ?>"><?php echo $title ?></a><?php } else { echo $title; }; _post_states( $post ); ?></strong> 
     533                        <td <?php echo $attributes ?>><?php if ( has_post_thumbnail() ) { echo "<div class='column-title-thumb'>"; the_post_thumbnail(array(32,32)); echo "</div>"; } ?><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $title ) ); ?>"><?php echo $title ?></a><?php } else { echo $title; }; _post_states( $post ); ?></strong> 
    534534<?php 
    535535                                        if ( 'excerpt' == $mode ) { 
    536536                                                the_excerpt(); 
  • wp-admin/css/wp-admin.dev.css

     
    48084808        font-weight: bold; 
    48094809} 
    48104810 
     4811.column-title-thumb {  
     4812        float:left; 
     4813        margin-right: 5px;  
     4814} 
     4815 
    48114816.column-author img, .column-username img { 
    48124817        float: left; 
    48134818        margin-right: 10px;