askdesign
3/12/2019 - 4:08 PM

Comments Form

https://my.studiopress.com/documentation/snippets/comments/
//* Modify the speak your mind title in comments - studiopress
//* Default was LEAVE A COMMENT
add_filter( 'comment_form_defaults', 'sp_comment_form_defaults' );
function sp_comment_form_defaults( $defaults ) {
 
	$defaults['title_reply'] = __( 'Write a Tribute' );
	return $defaults;
 
}
//* Change comment label above comment field to tribute
//* Brad Dalton's code snippet
function wpsites_modify_comment_form_text_area($arg) {
    $arg['comment_field'] = '<p class="comment-form-comment"><label for="comment">' . _x( 'Your Tribute', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="10" aria-required="true"></textarea></p>';
    return $arg;
}

add_filter('comment_form_defaults', 'wpsites_modify_comment_form_text_area');

//* Modify comments title text in comments - studiopress
//* Default was DISCUSSIONS
add_filter( 'genesis_title_comments', 'sp_genesis_title_comments' );
function sp_genesis_title_comments() {
	$title = '<h3>Tributes</h3>';
	return $title;
}

//* Customize the submit button text in comments
//* Default was SUBMIT (unchanged here)
add_filter( 'comment_form_defaults', 'sp_comment_submit_button' );
function sp_comment_submit_button( $defaults ) {
 
        $defaults['label_submit'] = __( 'Submit', 'custom' );
        return $defaults;
 
}