Skip to content

Commit

Permalink
Remove unnecessary mail-tag replacement for quiz
Browse files Browse the repository at this point in the history
  • Loading branch information
takayukister committed Mar 21, 2024
1 parent 52c69b6 commit a59fe34
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions modules/quiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,24 +168,6 @@ function wpcf7_quiz_ajax_refill( $items ) {
}


/* Mail-tag replacement */

add_filter( 'wpcf7_mail_tag_replaced_quiz', 'wpcf7_quiz_mail_tag', 10, 4 );

function wpcf7_quiz_mail_tag( $replaced, $submitted, $html, $mail_tag ) {
$field_name = $mail_tag->field_name();
$submitted = $_POST[$field_name] ?? '';
$replaced = $submitted;

if ( $html ) {
$replaced = esc_html( $replaced );
$replaced = wptexturize( $replaced );
}

return $replaced;
}


/* Messages */

add_filter( 'wpcf7_messages', 'wpcf7_quiz_messages', 10, 1 );
Expand Down

0 comments on commit a59fe34

Please sign in to comment.