Last active
August 21, 2017 12:00
-
-
Save obiPlabon/214b21748b688e3d6b953514ece2a163 to your computer and use it in GitHub Desktop.
বাংলা টিউটোরিয়ালঃ https://obiplabon.im/173/wordpress-comment-form-customization/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Way Two | |
/** | |
* Set comment textarea to the bottom of comment form | |
* only works with WordPress version >= 4.4 | |
* @param array $fields Comment form inputs | |
*/ | |
function op_change_comment_textarea_position( $fields ) { | |
$comment = array('comment' => $fields['comment'] ); | |
unset( $fields['comment'] ); | |
return array_merge( $fields, $comment ); | |
} | |
add_filter( 'comment_form_fields', 'op_change_comment_textarea_position' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Way One | |
/** | |
* Set comment textarea to the bottom of comment form | |
* only works with WordPress version >= 4.4 | |
* @param array $fields Comment form inputs | |
*/ | |
function op_change_comment_textarea_position( $fields ) { | |
$comment = array( 'comment' => $fields['comment'] ); | |
return array_merge( array_diff_key( $fields, $comment), $comment ); | |
} | |
add_filter( 'comment_form_fields', 'op_change_comment_textarea_position' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment