do_action( "learndash-content-tabs-{$tab[‘id’]}-after", int|false $post_id, string $context, int $course_id, int $user_id )
Fires after any tab.
Description #
The dynamic portion of the hook name, $tab['id], refers to the id of the tab.
Parameters #
- $post_id
-
(int|false) Post ID.
- $context
-
(string) The context for which the hook is fired such as
course, etc.,quizlesson,topic, - $course_id
-
(int) Course 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-content-tabs-{$tab['id']}-after action.
*/
add_action(
'learndash-content-tabs-materials-after',
function( $post_id, $context, $course_id, $user_id ) {
// May add any custom logic using $post_id, $context, $course_id, $user_id
},
10,
4
);
Changelog #
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |