diff --git a/php/classes/class-qmn-plugin-helper.php b/php/classes/class-qmn-plugin-helper.php index 768e99373..cf673ac76 100644 --- a/php/classes/class-qmn-plugin-helper.php +++ b/php/classes/class-qmn-plugin-helper.php @@ -554,6 +554,7 @@ public static function get_default_texts() { 'retake_quiz_button_text' => __('Retake Quiz', 'quiz-master-next'), 'previous_button_text' => __('Previous', 'quiz-master-next'), 'next_button_text' => __('Next', 'quiz-master-next'), + 'deselect_answer_text' => __('Deselect Answer', 'quiz-master-next'), 'empty_error_text' => __('Please complete all required fields!', 'quiz-master-next'), 'email_error_text' => __('Not a valid e-mail address!', 'quiz-master-next'), 'number_error_text' => __('This field must be a number!', 'quiz-master-next'), diff --git a/php/classes/class-qsm-install.php b/php/classes/class-qsm-install.php index 89ca69e4f..d5f901cb8 100644 --- a/php/classes/class-qsm-install.php +++ b/php/classes/class-qsm-install.php @@ -1146,7 +1146,7 @@ public function register_default_settings() { ); $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' ); - // Registers start_quiz_survey_text setting + // Registers No answer provided setting $field_array = array( 'id' => 'no_answer_text', 'label' => __( 'No Answer Text', 'quiz-master-next' ), @@ -1156,6 +1156,16 @@ public function register_default_settings() { ); $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' ); + // Registers Deselect Answer setting + $field_array = array( + 'id' => 'deselect_answer_text', + 'label' => __( 'Deselect Answer Text', 'quiz-master-next' ), + 'type' => 'text', + 'default' => __( 'Deselect Answer', 'quiz-master-next' ), + 'option_tab' => 'text-button', + ); + $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_text' ); + // Registers empty_error_text setting $field_array = array( 'id' => 'empty_error_text', diff --git a/php/question-types/qsm-question-title.php b/php/question-types/qsm-question-title.php index ad866eeae..dfe61643f 100644 --- a/php/question-types/qsm-question-title.php +++ b/php/question-types/qsm-question-title.php @@ -18,7 +18,9 @@ function qsm_question_title_func( $question, $question_type = '', $new_question_ $qmn_quiz_options = $mlwQuizMasterNext->quiz_settings->get_quiz_options(); $deselect_answer = ''; if ( isset( $qmn_quiz_options->enable_deselect_option ) && 1 == $qmn_quiz_options->enable_deselect_option && ( 'multiple_choice' === $question_type || 'horizontal_multiple_choice' === $question_type ) ) { - $deselect_answer = ''.__( 'Deselect Answer', 'quiz-master-next' ).''; + $default_texts = QMNPluginHelper::get_default_texts(); + $deselect_answer_text = ! empty( $qmn_quiz_options->deselect_answer_text ) ? $qmn_quiz_options->deselect_answer_text : $default_texts['deselect_answer_text']; + $deselect_answer = ''. $mlwQuizMasterNext->pluginHelper->qsm_language_support( $deselect_answer_text, "deselect_answer_text-{$qmn_quiz_options->quiz_id}" ) .''; } do_action('qsm_question_title_func_before',$question, $question_type, $new_question_title, $question_id ); if ( '' !== $new_question_title ) { @@ -50,7 +52,7 @@ function qsm_question_title_func( $question, $question_type = '', $new_question_ $allow_html['input']['class'] = 1; $allow_html['input']['id'] = 1; $allow_html['input']['maxlength'] = 1; - $allow_html = apply_filters( 'qsm_allow_html_question_title_after', $question_id, $allow_html ); + $allow_html = apply_filters( 'qsm_allow_html_question_title_after', $allow_html, $question_id ); ?>

diff --git a/php/question-types/qsm-question-type-dropdown.php b/php/question-types/qsm-question-type-dropdown.php index a805a07f0..21228c263 100644 --- a/php/question-types/qsm-question-type-dropdown.php +++ b/php/question-types/qsm-question-type-dropdown.php @@ -60,7 +60,7 @@ function qmn_drop_down_display( $id, $question, $answers ) { */ function qmn_drop_down_review( $id, $question, $answers ) { $current_question = new QSM_Question_Review_Choice( $id, $question, $answers ); - $current_question = apply_filters( 'qmn_drop_down_review_before', $id, $question, $answers, $current_question ); + $current_question = apply_filters( 'qmn_drop_down_review_before', $id, $question, $answers, $current_question ); $user_text_array = $current_question->get_user_answer(); $correct_text_array = $current_question->get_correct_answer(); $return_array['user_text'] = ! empty( $user_text_array ) ? implode( ', ', $user_text_array ) : '' ;