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

git-svn-id: http://svn.automattic.com/wordpress/trunk@18931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-10 19:56:35 +00:00
parent 0a1fe6dc02
commit 4dfdd9ea97
1 changed files with 2 additions and 1 deletions

View File

@ -137,7 +137,8 @@ class WP_Media_List_Table extends WP_List_Table {
/* translators: column name */
if ( !$this->detached ) {
$posts_columns['parent'] = _x( 'Attached to', 'column name' );
$posts_columns['comments'] = '<span class="vers"><img alt="Comments" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></span>';
if ( post_type_supports( 'attachment', 'comments' ) )
$posts_columns['comments'] = '<span class="vers"><img alt="' . esc_attr__( 'Comments' ) . '" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></span>';
}
/* translators: column name */
$posts_columns['date'] = _x( 'Date', 'column name' );