From 056325a70d2853d6012a71dde274cbd71c8bf931 Mon Sep 17 00:00:00 2001 From: PranavAwasthi Date: Thu, 22 Aug 2024 14:31:18 +0530 Subject: [PATCH 1/4] added a action hook --- php/admin/functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/php/admin/functions.php b/php/admin/functions.php index 90552dc06..25c5c1f91 100644 --- a/php/admin/functions.php +++ b/php/admin/functions.php @@ -1492,6 +1492,7 @@ function qsm_quiz_theme_settings( $type, $label, $name, $value, $default_value, ?> From 57be4704fd2e32c0e1cb4a2dddc14c47ce72946d Mon Sep 17 00:00:00 2001 From: PranavAwasthi Date: Thu, 22 Aug 2024 14:57:32 +0530 Subject: [PATCH 2/4] changes for adding helper text --- php/admin/functions.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/php/admin/functions.php b/php/admin/functions.php index 25c5c1f91..11eebde52 100644 --- a/php/admin/functions.php +++ b/php/admin/functions.php @@ -1433,11 +1433,18 @@ function qsm_admin_upgrade_content( $args = array(), $type = 'popup' ) { * @return string $options other options array * @return html */ -function qsm_quiz_theme_settings( $type, $label, $name, $value, $default_value, $options = array( 'button_text' => '' ) ) { +function qsm_quiz_theme_settings( $type, $label, $name, $value, $default_value, $options = array( 'button_text' => '' ), $helper_text = '' ) { + $tooltip = ''; + if ( isset( $helper_text ) && '' !== $helper_text ) { + $tooltip .= ''; + $tooltip .= '' . esc_html( $helper_text ) . ''; + $tooltip .= ''; + } ?> + From 155f66b902675c9eb71bf30737bc2c91f1e573ac Mon Sep 17 00:00:00 2001 From: PranavAwasthi Date: Thu, 22 Aug 2024 15:00:53 +0530 Subject: [PATCH 3/4] added esc function --- php/admin/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/admin/functions.php b/php/admin/functions.php index 11eebde52..99e358fa6 100644 --- a/php/admin/functions.php +++ b/php/admin/functions.php @@ -1444,7 +1444,7 @@ function qsm_quiz_theme_settings( $type, $label, $name, $value, $default_value, - + Date: Thu, 22 Aug 2024 15:10:22 +0530 Subject: [PATCH 4/4] changes for adding helper text in themes --- php/admin/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/php/admin/functions.php b/php/admin/functions.php index 99e358fa6..70b1cc367 100644 --- a/php/admin/functions.php +++ b/php/admin/functions.php @@ -1433,18 +1433,18 @@ function qsm_admin_upgrade_content( $args = array(), $type = 'popup' ) { * @return string $options other options array * @return html */ -function qsm_quiz_theme_settings( $type, $label, $name, $value, $default_value, $options = array( 'button_text' => '' ), $helper_text = '' ) { +function qsm_quiz_theme_settings( $type, $label, $name, $value, $default_value, $options = array( 'button_text' => '' ) ) { $tooltip = ''; - if ( isset( $helper_text ) && '' !== $helper_text ) { + if ( isset( $options['helper_text'] ) && '' !== $options['helper_text'] ) { $tooltip .= ''; - $tooltip .= '' . esc_html( $helper_text ) . ''; + $tooltip .= '' . esc_html( $options['helper_text'] ) . ''; $tooltip .= ''; } ?> - +