Action tin-canny-learndash-reporting

tincanny_reporting_user_report_after_begin

Fires after the user report generation begins in the Tincanny reporting core integration.

add_action( 'tincanny_reporting_user_report_after_begin', $callback, 10, 1 );

Description

Fires after the main user report container begins. Developers can use this hook to add custom content or modify the report structure immediately after the user report tab is initialized, before navigation elements are displayed.


Usage

add_action( 'tincanny_reporting_user_report_after_begin', 'your_function_name', 10, 1 );

Examples

add_action( 'tincanny_reporting_user_report_after_begin', 'my_tincanny_custom_user_report_header_message', 10, 0 );
/**
 * Adds a custom message or element right after the Tin Can Reporting user report section begins.
 * This could be used for displaying a summary, a warning, or additional contextual information.
 */
function my_tincanny_custom_user_report_header_message() {
	// Check if we are on a specific user report page (assuming some logic might determine this)
	// For this example, let's just display a static message.
	?>
	<div class="my-custom-tincanny-report-message" style="background-color: #e0f7fa; padding: 15px; margin-bottom: 20px; border-left: 5px solid #00acc1; font-size: 1.1em;">
		<?php esc_html_e( 'Welcome to the detailed user report. Please review the data below carefully.', 'your-text-domain' ); ?>
		<br>
		<?php esc_html_e( 'If you need to export this data, please use the export button at the top right.', 'your-text-domain' ); ?>
	</div>
	<?php
}

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/reporting/learndash/templates/user-report-tab.php:12

die;
}

?>

<div class="uo-admin-reporting-tab-single" id="userReportTab" style="display: block">

	<?php do_action( 'tincanny_reporting_user_report_after_begin' ); ?>
	<?php if( false === TinCannyShortcode::$is_independent_shortcode || is_admin() ){  ?>
	<div id="reporting-user-navigation" class="reporting-breadcrumbs">
		<ul class="reporting-breadcrumbs-items">
			<li class="reporting-breadcrumbs-item reporting-breadcrumbs-item--guide">
				<span><?php _e( 'Tin Canny Reports', 'uncanny-learndash-reporting' ); ?></span>
			</li>
			<li id="user-navigate-link" class="reporting-breadcrumbs-item reporting-breadcrumbs-item--visible reporting-breadcrumbs-item--current">

Scroll to Top