[wp-trac] [WordPress Trac] #59929: Use post_password_required() for comment capability checks

WordPress Trac noreply at wordpress.org
Fri Nov 17 17:23:03 UTC 2023


#59929: Use post_password_required() for comment capability checks
----------------------------+-----------------------
 Reporter:  SergeyBiryukov  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  6.5
Component:  Comments        |    Version:  6.3.2
 Severity:  normal          |   Keywords:  has-patch
  Focuses:                  |
----------------------------+-----------------------
 [56836] introduced a few capability checks with `! empty(
 $post->post_password )`.

 Generally, we use `post_password_required()` for similar checks elsewhere
 in core.

 Unless I'm missing something, it can be used here as well.

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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59929>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list