Opened 7 years ago
Closed 2 years ago
#41363 closed defect (bug) (wontfix)
Document nocache_headers() usage in wp-admin/admin-post.php
Reported by: | ronakganatra | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
nocache_headers(); is used but unclear as to what it actually does. documentation need improvement
Attachments (1)
Change History (7)
#1
@
7 years ago
- Component changed from Editor to Administration
Hi @ronakganatra, welcome to WordPress Trac! Thanks for the patch.
There are more than 15 instances of nocache_headers()
calls in core though, adding a comment to only one of them seems inconsistent. The function itself already has a description, maybe it should be made clearer?
#2
@
7 years ago
- Summary changed from Needs improvements in the documentation of the function to Document nocache_headers() usage in wp-admin/admin-post.php
#3
follow-up:
↓ 4
@
3 years ago
Hello @SergeyBiryukov ,
Do you mean just adding comments to all the instances?
#4
in reply to:
↑ 3
@
3 years ago
- Keywords has-patch close added
Replying to 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, which might seem a bit inconsistent. Then again, if the code is mostly self-documenting, I don't think it's necessary to add a comment for every single function call. Note that the send_origin_headers()
comment does not just duplicate the function description but provides some more context.
added description for used function nocache_headers();