[wp-trac] [WordPress Trac] #59866: Attachment pages are only disabled for users that are logged in

WordPress Trac noreply at wordpress.org
Wed Nov 22 23:34:46 UTC 2023


#59866: Attachment pages are only disabled for users that are logged in
-------------------------------------------------+-------------------------
 Reporter:  joppuyo                              |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  6.4.2
Component:  Media                                |     Version:  6.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-unit-  |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by lakshmananphp):

 I've tested @chesio's patch, and it works.

 I have a suggestion: can we add one more condition to this check?


 {{{
 if ($attachment_parent_id && 0 !== $attachment_parent_id ) {
 // just to make sure that the attachment's parent id is not zero.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59866#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list