[wp-trac] [WordPress Trac] #10910: Standardize comment form

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 6 15:47:56 UTC 2010


#10910: Standardize comment form
----------------------------+-----------------------------------------------
 Reporter:  Otto42          |       Owner:  beaulebens
     Type:  task (blessed)  |      Status:  assigned  
 Priority:  normal          |   Milestone:  3.0       
Component:  Comments        |     Version:  2.9       
 Severity:  normal          |    Keywords:  has-patch 
----------------------------+-----------------------------------------------

Comment(by beaulebens):

 Replying to [comment:13 ryan]:
 > I'm not really fond of having more globals. Can comment_form() call
 wp_get_current_commenter() and get_option('require_name_email') itself?

 Good call ryan. The updated patch (10910.002.diff) does the following:

  * Uses wp_get_current_commenter() and get_option('require_name_email')
 instead of globals
  * Moves to a much more "arg-centric" approach, rather than individual
 filters on everything
  * Makes more of the form controllable via args (HTML ids, labels etc)
  * Uses site_url() for the form action
  * Adds a do_action('comment_form_top') right after the <form> tag
  * Moves the comment_form_before/after actions to only happen when
 comments are open, and adds a comment_form_comments_closed action which is
 triggered if comments are closed

 Also adding the test-on-default-theme.002.diff file to work with this
 version, and patch 004 over on #11172, still showing some simple use of
 the new hooks, including the action for when comments are closed (close
 comments on a post to try it out).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10910#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list