1. Home
  2. Docs
  3. Developer Info & API
  4. Hooks and Filters

Hooks and Filters

Here is a quick list of all of the hooks and filters inside the plugin.

Hooks

No.Hook NameFile
1qsm_welcome_panelphp/admin/admin-dashboard.php
2qsm_below_admin_resultsphp/admin/admin-results-details-page.php
3qsm_before_delete_resultphp/admin/admin-results-page.php
4qsm_add_after_default_themephp/admin/functions.php
5qsm_add_after_themesphp/admin/functions.php
6qsm_after_send_email_labelphp/admin/options-page-email-tab.php
7qsm_email_condition_criteriaphp/admin/options-page-email-tab.php
8qsm_email_extra_condition_fieldsphp/admin/options-page-email-tab.php
9qsm_email_condition_operatorphp/admin/options-page-email-tab.php
10qsm_email_condition_valuephp/admin/options-page-email-tab.php
11qsm_after_optionsphp/admin/options-page-questions-tab.php
12qsm_question_form_fieldsphp/admin/options-page-questions-tab.php
13qsm_question_form_fields_sidephp/admin/options-page-questions-tab.php
14qsm_action_quiz_page_attributes_fieldsphp/admin/options-page-questions-tab.php
15qsm_admin_single_answer_option_fieldsphp/admin/options-page-questions-tab.php
16qsm_admin_after_single_answer_templatephp/admin/options-page-questions-tab.php
17qsm_results_page_condition_criteriaphp/admin/options-page-results-page-tab.php
18qsm_results_page_extra_condition_fieldsphp/admin/options-page-results-page-tab.php
19qsm_results_page_condition_operatorphp/admin/options-page-results-page-tab.php
20qsm_results_page_condition_valuephp/admin/options-page-results-page-tab.php
21qsm_add_filter_menuphp/admin/options-page-style-tab.php
22qsm_before_delete_quizphp/admin/quizzes-page.php
23qmn_quiz_taken_stats_optionsphp/admin/stats-page.php
24wp_pre_insert_qmn_logphp/classes/class-qmn-log-manager.php
25wp_post_insert_qmn_logphp/classes/class-qmn-log-manager.php
26qsm_after_questionphp/classes/class-qmn-plugin-helper.php
27qmn_quiz_createdphp/classes/class-qmn-quiz-creator.php
(Based on WordPress’s default functionality, it is not possible to call the same hook twice with the same priority. To make it work you need to change its priority)
28qmn_quiz_deletedphp/classes/class-qmn-quiz-creator.php
29qsm_quiz_name_editedphp/classes/class-qmn-quiz-creator.php
30qmn_quiz_name_editedphp/classes/class-qmn-quiz-creator.php
31qmn_quiz_duplicatedphp/classes/class-qmn-quiz-creator.php
32qsm_enqueue_script_stylephp/classes/class-qmn-quiz-manager.php
33qsm_before_end_quiz_formphp/classes/class-qmn-quiz-manager.php
34qsm_after_begin_messagephp/classes/class-qmn-quiz-manager.php
35qsm_action_before_pagephp/classes/class-qmn-quiz-manager.php
36mlw_qmn_end_quiz_sectionphp/classes/class-qmn-quiz-manager.php
37qsm_after_all_sectionphp/classes/class-qmn-quiz-manager.php
38qsm_quiz_submittedphp/classes/class-qmn-quiz-manager.php
39mlw_qmn_load_results_pagephp/classes/class-qmn-quiz-manager.php
40qsm_extra_contact_filedphp/classes/class-qsm-contact-manager.php
41qsm_contact_fields_endphp/classes/class-qsm-contact-manager.php
42qsm_extra_setting_fieldsphp/classes/class-qsm-install.php
43qsm_before_results_pagephp/classes/class-qsm-results-pages.php
44qsm_after_results_pagephp/classes/class-qsm-results-pages.php
45qsm_save_result_pagesphp/classes/class-qsm-results-pages.php
46qsm_saved_question_dataphp/rest-api.php

Filters

No.Hook NameFile
1qsm_dashboard_widgetphp/admin/admin-dashboard.php
2qsm_quiz_wizard_settings_option_savephp/admin/admin-dashboard.php
3mlw_qmn_template_variable_results_arrayphp/admin/admin-results-details-page.php
4qsm_admin_results_details_page_allow_htmlphp/admin/admin-results-details-page.php
5qsm_results_delete_clausephp/admin/admin-results-page.php
6mlw_qmn_admin_results_page_headingsphp/admin/admin-results-page.php
7mlw_qmn_admin_results_page_column_contentphp/admin/admin-results-page.php
8mlw_qmn_admin_results_page_resultphp/admin/admin-results-page.php
9qsm_quiz_wizard_settings_optionphp/admin/functions.php
10qsm_text_variable_listphp/admin/functions.php
11qsm_text_variable_list_emailphp/admin/options-page-email-tab.php
12qsm_filter_quiz_page_attributesphp/admin/options-page-questions-tab.php
13qsm_question_type_descriptionphp/admin/options-page-questions-tab.php
14qsm_polar_classphp/admin/options-page-questions-tab.php
15qsm_question_advanced_optionphp/admin/options-page-questions-tab.php
16qsm_question_format_optionphp/admin/options-page-questions-tab.php
17qsm_question_category_optionphp/admin/options-page-questions-tab.php
18qsm_question_advanced_optionphp/admin/options-page-questions-tab.php
19qsm_text_variable_list_resultphp/admin/options-page-results-page-tab.php
20qsm_theme_settingsphp/admin/options-page-style-tab.php
21qsm_text_allowed_variablesphp/admin/options-page-text-tab.php
22quiz_query_condition_clausephp/admin/quizzes-page.php
23quiz_query_condition_clausephp/admin/quizzes-page.php
24qmn_quiz_taken_stats_load_statsphp/admin/stats-page.php
25qsm_alert_messagesphp/classes/class-qmn-alert-manager.php
26qsm_warning_messagesphp/classes/class-qmn-alert-manager.php
27qmn_log_typesphp/classes/class-qmn-log-manager.php
28qmn_log_post_type_argsphp/classes/class-qmn-log-manager.php
29quiz_query_delete_clausephp/classes/class-qmn-plugin-helper.php
30qsm_section_setting_textphp/classes/class-qmn-plugin-helper.php
31qsm_single_question_answersphp/classes/class-qmn-plugin-helper.php
32qmn_quiz_setting_tabsphp/classes/class-qmn-plugin-helper.php
33qms_preferred_date_formatphp/classes/class-qmn-plugin-helper.php
34qsm_file_upload_mime_typephp/classes/class-qmn-quiz-manager.php
35qsm_shortcode_quiz_optionsphp/classes/class-qmn-quiz-manager.php
36qmn_begin_shortcodephp/classes/class-qmn-quiz-manager.php
37qmn_json_dataphp/classes/class-qmn-quiz-manager.php
38qmn_end_shortcodephp/classes/class-qmn-quiz-manager.php
39qsm_load_questions_idsphp/classes/class-qmn-quiz-manager.php
40qsm_load_questions_idsphp/classes/class-qmn-quiz-manager.php
41qsm_load_questions_filterphp/classes/class-qmn-quiz-manager.php
42qmn_begin_quizphp/classes/class-qmn-quiz-manager.php
43qsm_display_before_formphp/classes/class-qmn-quiz-manager.php
44qmn_begin_quiz_formphp/classes/class-qmn-quiz-manager.php
45qmn_begin_quiz_questionsphp/classes/class-qmn-quiz-manager.php
46qmn_before_comment_sectionphp/classes/class-qmn-quiz-manager.php
47qmn_after_comment_sectionphp/classes/class-qmn-quiz-manager.php
48qmn_before_error_messagephp/classes/class-qmn-quiz-manager.php
49qmn_end_quiz_formphp/classes/class-qmn-quiz-manager.php
50qmn_end_quizphp/classes/class-qmn-quiz-manager.php
51mlw_qmn_template_variable_quiz_pagephp/classes/class-qmn-quiz-manager.php
52qsm_display_pagesphp/classes/class-qmn-quiz-manager.php
53qsm_total_pages_countphp/classes/class-qmn-quiz-manager.php
54qsm_auto_page_begin_rowphp/classes/class-qmn-quiz-manager.php
55qmn_begin_resultsphp/classes/class-qmn-quiz-manager.php
56qsm_result_variablesphp/classes/class-qmn-quiz-manager.php
57qmn_after_check_answersphp/classes/class-qmn-quiz-manager.php
58qmn_after_check_commentsphp/classes/class-qmn-quiz-manager.php
59qsm_results_arrayphp/classes/class-qmn-quiz-manager.php
60qmn_after_results_textphp/classes/class-qmn-quiz-manager.php
61qmn_after_social_mediaphp/classes/class-qmn-quiz-manager.php
62qsm_retake_quiz_textphp/classes/class-qmn-quiz-manager.php
63qmn_filter_email_contentphp/classes/class-qmn-quiz-manager.php
64qmn_after_send_user_emailphp/classes/class-qmn-quiz-manager.php
65qmn_after_send_admin_emailphp/classes/class-qmn-quiz-manager.php
66qmn_end_resultsphp/classes/class-qmn-quiz-manager.php
67qmn_captcha_varification_failed_msgphp/classes/class-qmn-quiz-manager.php
68mlw_qmn_template_variable_results_pagephp/classes/class-qmn-quiz-manager.php
69qsm_submit_results_return_arrayphp/classes/class-qmn-quiz-manager.php
70qsm_result_question_typesphp/classes/class-qmn-quiz-manager.php
71qmn_results_arrayphp/classes/class-qmn-quiz-manager.php
72qmn_answer_arrayphp/classes/class-qmn-quiz-manager.php
73qsm_check_answers_resultsphp/classes/class-qmn-quiz-manager.php
74qmn_returned_commentsphp/classes/class-qmn-quiz-manager.php
75qsm_single_answer_arrphp/classes/class-qmn-quiz-manager.php
76qmn_returned_social_buttonsphp/classes/class-qmn-quiz-manager.php
77qsm_user_email_attachmentsphp/classes/class-qmn-quiz-manager.php
78qsm_admin_contact_label_disallow_htmlphp/classes/class-qsm-contact-manager.php
79qsm_email_condition_checkphp/classes/class-qsm-emails.php
80qsm_send_results_email_addressesphp/classes/class-qsm-emails.php
81qmn_email_template_variable_resultsphp/classes/class-qsm-emails.php
82qsm_send_results_email_headersphp/classes/class-qsm-emails.php
83qsm_user_email_attachmentsphp/classes/class-qsm-emails.php
84qsm_admin_email_attachmentsphp/classes/class-qsm-emails.php
85qsm_load_questionphp/classes/class-qsm-questions.php
86qsm_load_questions_by_pagesphp/classes/class-qsm-questions.php
87qsm_load_questionsphp/classes/class-qsm-questions.php
88qsm_answers_before_savephp/classes/class-qsm-questions.php
89qsm_trim_question_descriptionphp/classes/class-qsm-questions.php
90qsm_save_question_dataphp/classes/class-qsm-questions.php
91qsm_results_page_condition_checkphp/classes/class-qsm-results-pages.php
92qsm_admin_results_page_disallow_htmlphp/classes/class-qsm-results-pages.php
93qsm_filter_feature_image_sizephp/question-types/qsm-question-title.php
94qmn_captcha_display_frontphp/question-types/qsm-question-type-captcha.php
95qmn_date_display_frontphp/question-types/qsm-question-type-date.php
96qmn_date_reviewphp/question-types/qsm-question-type-date.php
97qmn_drop_down_display_frontphp/question-types/qsm-question-type-dropdown.php
98qmn_drop_down_reviewphp/question-types/qsm-question-type-dropdown.php
99qmn_file_upload_display_frontphp/question-types/qsm-question-type-file-upload.php
100qmn_file_upload_reviewphp/question-types/qsm-question-type-file-upload.php
101qmn_fill_blank_display_frontphp/question-types/qsm-question-type-fill-in-the-blanks.php
102qmn_fill_blank_reviewphp/question-types/qsm-question-type-fill-in-the-blanks.php
103qsm_answer_wrapper_classphp/question-types/qsm-question-type-multiple-choice-horizontal.php
104qsm_multiple_choice_horizontal_display_loopphp/question-types/qsm-question-type-multiple-choice-horizontal.php
105qmn_horizontal_multiple_choice_question_displayphp/question-types/qsm-question-type-multiple-choice-horizontal.php
106qmn_horizontal_multiple_choice_display_frontphp/question-types/qsm-question-type-multiple-choice-horizontal.php
107qmn_horizontal_multiple_choice_reviewphp/question-types/qsm-question-type-multiple-choice-horizontal.php
108qsm_multiple_choice_display_loopphp/question-types/qsm-question-type-multiple-choice.php
109qmn_multiple_choice_display_frontphp/question-types/qsm-question-type-multiple-choice.php
110qmn_multiple_choice_reviewphp/question-types/qsm-question-type-multiple-choice.php
111qmn_horizontal_multiple_response_display_frontphp/question-types/qsm-question-type-multiple-response-horizontal.php
112qmn_horizontal_multiple_response_reviewphp/question-types/qsm-question-type-multiple-response-horizontal.php
113qmn_multiple_response_display_frontphp/question-types/qsm-question-type-multiple-response.php
114qmn_multiple_response_reviewphp/question-types/qsm-question-type-multiple-response.php
115qmn_number_display_frontphp/question-types/qsm-question-type-number.php
116qmn_number_reviewphp/question-types/qsm-question-type-number.php
117qmn_accept_display_frontphp/question-types/qsm-question-type-opt-in.php
118qmn_large_open_display_frontphp/question-types/qsm-question-type-paragraph.php
119qmn_large_open_reviewphp/question-types/qsm-question-type-paragraph.php
120qmn_polar_reviewphp/question-types/qsm-question-type-polar.php
121qmn_small_open_display_frontphp/question-types/qsm-question-type-short-answer.php
122qmn_small_open_reviewphp/question-types/qsm-question-type-short-answer.php
123qsm_rest_api_filter_question_dataphp/rest-api.php
124qsm_section_setting_textphp/template-variables.php
125qsm_result_page_custom_default_templatephp/template-variables.php
126qsm_result_page_custom_user_answer_templatephp/template-variables.php
127qsm_result_page_custom_correct_answer_templatephp/template-variables.php
128qsm_question_answers_template_variablephp/template-variables.php
129qmn_variable_question_answersphp/template-variables.php
130qsm_question_max_pointphp/template-variables.php
131qmn_polar_display_frontphp/template-variables.php
132qsm_results_css_inlinerView File

qsm_result_css_inliner

The qsm_results_css_inliner filter allows you to add the inline CSS of responses in emails.

Add the following example code in the theme functions file (functions.php)

add_filter('qsm_results_css_inliner','qsm_custom_results_css_inliner',20);
function qsm_custom_results_css_inliner( $html ) {

	$incorrect_answer = "<span style='color:#222222;display:block;margin-bottom:5px;'>";
	$correct_answer   = "<span style='color:red;display:block;margin-bottom:5px;'>&#10003;";
	$simple_answer    = "<span style='color:#808080;display:block;margin-bottom:5px;'>&#8226;&nbsp;";
	$html             = str_replace( '<br/>', '<br>', $html );
	$html             = str_replace( '<br />', '<br>', $html );
	$html             = str_replace( '<span class="qsm-text-wrong-option qmn_image_option">', "$incorrect_answer ", $html );
	$html             = str_replace( '<span class="qsm-text-correct-option qmn_image_option">', "$correct_answer ", $html );
	$html             = str_replace( '<span class="qsm-text-correct-option qsm-text-user-correct-answer qmn_image_option">', "$correct_answer ", $html );
	$html             = str_replace( '<span class="qsm-text-simple-option qmn_image_option">', "$simple_answer ", $html );
	$html             = str_replace( '<span class="qsm-text-correct-option qsm-text-user-correct-answer ">', "$correct_answer ", $html );
	$html             = str_replace( '<span class="qsm-text-simple-option ">', "$simple_answer ", $html );
	$html             = str_replace( '<span class="qsm-text-wrong-option ">', "$incorrect_answer ", $html );
	$html             = str_replace( '<span class="qsm-text-correct-option ">', "$correct_answer ", $html );
	$html             = str_replace( '<span class="qmn_user_incorrect_answer">', "$incorrect_answer ", $html );
	$html             = str_replace( '<span class="qmn_user_correct_answer qsm-text-correct-option qsm-text-user-correct-answer">', "$correct_answer ", $html );
	$html             = str_replace( "class='qmn_question_answer", "style='margin-bottom:30px' class='", $html );

	return $html;
}
Tags ,

Educators & Professional Web Developers, Try QSM!

4.9 / 5
Over 1 million downloads

Subscribe to Our Newsletter

Get weekly updates, no spam guaranteed we promise ✌️