do_action( "learndash-{$context}-progress-bar-before", int $group_id, int $user_id )
Fires before the progress bar for any context.
Description #
The dynamic portion of the hook name, $context, refers to the context for which the hook is fired, such as course, lesson, topic, quiz, etc.
Parameters #
- $group_id
-
(int) Group ID.
- $user_id
-
(int) User ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash-{$context}-progress-bar-before action.
*/
add_action(
'learndash-lesson-progress-bar-before',
function( $course_id, $user_id ) {
// May add any custom logic using $course_id, $user_id
},
10,
2
);
Changelog #
| Version | Description |
|---|---|
| 3.2.0 | Introduced. |