[wp-trac] [WordPress Trac] #41363: Document nocache_headers() usage in wp-admin/admin-post.php

WordPress Trac noreply at wordpress.org
Tue Feb 15 10:26:07 UTC 2022


#41363: Document nocache_headers() usage in wp-admin/admin-post.php
-----------------------------+------------------------------
 Reporter:  ronakganatra     |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Administration   |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |     Focuses:  docs
-----------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => has-patch close


Comment:

 Replying to [comment:3 pyrobd]:
 > Do you mean just adding comments to all the instances?

 Not really, I meant that the function itself already has a description to
 clarify its purpose, so I don't see a significant benefit in duplicating
 it in other instances. So unless there is something to improve in the
 function description, I think this ticket can be closed.

 I guess the point of the ticket was that in this particular file, the
 `send_origin_headers()` call has a comment while `nocache_headers()` does
 not have it, which might seem a bit inconsistent. Then again, if the code
 is mostly self-documenting, I don't think it's necessary to have a comment
 for every single function call. Note that the comment on
 `send_origin_headers()` does not just duplicate the function description
 but provides some more context.

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


More information about the wp-trac mailing list