Browse: Home / Hooks /

learndash-get-user-stats

apply_filters_deprecated( 'learndash-get-user-stats',  array{ ,  int $user_id )

Filters LearnDash user stats. Used to modify user details like courses, points, certificates.


Description #


Parameters #

(array{) courses: int, completed: int, points: int, certificates: int } $stats User statistics.

$user_id

(int) User ID.


Source #

File: themes/ld30/includes/helpers.php


Examples #

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

 <?php
/**
 * Example usage for learndash_30_focus_mode_width filter.
 */
add_filter(
	'learndash_30_focus_mode_width',
	function( $focus_width_setting ) {
		// May add any custom logic using $focus_width_setting.

		// Always return $focus_width_setting.
		return $focus_width_setting;
	}
);
 

Changelog #

Changelog
Version Description
3.0.0 Introduced.