diff --git a/php/admin/options-page-contact-tab.php b/php/admin/options-page-contact-tab.php
index d111a98f..e5138fa8 100644
--- a/php/admin/options-page-contact-tab.php
+++ b/php/admin/options-page-contact-tab.php
@@ -88,7 +88,7 @@ function qsm_options_contact_tab_content() {
-
+
@@ -96,11 +96,11 @@ function qsm_options_contact_tab_content() {
|
@@ -182,9 +182,6 @@ function qsm_contact_form_admin_ajax() {
foreach ( $settings as $key => $val ) {
$quiz_options[ $key ] = $val;
}
- if ( isset($settings['loggedin_user_contact']) ) {
- $quiz_options['loggedin_user_contact'] = (1 == $settings['loggedin_user_contact']) ? 0 : 1;
- }
$mlwQuizMasterNext->pluginHelper->update_quiz_setting( 'quiz_options', $quiz_options );
}
diff --git a/php/classes/class-qsm-install.php b/php/classes/class-qsm-install.php
index 2e9918b5..134d91bc 100644
--- a/php/classes/class-qsm-install.php
+++ b/php/classes/class-qsm-install.php
@@ -729,16 +729,16 @@ public function register_default_settings() {
// Registers loggedin_user_contact setting
$field_array = array(
'id' => 'loggedin_user_contact',
- 'label' => __( 'Show contact form to logged in users', 'quiz-master-next' ),
+ 'label' => __( 'Hide contact form to logged in users', 'quiz-master-next' ),
'type' => 'radio',
'options' => array(
array(
'label' => __( 'Yes', 'quiz-master-next' ),
- 'value' => 0,
+ 'value' => 1,
),
array(
'label' => __( 'No', 'quiz-master-next' ),
- 'value' => 1,
+ 'value' => 0,
),
),
'default' => 0,
diff --git a/php/classes/class-qsm-settings.php b/php/classes/class-qsm-settings.php
index 86389409..6c0a79ea 100644
--- a/php/classes/class-qsm-settings.php
+++ b/php/classes/class-qsm-settings.php
@@ -470,9 +470,13 @@ public function get_quiz_options() {
$quiz_options = array_merge( $quiz_options, $options );
}
- $text = $this->get_setting( 'quiz_text' );
- if ( is_array( $text ) ) {
- $quiz_options = array_merge( $quiz_options, $text );
+ $text = $this->get_setting('quiz_text');
+ if (is_array($text)) {
+ foreach ($text as $key => $value) {
+ if (!empty($value)) {
+ $quiz_options[$key] = $value;
+ }
+ }
}
// Return as old object model
|