Make WordPress Core

Changeset 61268


Ignore:
Timestamp:
11/19/2025 02:44:47 AM (4 weeks ago)
Author:
westonruter
Message:

Media: Remove Comments column from Media list view when attachment pages are not enabled.

Developed in https://github.com/WordPress/wordpress-develop/pull/10471

Follow-up to [56657].

Props akshat2802, knutsp, shailu25, soyebsalar01, westonruter.
See #57913.
Fixes #64201.

File:
1 edited

Legend:

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

    r60032 r61268  
    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>',
Note: See TracChangeset for help on using the changeset viewer.