uo_tincanny_reporting_questions_table_afterend
Fires after the Tincanny reporting questions table has finished rendering.
add_action( 'uo_tincanny_reporting_questions_table_afterend', $callback, 10, 1 );
Description
Fires after the Uncanny Toolkit question analysis report table has been rendered. Use this hook to append custom content, modify the table's DOM, or perform actions after the question analysis report data is displayed. No specific parameters are passed.
Usage
add_action( 'uo_tincanny_reporting_questions_table_afterend', 'your_function_name', 10, 1 );
Examples
<?php
/**
* Example: Add a custom message or element after the Uncanny Toolkit Tincanny questions report table.
*
* This function will be hooked into the 'uo_tincanny_reporting_questions_table_afterend' action,
* which fires immediately after the main questions report table has been rendered.
*
* We'll use this to display a subtle notice to the user, perhaps indicating that the
* table data is a snapshot or that there are further details available elsewhere.
*
* The hook does not pass any parameters to the callback function.
*/
function my_uncanny_tincanny_report_extra_info() {
// Ensure we are within the context of an admin page or a page where this report is relevant.
// This is a basic check and might need refinement depending on where the report is displayed.
if ( ! is_admin() ) {
return;
}
// Display a simple informational message below the table.
// We'll use a div with some basic styling to make it stand out slightly.
echo '<div class="uncanny-tincanny-report-notice" style="margin-top: 20px; padding: 15px; background-color: #f0f8ff; border-left: 5px solid #4682b4; color: #333;">';
echo '<strong>Note:</strong> The data displayed in the table above represents a snapshot of user responses for the selected period. For more detailed analytics, please refer to the individual lesson reports.';
echo '</div>';
}
// Add the action hook.
// The second parameter, '10', is the priority (default).
// The third parameter, '0', indicates that the callback function accepts 0 arguments.
add_action( 'uo_tincanny_reporting_questions_table_afterend', 'my_uncanny_tincanny_report_extra_info', 10, 0 );
?>
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:988
<?php foreach ( self::$columns as $col ) { ?>
<th><?php echo $col; ?></th>
<?php } ?>
</tr>
</tfoot>
</table>
<?php do_action( 'uo_tincanny_reporting_questions_table_afterend' ); ?>
</div>
</div>
<?php
return ob_get_clean();
}
/**