Action
tin-canny-learndash-reporting
uo_tincanny_reporting_questions_table_tbody_afterbegin
Fires after the opening tag of the table body for tincanny reporting questions.
add_action( 'uo_tincanny_reporting_questions_table_tbody_afterbegin', $callback, 10, 1 );
Description
Fired after the opening `
` tag and before the first table row for questions in the Tincanny Questions Report. Developers can use this hook to insert custom content, such as additional header information or filters, directly into the table body before question data begins.Usage
add_action( 'uo_tincanny_reporting_questions_table_tbody_afterbegin', 'your_function_name', 10, 1 );
Examples
/**
* Adds a new column to the Uncanny Toolkit's Tincanny reporting questions table.
*
* This example demonstrates how to hook into 'uo_tincanny_reporting_questions_table_tbody_afterbegin'
* to inject custom content immediately after the tbody tag begins, before the first question row.
*
* We'll add a small introductory message or a note to the report.
*
* @since 1.0.0
*/
add_action( 'uo_tincanny_reporting_questions_table_tbody_afterbegin', 'my_custom_tincanny_report_intro', 10 );
/**
* Callback function for the 'uo_tincanny_reporting_questions_table_tbody_afterbegin' action hook.
*
* Outputs a simple introductory message before the question rows in the Tincanny report.
*/
function my_custom_tincanny_report_intro() {
// Example: Add a small note before the questions start.
// This could be useful for providing context or instructions to the report viewer.
echo '<tr class="custom-report-note"><td colspan="100%"><em>Note: This report displays questions from the most recent quiz attempts.</em></td></tr>';
}
Placement
This code should be placed in the functions.php file of your active theme, a custom plugin, or using a code snippets plugin.
Source Code
src/uncanny-question-analysis-report/question-analysis-report.php:912
<?php } ?>
<?php do_action( 'uo_tincanny_reporting_questions_table_thead_beforeend' ); ?>
</tr>
</thead>
<tbody>
<?php do_action( 'uo_tincanny_reporting_questions_table_tbody_afterbegin' ); ?>
<?php foreach ( $questions as $question ) { ?>
<tr>
<!-- Question Title -->
<td class="report-data question-title"><?php echo esc_html( $question->question_title ); ?></td>
<!-- Question -->