Skip to main content

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​

HookTypeStatus
scorm_after_course_actionsActionPublic
scorm_after_course_cardActionPublic
scorm_after_course_card_actionsActionPublic
scorm_after_course_card_contentActionPublic
scorm_after_course_card_mediaActionPublic
scorm_after_course_card_metaActionPublic
scorm_after_course_contentActionPublic
scorm_after_course_infoActionPublic
scorm_after_course_mediaActionPublic
scorm_after_course_playerActionPublic
scorm_after_courses_gridActionPublic
scorm_after_courses_grid_itemActionPublic
scorm_after_courses_grid_loopActionPublic
scorm_after_courses_grid_paginationActionPublic
scorm_after_courses_grid_queryActionPublic
scorm_after_single_courseActionPublic
scorm_after_single_course_headerActionPublic
scorm_before_course_actionsActionPublic
scorm_before_course_cardActionPublic
scorm_before_course_card_actionsActionPublic
scorm_before_course_card_contentActionPublic
scorm_before_course_card_mediaActionPublic
scorm_before_course_card_metaActionPublic
scorm_before_course_contentActionPublic
scorm_before_course_infoActionPublic
scorm_before_course_mediaActionPublic
scorm_before_courses_gridActionPublic
scorm_before_courses_grid_itemActionPublic
scorm_before_courses_grid_loopActionPublic
scorm_before_courses_grid_paginationActionPublic
scorm_before_single_courseActionPublic
scorm_before_single_course_headerActionPublic
scorm_course_access_daysFilterPublic
scorm_course_card_classesFilterPublic
scorm_course_is_satisfiedFilterPublic
scorm_courses_grid_query_argsFilterPublic
scorm_minimal_footerActionPublic
scorm_player_course_view_segmentFilterPublic
scorm_player_disable_default_stylesFilterPublic
scorm_player_footer_templateFilterPublic
scorm_player_header_templateFilterPublic
scorm_player_use_theme_headerFilterPublic

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.

SourceCallback 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 parameterSource valueNotes
$course_id$course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$has_access$has_accessAdditional context passed by the hook.
$progress_status$progress_statusAdditional context passed by the hook.
$wc_product$wc_productAdditional 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 parameterSource valueNotes
$course_id$course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$has_access$has_accessAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$wc_product$wc_productAdditional context passed by the hook.
$progress_status$progress_statusAdditional 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 parameterSource valueNotes
$course_id$course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$has_access$has_accessAdditional context passed by the hook.
$progress_status$progress_statusAdditional 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 parameterSource valueNotes
$course_id$course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$has_access$has_accessAdditional context passed by the hook.
$progress_status$progress_statusAdditional 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 parameterSource valueNotes
$course_id$course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$show_price$show_priceAdditional context passed by the hook.
$show_level$show_levelAdditional context passed by the hook.
$show_duration$show_durationAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$wc_product$wc_productAdditional 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 parameterSource valueNotes
$scorm_course_id$scorm_course_idAdditional context passed by the hook.
$post$postAdditional 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.

SourceCallback 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 parameterSource valueNotes
$scorm_course_id$scorm_course_idAdditional context passed by the hook.
$post$postAdditional 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 parameterSource valueNotes
$scorm_course_id$scorm_course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$scorm_progress$scorm_progressAdditional context passed by the hook.
$scorm_course_access$scorm_course_accessAdditional 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 parameterSource valueNotes
$grid_id$grid_idAdditional context passed by the hook.
$attributes$attributesAdditional context passed by the hook.
$courses_query$courses_queryAdditional 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 parameterSource valueNotes
$course_idget_the_ID()Additional context passed by the hook.
$grid_id$grid_idAdditional context passed by the hook.
$attributes$attributesAdditional 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 parameterSource valueNotes
$grid_id$grid_idAdditional context passed by the hook.
$attributes$attributesAdditional context passed by the hook.
$courses_query$courses_queryAdditional 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 parameterSource valueNotes
$grid_id$grid_idAdditional context passed by the hook.
$attributes$attributesAdditional context passed by the hook.
$courses_query$courses_queryAdditional 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 parameterSource valueNotes
$courses_query$courses_queryAdditional context passed by the hook.
$attributes$attributesAdditional 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.

SourceCallback 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.

SourceCallback 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.

SourceCallback 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 parameterSource valueNotes
$course_id$course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$has_access$has_accessAdditional context passed by the hook.
$progress_status$progress_statusAdditional context passed by the hook.
$wc_product$wc_productAdditional 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 parameterSource valueNotes
$course_id$course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$has_access$has_accessAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$wc_product$wc_productAdditional context passed by the hook.
$progress_status$progress_statusAdditional 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 parameterSource valueNotes
$course_id$course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$has_access$has_accessAdditional context passed by the hook.
$progress_status$progress_statusAdditional 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 parameterSource valueNotes
$course_id$course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$has_access$has_accessAdditional context passed by the hook.
$progress_status$progress_statusAdditional 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 parameterSource valueNotes
$course_id$course_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$show_price$show_priceAdditional context passed by the hook.
$show_level$show_levelAdditional context passed by the hook.
$show_duration$show_durationAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$wc_product$wc_productAdditional 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 parameterSource valueNotes
$scorm_course_id$scorm_course_idAdditional context passed by the hook.
$post$postAdditional 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.

SourceCallback 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 parameterSource valueNotes
$scorm_course_id$scorm_course_idAdditional context passed by the hook.
$post$postAdditional 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 parameterSource valueNotes
$grid_id$grid_idAdditional context passed by the hook.
$attributes$attributesAdditional context passed by the hook.
$courses_query$courses_queryAdditional 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 parameterSource valueNotes
$course_idget_the_ID()Additional context passed by the hook.
$grid_id$grid_idAdditional context passed by the hook.
$attributes$attributesAdditional 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 parameterSource valueNotes
$grid_id$grid_idAdditional context passed by the hook.
$attributes$attributesAdditional context passed by the hook.
$courses_query$courses_queryAdditional 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 parameterSource valueNotes
$grid_id$grid_idAdditional context passed by the hook.
$attributes$attributesAdditional context passed by the hook.
$courses_query$courses_queryAdditional 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.

SourceCallback 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.

SourceCallback 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 parameterSource valueNotes
$days$daysValue passed through the filter. Source default: $days.
$course_id$course_idAdditional context passed by the hook.
$user_id$user_idAdditional 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 parameterSource valueNotes
$classesarray('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_idAdditional context passed by the hook.
$post$postAdditional context passed by the hook.
$course_access$course_accessAdditional context passed by the hook.
$has_access$has_accessAdditional context passed by the hook.
$progress_status$progress_statusAdditional 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 parameterSource valueNotes
$satisfied$satisfiedValue passed through the filter. Source default: $satisfied.
$user_id$user_idAdditional context passed by the hook.
$course_id$course_idAdditional context passed by the hook.
$status$statusAdditional context passed by the hook.
$rule$ruleAdditional 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 parameterSource valueNotes
$query_args$query_argsValue passed through the filter. Source default: $query_args.
$attributes$attributesAdditional 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.

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.php template 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 parameterSource valueNotes
$segment$segmentValue 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 parameterSource valueNotes
$disable_defaults$disable_defaultsBoolean 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.

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 parameterSource valueNotes
$templateplugin_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_header makes the player use the theme header/footer, MentorKit calls get_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 parameterSource valueNotes
$templateplugin_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.php or when scorm_player_use_theme_header returns true.

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 parameterSource valueNotes
$use_theme_headerfalseBoolean 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.