WordPress.org

Make WordPress Core

Changeset 18931


Ignore:
Timestamp:
10/10/11 19:56:35 (3 years ago)
Author:
nacin
Message:

Check post_type_supports before adding comments column to attachments. Translate a string. props johnbillion, SergeyBiryukov. fixes #18644.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-media-list-table.php

    r18114 r18931  
    138138        if ( !$this->detached ) { 
    139139            $posts_columns['parent'] = _x( 'Attached to', 'column name' ); 
    140             $posts_columns['comments'] = '<span class="vers"><img alt="Comments" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></span>'; 
     140            if ( post_type_supports( 'attachment', 'comments' ) ) 
     141                $posts_columns['comments'] = '<span class="vers"><img alt="' . esc_attr__( 'Comments' ) . '" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></span>'; 
    141142        } 
    142143        /* translators: column name */ 
Note: See TracChangeset for help on using the changeset viewer.