Make WordPress Core


Ignore:
Timestamp:
01/15/2024 05:40:06 PM (9 months ago)
Author:
SergeyBiryukov
Message:

Comments: Use post_password_required() for comment capability checks.

Follow-up to [56836], [57123].

Fixes #59929.

File:
1 edited

Legend:

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

    r57123 r57285  
    833833
    834834        if ( ! current_user_can( $edit_post_cap, $post_id )
    835             && ( ! empty( $post_object->post_password )
     835            && ( post_password_required( $post_id )
    836836                || ! current_user_can( 'read_post', $post_id ) )
    837837        ) {
Note: See TracChangeset for help on using the changeset viewer.