Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed result page redirect url redirect undefined value issue #2634

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion php/admin/options-page-results-page-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function qsm_options_results_tab_template(){
<p><?php esc_html_e( 'Type', 'quiz-master-next' );?> <span class="qsm-hightlight-text"> / </span> <?php esc_html_e( ' to insert template variables', 'quiz-master-next' ); ?></p>
<?php do_action( 'qsm_result_page_before_redirect_input', $quiz_id, $categories ); ?>
<p><?php esc_html_e( 'Or, redirect the user by entering the URL below:', 'quiz-master-next' ); ?></p>
<input type="text" class="results-page-redirect" value="<# if ( data.redirect ) { #>{{ data.redirect }}<# } #>">
<input type="text" class="results-page-redirect" value="<# if ( data.redirect && 'undefined' !== data.redirect) { #>{{ data.redirect }}<# } #>">
<?php do_action( 'qsm_result_page_after', $quiz_id, $categories ); ?>
</div>
</main>
Expand Down
2 changes: 1 addition & 1 deletion php/admin/quiz-options-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function qsm_generate_quiz_options() {
}

$qsm_core_tabs = array( 'questions', 'contact', 'text', 'options', 'emails', 'results-pages', 'style' );
$addon_tabs = '';
$addon_tabs = 0;
?>
<div class="wrap" id="mlw_quiz_wrap">
<div class='mlw_quiz_options' id="mlw_quiz_options">
Expand Down
2 changes: 1 addition & 1 deletion php/template-variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ function qsm_all_contact_fields_variable( $content, $results ) {
return $content;
}
function qsm_get_options_of_contact_fields( $data, $label, $type ) {
if( is_array( $data ) ){
if ( is_array( $data ) ) {
foreach ( $data as $item ) {
if ( $item['label'] === $label && $item['type'] === $type ) {
return $item['options'];
Expand Down
Loading