Skip to content

Commit

Permalink
Merge pull request #1409 from rocklobster-in/dev/5.9
Browse files Browse the repository at this point in the history
Remove unnecessary mail-tag replacement for quiz
  • Loading branch information
takayukister authored Mar 21, 2024
2 parents 2d962a8 + a59fe34 commit c6db3c5
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 c6db3c5

Please sign in to comment.