Skip to content

Commit

Permalink
Merge pull request #2409 from QuizandSurveyMaster/CU-85zu18kq4-advanc…
Browse files Browse the repository at this point in the history
…e-timer-strategic-update

added version compare condition for advance timer
  • Loading branch information
zubairraeen authored Dec 1, 2023
2 parents dad8d13 + 00c61c0 commit a671076
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions php/admin/options-page-questions-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ function qsm_options_questions_tab_content() {
$read_only = "";
$disable_class = "";
$background = "#FFFFFF";
$display_advance = "yes";
if ( ! class_exists ( 'QSM_AdvancedTimer' ) ) {
$read_only = 'readonly';
$disable_class = 'qsm-disabled-td';
Expand All @@ -180,6 +181,12 @@ function qsm_options_questions_tab_content() {
$target_link = sprintf( '<div class="notice notice-error notice-advance-timer"><strong>'.__('Error! ', 'quiz-master-next').'</strong>'.$target_text.'</div>' );
echo wp_kses_post($target_link);
}
$advancetimer = 'qsm-advanced-timer/qsm-advanced-timer.php';
$plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/'. $advancetimer);
$version_number = $plugin_data['Version'];
if ( version_compare($version_number, '2.0.0', '<') ) {
$display_advance = "no";
}
}
?>
<div class="question-controls">
Expand Down Expand Up @@ -699,6 +706,7 @@ class="save-page-button button button-primary"><?php esc_html_e( 'Save Questions
<input name="hide_prevbtn" id="hide_prevbtn" type="checkbox" value="" />
<span class="qsm-page-setting-span"><?php _e( 'Hide Previous button', 'quiz-master-next' ); ?></span>
</div>
<?php if ( "yes" == $display_advance ) { ?>
<div class="qsm-page-setting-container" style="background-color:<?php echo esc_attr($background); ?>">
<div class="qsm-page-setting-top ">
<div class="qsm-page-setting-left">
Expand All @@ -725,6 +733,7 @@ class="save-page-button button button-primary"><?php esc_html_e( 'Save Questions
<?php } ?>
</div>
</div>
<?php } ?>
<?php do_action( 'qsm_action_quiz_page_attributes_fields' ); ?>
</div>
</main>
Expand Down

0 comments on commit a671076

Please sign in to comment.