[wp-trac] [WordPress Trac] #34731: Need method to revert "comment" field position

WordPress Trac noreply at wordpress.org
Fri Nov 20 04:12:05 UTC 2015


#34731: Need method to revert "comment" field position
--------------------------+-----------------------
 Reporter:  greenshady    |       Owner:  afercia
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.4
Component:  Comments      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------
Changes (by SergeyBiryukov):

 * keywords:  reporter-feedback 2nd-opinion => has-patch


Comment:

 [attachment:34731.patch] introduces a `comment_form_fields` filter for all
 the fields including the comment field, which allows for placing the
 comment field before, after, or even between other fields.

 Moving the comment field to the bottom becomes trivial:
 {{{
 function wp34731_move_comment_field_to_bottom( $fields ) {
         $comment_field = $fields['comment'];
         unset( $fields['comment'] );
         $fields['comment'] = $comment_field;

         return $fields;
 }
 add_filter( 'comment_form_fields', 'wp34731_move_comment_field_to_bottom'
 );
 }}}

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


More information about the wp-trac mailing list