Advertisement
darrenbachan

Untitled

Jun 3rd, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1. // Move comment field to bottom
  2.         function wpb_move_comment_field_to_bottom( $fields = array(
  3.                 'author' =>
  4.                     '<p class="comment-form-author"><label for="author">' . __( 'Name', 'domainreference' ) . '</label> ' .
  5.                     ( $req ? '<span class="required">*</span>' : '' ) .
  6.                     '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
  7.                     '" size="30"' . $aria_req . ' /></p>',
  8.  
  9.                   'email' =>
  10.                     '<p class="comment-form-email"><label for="email">' . __( 'Email', 'domainreference' ) . '</label> ' .
  11.                     ( $req ? '<span class="required">*</span>' : '' ) .
  12.                     '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) .
  13.                     '" size="30"' . $aria_req . ' /></p>'
  14.                 );
  15.             ) {
  16.             );
  17.             $comment_field = $fields['comment'];
  18.             unset( $fields['comment'] );
  19.             $fields['comment'] = $comment_field;
  20.             return $fields;
  21.         }
  22.  
  23.         add_filter( 'comment_form_fields', 'wpb_move_comment_field_to_bottom' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement