[wp-trac] [WordPress Trac] #34059: Abstract functionality from wp-comments-post.php

WordPress Trac noreply at wordpress.org
Wed Sep 30 00:23:09 UTC 2015


#34059: Abstract functionality from wp-comments-post.php
-------------------------------------------------+-------------------------
 Reporter:  johnbillion                          |       Owner:
     Type:  task (blessed)                       |  johnbillion
 Priority:  normal                               |      Status:  assigned
Component:  Comments                             |   Milestone:  4.4
 Severity:  normal                               |     Version:
 Keywords:  has-patch has-unit-tests dev-        |  Resolution:
  feedback                                       |     Focuses:
-------------------------------------------------+-------------------------

Comment (by DrewAPicture):

 Only two things that jumped out at me:

 * If the ternaries are aligned like that because they started wrapping to
 new lines, we might as well just do if/else statements. Or initialize the
 nulls as null and 0s as 0s first, then do if statements to set values from
 the `$comment_data` array.
 * I think `wp_handle_comment_post()` might be a little too ambiguous and
 easily confused with post as in post type instead of post as in `$_POST`

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


More information about the wp-trac mailing list