Skip to content

Commit 2cabb30

Browse files
committed
Media: Remove Comments column from Media list view when attachment pages are not enabled.
Developed in #10471 Follow-up to [56657]. Props akshat2802, knutsp, shailu25, soyebsalar01, westonruter. See #57913. Fixes #64201. git-svn-id: https://develop.svn.wordpress.org/trunk@61268 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 71ac3dd commit 2cabb30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-admin/includes/class-wp-media-list-table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ public function get_columns() {
367367
if ( ! $this->detached ) {
368368
$posts_columns['parent'] = _x( 'Uploaded to', 'column name' );
369369

370-
if ( post_type_supports( 'attachment', 'comments' ) ) {
370+
if ( post_type_supports( 'attachment', 'comments' ) && get_option( 'wp_attachment_pages_enabled' ) ) {
371371
$posts_columns['comments'] = sprintf(
372372
'<span class="vers comment-grey-bubble" title="%1$s" aria-hidden="true"></span><span class="screen-reader-text">%2$s</span>',
373373
esc_attr__( 'Comments' ),

0 commit comments

Comments
 (0)