Make WordPress Core

Ticket #22439: 22439.2.diff

File 22439.2.diff, 1.7 KB (added by scribu, 13 years ago)
  • wp-admin/includes/class-wp-media-list-table.php

    diff --git wp-admin/includes/class-wp-media-list-table.php wp-admin/includes/class-wp-media-list-table.php
    index 28f9557..f263371 100644
    class WP_Media_List_Table extends WP_List_Table { 
    154154
    155155                /* translators: column name */
    156156                if ( !$this->detached ) {
    157                         $posts_columns['parent'] = _x( 'Attached to', 'column name' );
    158157                        if ( post_type_supports( 'attachment', 'comments' ) )
    159158                                $posts_columns['comments'] = '<span class="vers"><div title="' . esc_attr__( 'Comments' ) . '" class="comment-grey-bubble"></div></span>';
    160159                }
    foreach ( $columns as $column_name => $column_display_name ) { 
    296295<?php
    297296                break;
    298297
    299         case 'parent':
    300                 if ( $post->post_parent > 0 ) {
    301                         if ( get_post( $post->post_parent ) ) {
    302                                 $title =_draft_or_post_title( $post->post_parent );
    303                         }
    304 ?>
    305                         <td <?php echo $attributes ?>><strong>
    306                                 <?php if( current_user_can( 'edit_post', $post->post_parent ) ) { ?>
    307                                         <a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
    308                                                 <?php echo $title ?></a><?php
    309                                 } else {
    310                                         echo $title;
    311                                 } ?></strong>,
    312                                 <?php echo get_the_time( __( 'Y/m/d' ) ); ?>
    313                         </td>
    314 <?php
    315                 } else {
    316 ?>
    317                         <td <?php echo $attributes ?>><?php _e( '(Unattached)' ); ?><br />
    318                         <?php if( $user_can_edit ) {?>
    319                                 <a class="hide-if-no-js"
    320                                         onclick="findPosts.open( 'media[]','<?php echo $post->ID ?>' ); return false;"
    321                                         href="#the-list">
    322                                         <?php _e( 'Attach' ); ?></a>
    323                         <?php } ?></td>
    324 <?php
    325                 }
    326                 break;
    327 
    328298        case 'comments':
    329299                $attributes = 'class="comments column-comments num"' . $style;
    330300?>