Opened 9 years ago
Closed 4 years ago
#41363 closed defect (bug) (wontfix)
Document nocache_headers() usage in wp-admin/admin-post.php
| Reported by: | ronakganatra | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description
nocache_headers(); is used but unclear as to what it actually does. documentation need improvement
Attachments (1)
Change History (7)
#1
@
9 years ago
- Component Editor → 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
@
9 years ago
- Summary Needs improvements in the documentation of the function → Document nocache_headers() usage in wp-admin/admin-post.php
#3
follow-up:
↓ 4
@
4 years ago
Hello @SergeyBiryukov ,
Do you mean just adding comments to all the instances?
#4
in reply to: ↑ 3
@
4 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
added description for used function nocache_headers();