Browse: Home / Hooks /

learndash_report_column_item

apply_filters( 'learndash_report_column_item' )

Learndash ProPanel Download Course Activity Rows Template


Description #


Parameters #

$activity

array of Objects based on returned values from the LearnDash core reporting function learndash_report_course_users_progress(), A typical object structure will be something like the following. But this is filterable. See LearnDash core docs for details. activity<pre>stdClass Object ( [user_id] => 6 [user_display_name] => subscriber three [user_email] => [email protected] [post_id] => 53 [post_title] => Course [post_type] => sfwd-courses [activity_id] => 29 [activity_type] => course [activity_started] => 1471529028 [activity_completed] => [activity_status] => 0 [activity_started_formatted] => August 18, 2016 10:03:48 [activity_meta] => Array ( [steps_total] => 6 [steps_completed] => 4 [last_id] => 132 [steps_last_id] => 72 ) )

$header_key

string header to be user for column output. This should match your output logic switch/case logic in this template.


Source #

File: includes/reports/templates/ld-propanel-reporting-columns.php


Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 <?php
/**
 * Example usage for learndash_report_column_item filter.
 */
add_filter(
	'learndash_report_column_item',
	function( $column_value, $column_key, $report_item, $report_user, $data_slug ) {
		// May add any custom logic using $column_value, $column_key, $report_item, $report_user, $data_slug.

		// Always return $column_value.
		return $column_value;
	},
	10,
	5
);
 

Changelog #

Changelog
Version Description
4.17.0 Introduced.