Skip to content

Commit

Permalink
Merge pull request #2490 from QuizandSurveyMaster/dev-zubair
Browse files Browse the repository at this point in the history
added tranlation support
  • Loading branch information
zubairraeen authored Mar 12, 2024
2 parents bdc7a0c + 2c27959 commit 055bfdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions php/classes/class-qmn-quiz-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ public function display_results( $options, $data ) {
if ( ! isset( $_REQUEST['qsm_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['qsm_nonce'] ) ), 'qsm_submit_quiz_' . intval( $quiz_id ) ) ) {
echo wp_json_encode(
array(
'display' => htmlspecialchars_decode( 'Nonce Validation failed!' ),
'display' => __( 'Nonce Validation failed!', 'quiz-master-next' ),
'redirect' => false,
'result_status' => array(
'save_response' => false,
Expand Down Expand Up @@ -1628,7 +1628,7 @@ public function ajax_submit_results() {
if ( isset($qsm_option['quiz_options']['not_allow_after_expired_time']) && '1' === $qsm_option['quiz_options']['not_allow_after_expired_time'] && isset( $_POST['currentuserTime'] ) && sanitize_text_field( wp_unslash( $_POST['currentuserTime'] ) ) > $dtUtcDate && ! empty($dateStr) ) {
echo wp_json_encode(
array(
'display' => htmlspecialchars_decode( 'Quiz Expired!' ),
'display' => __( 'Quiz Expired!', 'quiz-master-next' ),
'redirect' => false,
'result_status' => array(
'save_response' => false,
Expand Down Expand Up @@ -1979,7 +1979,7 @@ public function submit_results( $qmn_quiz_options, $qmn_array_for_variables ) {
// Prepares data to be sent back to front-end.
$return_array = array(
'quizExpired' => false,
'display' => $result_display,
'display' => wp_kses_post( htmlspecialchars_decode( $result_display, ENT_QUOTES) ),
'redirect' => apply_filters( 'mlw_qmn_template_variable_results_page', $results_pages['redirect'], $qmn_array_for_variables ),
'result_status' => array(
'save_response' => $qmn_array_for_variables['response_saved'],
Expand Down

0 comments on commit 055bfdb

Please sign in to comment.