Course Hooks
Use these hooks to adjust course lists, course cards, single-course templates, course player URLs, player header/footer loading, and default frontend styles.
Only custom MentorKit hooks from docs-lms/hook-metadata.json are documented here. Classic WordPress, WooCommerce, Polylang, Astra, and other external hooks are intentionally excluded.
Documented hooks: 42.
Documented Hooks
scorm_after_course_actions
Type: Action
Category: Course
Source: templates/single-scorm_package.php:263, templates/single-scorm_package_minimal.php:389
Status: Public
When It Runs
Fires after course actions. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
This hook is called from multiple source locations with different source signatures.
| Source | Callback parameters |
|---|---|
templates/single-scorm_package.php:263 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_course_status from $scorm_course_status$scorm_course_access from $scorm_course_access$scorm_wc_product from $scorm_wc_product$scorm_continue_url from $scorm_continue_url |
templates/single-scorm_package_minimal.php:389 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_progress_status from $scorm_progress_status$scorm_course_access from $scorm_course_access$scorm_wc_product from $scorm_wc_product$scorm_continue_url from $scorm_continue_url |
Example
add_action(
'scorm_after_course_actions',
function ( $scorm_course_id, $post, $scorm_has_access, $scorm_course_status, $scorm_course_access, $scorm_wc_product, $scorm_continue_url ) {
// Add your integration logic here.
},
10,
7
);
Notes
- Because the source signatures differ, write callbacks defensively when attaching the same callback across all contexts.
- Parameter names vary between call sites.
scorm_after_course_card
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:566
Status: Public
When It Runs
Fires after course card. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$has_access | $has_access | Additional context passed by the hook. |
$progress_status | $progress_status | Additional context passed by the hook. |
$wc_product | $wc_product | Additional context passed by the hook. |
Example
add_action(
'scorm_after_course_card',
function ( $course_id, $post, $course_access, $has_access, $progress_status, $wc_product ) {
// Add your integration logic here.
},
10,
6
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_course_card_actions
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:561
Status: Public
When It Runs
Fires after course card actions. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$has_access | $has_access | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$wc_product | $wc_product | Additional context passed by the hook. |
$progress_status | $progress_status | Additional context passed by the hook. |
Example
add_action(
'scorm_after_course_card_actions',
function ( $course_id, $post, $has_access, $course_access, $wc_product, $progress_status ) {
// Add your integration logic here.
},
10,
6
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_course_card_content
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:563
Status: Public
When It Runs
Fires after course card content. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$has_access | $has_access | Additional context passed by the hook. |
$progress_status | $progress_status | Additional context passed by the hook. |
Example
add_action(
'scorm_after_course_card_content',
function ( $course_id, $post, $course_access, $has_access, $progress_status ) {
// Add your integration logic here.
},
10,
5
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_course_card_media
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:455
Status: Public
When It Runs
Fires after course card media. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$has_access | $has_access | Additional context passed by the hook. |
$progress_status | $progress_status | Additional context passed by the hook. |
Example
add_action(
'scorm_after_course_card_media',
function ( $course_id, $post, $course_access, $has_access, $progress_status ) {
// Add your integration logic here.
},
10,
5
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_course_card_meta
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:486
Status: Public
When It Runs
Fires after course card meta. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$show_price | $show_price | Additional context passed by the hook. |
$show_level | $show_level | Additional context passed by the hook. |
$show_duration | $show_duration | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$wc_product | $wc_product | Additional context passed by the hook. |
Example
add_action(
'scorm_after_course_card_meta',
function ( $course_id, $post, $show_price, $show_level, $show_duration, $course_access, $wc_product ) {
// Add your integration logic here.
},
10,
7
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_course_content
Type: Action
Category: Course
Source: templates/single-scorm_package.php:303, templates/single-scorm_package_minimal.php:406
Status: Public
When It Runs
Fires after course content. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$scorm_course_id | $scorm_course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
Example
add_action(
'scorm_after_course_content',
function ( $scorm_course_id, $post ) {
// Add your integration logic here.
},
10,
2
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_course_info
Type: Action
Category: Course
Source: templates/single-scorm_package.php:265, templates/single-scorm_package_minimal.php:391
Status: Public
When It Runs
Fires after course info. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
This hook is called from multiple source locations with different source signatures.
| Source | Callback parameters |
|---|---|
templates/single-scorm_package.php:265 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_course_status from $scorm_course_status$scorm_course_access from $scorm_course_access |
templates/single-scorm_package_minimal.php:391 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_progress_status from $scorm_progress_status$scorm_course_access from $scorm_course_access |
Example
add_action(
'scorm_after_course_info',
function ( $scorm_course_id, $post, $scorm_has_access, $scorm_course_status, $scorm_course_access ) {
// Add your integration logic here.
},
10,
5
);
Notes
- Because the source signatures differ, write callbacks defensively when attaching the same callback across all contexts.
- Parameter names vary between call sites.
scorm_after_course_media
Type: Action
Category: Course
Source: templates/single-scorm_package.php:284, templates/single-scorm_package_minimal.php:180
Status: Public
When It Runs
Fires after course media. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$scorm_course_id | $scorm_course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
Example
add_action(
'scorm_after_course_media',
function ( $scorm_course_id, $post ) {
// Add your integration logic here.
},
10,
2
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_course_player
Type: Action
Category: Course
Source: templates/scorm-course-view.php:198
Status: Public
When It Runs
Fires after course player. The source call is inside templates/scorm-course-view.php.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$scorm_course_id | $scorm_course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$scorm_progress | $scorm_progress | Additional context passed by the hook. |
$scorm_course_access | $scorm_course_access | Additional context passed by the hook. |
Example
add_action(
'scorm_after_course_player',
function ( $scorm_course_id, $post, $scorm_progress, $scorm_course_access ) {
// Add your integration logic here.
},
10,
4
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_courses_grid
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:209
Status: Public
When It Runs
Fires after courses grid. The source call is inside SCORM_Courses_Grid_Shortcode::render_courses_grid().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$grid_id | $grid_id | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
$courses_query | $courses_query | Additional context passed by the hook. |
Example
add_action(
'scorm_after_courses_grid',
function ( $grid_id, $attributes, $courses_query ) {
// Add your integration logic here.
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_courses_grid_item
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:173
Status: Public
When It Runs
Fires after courses grid item. The source call is inside SCORM_Courses_Grid_Shortcode::render_courses_grid().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | get_the_ID() | Additional context passed by the hook. |
$grid_id | $grid_id | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
Example
add_action(
'scorm_after_courses_grid_item',
function ( $course_id, $grid_id, $attributes ) {
// Add your integration logic here.
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_courses_grid_loop
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:175
Status: Public
When It Runs
Fires after courses grid loop. The source call is inside SCORM_Courses_Grid_Shortcode::render_courses_grid().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$grid_id | $grid_id | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
$courses_query | $courses_query | Additional context passed by the hook. |
Example
add_action(
'scorm_after_courses_grid_loop',
function ( $grid_id, $attributes, $courses_query ) {
// Add your integration logic here.
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_courses_grid_pagination
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:206
Status: Public
When It Runs
Fires after courses grid pagination. The source call is inside SCORM_Courses_Grid_Shortcode::render_courses_grid().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$grid_id | $grid_id | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
$courses_query | $courses_query | Additional context passed by the hook. |
Example
add_action(
'scorm_after_courses_grid_pagination',
function ( $grid_id, $attributes, $courses_query ) {
// Add your integration logic here.
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_courses_grid_query
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:150
Status: Public
When It Runs
Fires after courses grid query. The source call is inside SCORM_Courses_Grid_Shortcode::render_courses_grid().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$courses_query | $courses_query | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
Example
add_action(
'scorm_after_courses_grid_query',
function ( $courses_query, $attributes ) {
// Add your integration logic here.
},
10,
2
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_after_single_course
Type: Action
Category: Course
Source: templates/single-scorm_package.php:350, templates/single-scorm_package_minimal.php:411
Status: Public
When It Runs
Fires after single course. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
This hook is called from multiple source locations with different source signatures.
| Source | Callback parameters |
|---|---|
templates/single-scorm_package.php:350 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_course_status from $scorm_course_status$scorm_course_access from $scorm_course_access |
templates/single-scorm_package_minimal.php:411 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_progress_status from $scorm_progress_status$scorm_course_access from $scorm_course_access |
Example
add_action(
'scorm_after_single_course',
function ( $scorm_course_id, $post, $scorm_has_access, $scorm_course_status, $scorm_course_access ) {
// Add your integration logic here.
},
10,
5
);
Notes
- Because the source signatures differ, write callbacks defensively when attaching the same callback across all contexts.
- Parameter names vary between call sites.
scorm_after_single_course_header
Type: Action
Category: Course
Source: templates/single-scorm_package.php:288, templates/single-scorm_package_minimal.php:395
Status: Public
When It Runs
Fires after single course header. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
This hook is called from multiple source locations with different source signatures.
| Source | Callback parameters |
|---|---|
templates/single-scorm_package.php:288 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_course_status from $scorm_course_status$scorm_course_access from $scorm_course_access |
templates/single-scorm_package_minimal.php:395 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_progress_status from $scorm_progress_status$scorm_course_access from $scorm_course_access |
Example
add_action(
'scorm_after_single_course_header',
function ( $scorm_course_id, $post, $scorm_has_access, $scorm_course_status, $scorm_course_access ) {
// Add your integration logic here.
},
10,
5
);
Notes
- Because the source signatures differ, write callbacks defensively when attaching the same callback across all contexts.
- Parameter names vary between call sites.
scorm_before_course_actions
Type: Action
Category: Course
Source: templates/single-scorm_package.php:230, templates/single-scorm_package_minimal.php:198
Status: Public
When It Runs
Fires before course actions. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
This hook is called from multiple source locations with different source signatures.
| Source | Callback parameters |
|---|---|
templates/single-scorm_package.php:230 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_course_status from $scorm_course_status$scorm_course_access from $scorm_course_access$scorm_wc_product from $scorm_wc_product$scorm_continue_url from $scorm_continue_url |
templates/single-scorm_package_minimal.php:198 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_progress_status from $scorm_progress_status$scorm_course_access from $scorm_course_access$scorm_wc_product from $scorm_wc_product$scorm_continue_url from $scorm_continue_url |
Example
add_action(
'scorm_before_course_actions',
function ( $scorm_course_id, $post, $scorm_has_access, $scorm_course_status, $scorm_course_access, $scorm_wc_product, $scorm_continue_url ) {
// Add your integration logic here.
},
10,
7
);
Notes
- Because the source signatures differ, write callbacks defensively when attaching the same callback across all contexts.
- Parameter names vary between call sites.
scorm_before_course_card
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:392
Status: Public
When It Runs
Fires before course card. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$has_access | $has_access | Additional context passed by the hook. |
$progress_status | $progress_status | Additional context passed by the hook. |
$wc_product | $wc_product | Additional context passed by the hook. |
Example
add_action(
'scorm_before_course_card',
function ( $course_id, $post, $course_access, $has_access, $progress_status, $wc_product ) {
// Add your integration logic here.
},
10,
6
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_course_card_actions
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:503
Status: Public
When It Runs
Fires before course card actions. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$has_access | $has_access | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$wc_product | $wc_product | Additional context passed by the hook. |
$progress_status | $progress_status | Additional context passed by the hook. |
Example
add_action(
'scorm_before_course_card_actions',
function ( $course_id, $post, $has_access, $course_access, $wc_product, $progress_status ) {
// Add your integration logic here.
},
10,
6
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_course_card_content
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:457
Status: Public
When It Runs
Fires before course card content. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$has_access | $has_access | Additional context passed by the hook. |
$progress_status | $progress_status | Additional context passed by the hook. |
Example
add_action(
'scorm_before_course_card_content',
function ( $course_id, $post, $course_access, $has_access, $progress_status ) {
// Add your integration logic here.
},
10,
5
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_course_card_media
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:415
Status: Public
When It Runs
Fires before course card media. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$has_access | $has_access | Additional context passed by the hook. |
$progress_status | $progress_status | Additional context passed by the hook. |
Example
add_action(
'scorm_before_course_card_media',
function ( $course_id, $post, $course_access, $has_access, $progress_status ) {
// Add your integration logic here.
},
10,
5
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_course_card_meta
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:463
Status: Public
When It Runs
Fires before course card meta. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$show_price | $show_price | Additional context passed by the hook. |
$show_level | $show_level | Additional context passed by the hook. |
$show_duration | $show_duration | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$wc_product | $wc_product | Additional context passed by the hook. |
Example
add_action(
'scorm_before_course_card_meta',
function ( $course_id, $post, $show_price, $show_level, $show_duration, $course_access, $wc_product ) {
// Add your integration logic here.
},
10,
7
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_course_content
Type: Action
Category: Course
Source: templates/single-scorm_package.php:290, templates/single-scorm_package_minimal.php:397
Status: Public
When It Runs
Fires before course content. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$scorm_course_id | $scorm_course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
Example
add_action(
'scorm_before_course_content',
function ( $scorm_course_id, $post ) {
// Add your integration logic here.
},
10,
2
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_course_info
Type: Action
Category: Course
Source: templates/single-scorm_package.php:163, templates/single-scorm_package_minimal.php:183
Status: Public
When It Runs
Fires before course info. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
This hook is called from multiple source locations with different source signatures.
| Source | Callback parameters |
|---|---|
templates/single-scorm_package.php:163 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_course_status from $scorm_course_status$scorm_course_access from $scorm_course_access |
templates/single-scorm_package_minimal.php:183 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_progress_status from $scorm_progress_status$scorm_course_access from $scorm_course_access |
Example
add_action(
'scorm_before_course_info',
function ( $scorm_course_id, $post, $scorm_has_access, $scorm_course_status, $scorm_course_access ) {
// Add your integration logic here.
},
10,
5
);
Notes
- Because the source signatures differ, write callbacks defensively when attaching the same callback across all contexts.
- Parameter names vary between call sites.
scorm_before_course_media
Type: Action
Category: Course
Source: templates/single-scorm_package.php:268, templates/single-scorm_package_minimal.php:152
Status: Public
When It Runs
Fires before course media. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$scorm_course_id | $scorm_course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
Example
add_action(
'scorm_before_course_media',
function ( $scorm_course_id, $post ) {
// Add your integration logic here.
},
10,
2
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_courses_grid
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:163
Status: Public
When It Runs
Fires before courses grid. The source call is inside SCORM_Courses_Grid_Shortcode::render_courses_grid().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$grid_id | $grid_id | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
$courses_query | $courses_query | Additional context passed by the hook. |
Example
add_action(
'scorm_before_courses_grid',
function ( $grid_id, $attributes, $courses_query ) {
// Add your integration logic here.
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_courses_grid_item
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:171
Status: Public
When It Runs
Fires before courses grid item. The source call is inside SCORM_Courses_Grid_Shortcode::render_courses_grid().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$course_id | get_the_ID() | Additional context passed by the hook. |
$grid_id | $grid_id | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
Example
add_action(
'scorm_before_courses_grid_item',
function ( $course_id, $grid_id, $attributes ) {
// Add your integration logic here.
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_courses_grid_loop
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:166
Status: Public
When It Runs
Fires before courses grid loop. The source call is inside SCORM_Courses_Grid_Shortcode::render_courses_grid().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$grid_id | $grid_id | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
$courses_query | $courses_query | Additional context passed by the hook. |
Example
add_action(
'scorm_before_courses_grid_loop',
function ( $grid_id, $attributes, $courses_query ) {
// Add your integration logic here.
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_courses_grid_pagination
Type: Action
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:179
Status: Public
When It Runs
Fires before courses grid pagination. The source call is inside SCORM_Courses_Grid_Shortcode::render_courses_grid().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$grid_id | $grid_id | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
$courses_query | $courses_query | Additional context passed by the hook. |
Example
add_action(
'scorm_before_courses_grid_pagination',
function ( $grid_id, $attributes, $courses_query ) {
// Add your integration logic here.
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_single_course
Type: Action
Category: Course
Source: templates/single-scorm_package.php:82, templates/single-scorm_package_minimal.php:136
Status: Public
When It Runs
Fires before single course. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
This hook is called from multiple source locations with different source signatures.
| Source | Callback parameters |
|---|---|
templates/single-scorm_package.php:82 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_course_status from $scorm_course_status$scorm_course_access from $scorm_course_access |
templates/single-scorm_package_minimal.php:136 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_progress_status from $scorm_progress_status$scorm_course_access from $scorm_course_access |
Example
add_action(
'scorm_before_single_course',
function ( $scorm_course_id, $post, $scorm_has_access, $scorm_course_status, $scorm_course_access ) {
// Add your integration logic here.
},
10,
5
);
Notes
- Because the source signatures differ, write callbacks defensively when attaching the same callback across all contexts.
- Parameter names vary between call sites.
scorm_before_single_course_header
Type: Action
Category: Course
Source: templates/single-scorm_package.php:158, templates/single-scorm_package_minimal.php:140
Status: Public
When It Runs
Fires before single course header. The source call is inside templates/single-scorm_package.php. This hook appears in 2 source locations.
Parameters
This hook is called from multiple source locations with different source signatures.
| Source | Callback parameters |
|---|---|
templates/single-scorm_package.php:158 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_course_status from $scorm_course_status$scorm_course_access from $scorm_course_access |
templates/single-scorm_package_minimal.php:140 | $scorm_course_id from $scorm_course_id$post from $post$scorm_has_access from $scorm_has_access$scorm_progress_status from $scorm_progress_status$scorm_course_access from $scorm_course_access |
Example
add_action(
'scorm_before_single_course_header',
function ( $scorm_course_id, $post, $scorm_has_access, $scorm_course_status, $scorm_course_access ) {
// Add your integration logic here.
},
10,
5
);
Notes
- Because the source signatures differ, write callbacks defensively when attaching the same callback across all contexts.
- Parameter names vary between call sites.
scorm_course_access_days
Type: Filter
Category: Course
Source: includes/core/course-access-expiry.php:84
Status: Public
When It Runs
Filters course access days. The source call is inside scorm_resolve_course_access_days(). Source context: Resolve the effective "access days" value for a (user, course) pair.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$days | $days | Value passed through the filter. Source default: $days. |
$course_id | $course_id | Additional context passed by the hook. |
$user_id | $user_id | Additional context passed by the hook. |
Return Value
Return the filtered $days value. Source default: $days. If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_course_access_days',
function ( $days, $course_id, $user_id ) {
return $days;
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_course_card_classes
Type: Filter
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:401
Status: Public
When It Runs
Filters course card classes. The source call is inside SCORM_Courses_Grid_Shortcode::render_course_card().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$classes | array('scorm-course-card', 'course-access-'. $course_access) | Value passed through the filter. Source default: array('scorm-course-card', 'course-access-'. $course_access). |
$course_id | $course_id | Additional context passed by the hook. |
$post | $post | Additional context passed by the hook. |
$course_access | $course_access | Additional context passed by the hook. |
$has_access | $has_access | Additional context passed by the hook. |
$progress_status | $progress_status | Additional context passed by the hook. |
Return Value
Return the filtered $classes value. Source default: array('scorm-course-card', 'course-access-'. $course_access). If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_course_card_classes',
function ( $classes, $course_id, $post, $course_access, $has_access, $progress_status ) {
return $classes;
},
10,
6
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_course_is_satisfied
Type: Filter
Category: Course
Source: includes/frontend/group-path.php:133
Status: Public
When It Runs
Filters course is satisfied. The source call is inside scorm_course_is_satisfied(). Source context: Whether a lesson is satisfied for a user, per its own completion rule.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$satisfied | $satisfied | Value passed through the filter. Source default: $satisfied. |
$user_id | $user_id | Additional context passed by the hook. |
$course_id | $course_id | Additional context passed by the hook. |
$status | $status | Additional context passed by the hook. |
$rule | $rule | Additional context passed by the hook. |
Return Value
Return the filtered $satisfied value. Source default: $satisfied. If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_course_is_satisfied',
function ( $satisfied, $user_id, $course_id, $status, $rule ) {
return $satisfied;
},
10,
5
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_courses_grid_query_args
Type: Filter
Category: Course
Source: includes/frontend/courses-grid-shortcode.php:144
Status: Public
When It Runs
Filters courses grid query args. The source call is inside SCORM_Courses_Grid_Shortcode::render_courses_grid().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$query_args | $query_args | Value passed through the filter. Source default: $query_args. |
$attributes | $attributes | Additional context passed by the hook. |
Return Value
Return the filtered $query_args value. Source default: $query_args. If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_courses_grid_query_args',
function ( $query_args, $attributes ) {
return $query_args;
},
10,
2
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_minimal_footer
Type: Action
Category: Course
Source: templates/footer-scorm-min.php:39
Status: Public
When It Runs
Fires inside MentorKit's bundled minimal SCORM footer, after the site name and before the footer container closes. Use it to add small footer links, compliance text, or other markup to the minimal course template footer.
Parameters
This hook does not pass callback parameters.
Example
add_action(
'scorm_minimal_footer',
function () {
// Add your integration logic here.
},
10,
0
);
Notes
- This hook only runs when the bundled
footer-scorm-min.phptemplate is included. It will not run when the course view uses a theme-provided footer instead.
scorm_player_course_view_segment
Type: Filter
Category: Course
Source: includes/core/url-helpers.php:57
Status: Public
When It Runs
Filters course view segment. The source call is inside scorm_player_course_view_segment(). Source context: Return the custom course-view segment appended to course permalinks.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$segment | $segment | Value passed through the filter. Source default: $segment. |
Return Value
Return the filtered $segment value. Source default: $segment. If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_player_course_view_segment',
function ( $segment ) {
return $segment;
},
10,
1
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_player_disable_default_styles
Type: Filter
Category: Course
Source: includes/enqueue.php:108
Status: Public
When It Runs
Filters the late frontend style kill switch after MentorKit has enqueued its course, group, auth, and profile styles. Return true to dequeue and deregister the default MentorKit style handles; return false to leave them active.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$disable_defaults | $disable_defaults | Boolean value from the scorm_disable_default_styles option. Source default: $disable_defaults. |
Return Value
Return a boolean. true disables the default style handles, while false keeps them enqueued.
Example
add_filter(
'scorm_player_disable_default_styles',
function ( $disable_defaults ) {
return $disable_defaults;
},
10,
1
);
Notes
- This filter runs late on
wp_enqueue_scripts, so it can override both the stored setting and earlier enqueue decisions.
scorm_player_footer_template
Type: Filter
Category: Course
Source: templates/scorm-course-view.php:706
Status: Public
When It Runs
Filters the fallback footer template path used by the full SCORM course player when MentorKit is not using the theme SCORM footer. Return an absolute path to a readable PHP template.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$template | plugin_dir_path( __FILE__ ) . 'footer-scorm.php' | Absolute path to the bundled fallback footer template. |
Return Value
Return the footer template path. If the returned file does not exist, MentorKit falls back to get_footer().
Example
add_filter(
'scorm_player_footer_template',
function ( $template ) {
return $template;
},
10,
1
);
Notes
- This filter only runs in the fallback template path. If
scorm_player_use_theme_headermakes the player use the theme header/footer, MentorKit callsget_footer( 'scorm' )instead.
scorm_player_header_template
Type: Filter
Category: Course
Source: templates/scorm-course-view.php:63
Status: Public
When It Runs
Filters the fallback header template path used by the full SCORM course player when no theme header-scorm.php template is available. Return an absolute path to a readable PHP template.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$template | plugin_dir_path( __FILE__ ) . 'header-scorm.php' | Absolute path to the bundled fallback header template. |
Return Value
Return the header template path. If the returned file does not exist, MentorKit falls back to get_header().
Example
add_filter(
'scorm_player_header_template',
function ( $template ) {
return $template;
},
10,
1
);
Notes
- This filter is skipped when the theme provides
header-scorm.phpor whenscorm_player_use_theme_headerreturnstrue.
scorm_player_use_theme_header
Type: Filter
Category: Course
Source: templates/scorm-course-view.php:54
Status: Public
When It Runs
Filters whether the full SCORM course player should use the theme SCORM header/footer pair instead of MentorKit's bundled player header and footer templates.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$use_theme_header | false | Boolean flag. Source default: false. |
Return Value
Return true to force get_header( 'scorm' ) and get_footer( 'scorm' ). Return false to let MentorKit use the theme header-scorm.php if present or fall back to the bundled templates.
Example
add_filter(
'scorm_player_use_theme_header',
function ( $use_theme_header ) {
return $use_theme_header;
},
10,
1
);
Notes
- Use this when a theme or site builder should own the course player chrome around the SCORM content.