From b827c657fb3f5ce4fdc3f585d48ec78cbb7a4093 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 10 Oct 2011 19:56:35 +0000 Subject: [PATCH] Check post_type_supports before adding comments column to attachments. Translate a string. props johnbillion, SergeyBiryukov. fixes #18644. git-svn-id: https://develop.svn.wordpress.org/trunk@18931 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-media-list-table.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index 531fe60fd7..f4948975b2 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -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'] = 'Comments'; + if ( post_type_supports( 'attachment', 'comments' ) ) + $posts_columns['comments'] = '' . esc_attr__( 'Comments' ) . ''; } /* translators: column name */ $posts_columns['date'] = _x( 'Date', 'column name' );