[wp-trac] [WordPress Trac] #31747: wp_insert_comment better docstrings

WordPress Trac noreply at wordpress.org
Tue Mar 24 13:30:57 UTC 2015

#31747: wp_insert_comment better docstrings
 Reporter:  lamosty       |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Text Changes  |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  docs          |
 Function wp_insert_comment has incomplete docstring documentation.
 includes/comment.php#L2087 Its docstring] says

 The available comment data key names are 'comment_author_IP',
 '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).

Ticket URL: <https://core.trac.wordpress.org/ticket/31747>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list