From 00c61c01d262b825ae70765b924536b47145bef4 Mon Sep 17 00:00:00 2001 From: etchirag Date: Fri, 1 Dec 2023 19:09:58 +0530 Subject: [PATCH] added version compare condition for advance timer --- php/admin/options-page-questions-tab.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/php/admin/options-page-questions-tab.php b/php/admin/options-page-questions-tab.php index f93cb8a47..deaaa4dbd 100644 --- a/php/admin/options-page-questions-tab.php +++ b/php/admin/options-page-questions-tab.php @@ -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'; @@ -180,6 +181,12 @@ function qsm_options_questions_tab_content() { $target_link = sprintf( '
'.__('Error! ', 'quiz-master-next').''.$target_text.'
' ); 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"; + } } ?>
@@ -699,6 +706,7 @@ class="save-page-button button button-primary">
+
@@ -725,6 +733,7 @@ class="save-page-button button button-primary">
+