Opened 11 years ago
Closed 11 years ago
#31747 closed defect (bug) (fixed)
wp_insert_comment better docstrings
| Reported by: | lamosty | Owned by: | DrewAPicture |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.3 |
| Component: | Comments | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description
Function wp_insert_comment has incomplete docstring documentation. Its docstring says
The available comment data key names are 'comment_author_IP', 'comment_date', 'comment_date_gmt', 'comment_parent', 'comment_approved', and 'user_id'.
but the function accepts additional arguments through $commentdata assoc array, such as comment_type or comment_content.
Docstring could be enhanced to have a format like in the case of wp_insert_post function (=> argument type with a short description of what the argument does).
Attachments (2)
Change History (9)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Update docs of wp_insert_comment function