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-comments-list-table.php

    r57123 r57285  
    649649
    650650        if ( ! current_user_can( $edit_post_cap, $comment->comment_post_ID )
    651             && ( ! empty( $post->post_password )
     651            && ( post_password_required( $comment->comment_post_ID )
    652652                || ! current_user_can( 'read_post', $comment->comment_post_ID ) )
    653653        ) {
Note: See TracChangeset for help on using the changeset viewer.