From 22db653f8ea942ca9cc1980707394514a8341056 Mon Sep 17 00:00:00 2001 From: PranavAwasthi Date: Mon, 30 Dec 2024 17:37:55 +0530 Subject: [PATCH] Rollback changes --- php/classes/class-qmn-quiz-manager.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/php/classes/class-qmn-quiz-manager.php b/php/classes/class-qmn-quiz-manager.php index f0210da2..ccd7cb9e 100644 --- a/php/classes/class-qmn-quiz-manager.php +++ b/php/classes/class-qmn-quiz-manager.php @@ -1129,6 +1129,29 @@ public function display_quiz( $options, $quiz_data, $question_amount, $shortcode $randomness_class = 0 === intval( $options->randomness_order ) ? '' : 'random'; ?>
qmn_quiz_container mlw_qmn_quiz quiz_theme_ '> 1, + 'post_type' => 'qsm_quiz', + 'meta_query' => array( + array( + 'key' => 'quiz_id', + 'value' => $quiz_data['quiz_id'], + 'compare' => '=', + ), + ), + ); + $the_query = new WP_Query( $args ); + + // The Loop + if ( $the_query->have_posts() ) { + while ( $the_query->have_posts() ) { + $the_query->the_post(); + echo get_the_post_thumbnail( get_the_ID(), 'full' ); + } + /* Restore original Post Data */ + wp_reset_postdata(); + } echo apply_filters( 'qsm_display_before_form', '', $options, $quiz_data ); $quiz_form_action = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; ?>