Skip to main content

Admin and Setup Hooks

Use these hooks to extend admin upload screens, course meta boxes, setup wizard steps, setup URLs, and Pro/add-on upload integrations.

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: 15.

Documented Hooks

HookTypeStatus
scorm_group_settings_table_endActionPublic
scorm_player_admin_handle_replace_submissionActionPro integration
scorm_player_admin_handle_upload_submissionActionPro integration
scorm_player_admin_replace_modalActionPro integration
scorm_player_admin_upload_formActionPro integration
scorm_player_creator_integrations_urlFilterPublic
scorm_player_meta_box_extra_sectionsActionPublic
scorm_player_package_management_uiActionPro integration
scorm_player_package_row_actionsActionPro integration
scorm_player_register_upload_rest_routesActionPro integration
scorm_player_setup_create_account_urlFilterPublic
scorm_player_setup_wizard_first_course_afterActionPro integration
scorm_player_setup_wizard_step_labelsFilterPublic
scorm_player_setup_wizard_stepsFilterPro integration
scorm_player_setup_wizard_welcome_benefitsFilterPublic

scorm_group_settings_table_end

Type: Action Category: Admin/Setup Source: includes/admin/meta-fields-group.php:646 Status: Public

When It Runs

Fires for group settings table end. The source call is inside scorm_player_group_meta_box_callback(). Source context: Group settings meta box callback.

Parameters

Callback parameterSource valueNotes
$post$postAdditional context passed by the hook.

Example

add_action(
'scorm_group_settings_table_end',
function ( $post ) {
// Add your integration logic here.
},
10,
1
);

Notes

  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.

scorm_player_admin_handle_replace_submission

Type: Action Category: Admin/Setup Source: includes/admin/pages/main-page.php:56 Status: Pro integration

When It Runs

Fires for admin handle replace submission. The source call is inside scorm_player_admin_page(). Source context: Admin page content (upload form for SCORM package).

Parameters

This hook does not pass callback parameters.

Example

add_action(
'scorm_player_admin_handle_replace_submission',
function () {
// Add your integration logic here.
},
10,
0
);

Notes

  • This is a Pro/add-on integration hook. It may only be useful when the corresponding Pro upload or setup flow is active.
  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.
  • Consumed by Pro code or designed as a Pro integration extension point.

scorm_player_admin_handle_upload_submission

Type: Action Category: Admin/Setup Source: includes/admin/pages/main-page.php:46 Status: Pro integration

When It Runs

Fires for admin handle upload submission. The source call is inside scorm_player_admin_page(). Source context: Admin page content (upload form for SCORM package).

Parameters

This hook does not pass callback parameters.

Example

add_action(
'scorm_player_admin_handle_upload_submission',
function () {
// Add your integration logic here.
},
10,
0
);

Notes

  • This is a Pro/add-on integration hook. It may only be useful when the corresponding Pro upload or setup flow is active.
  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.
  • Consumed by Pro code or designed as a Pro integration extension point.

scorm_player_admin_replace_modal

Type: Action Category: Admin/Setup Source: includes/admin/pages/main-page.php:939 Status: Pro integration

When It Runs

Fires for admin replace modal. The source call is inside scorm_player_admin_page(). Source context: Admin page content (upload form for SCORM package).

Parameters

This hook does not pass callback parameters.

Example

add_action(
'scorm_player_admin_replace_modal',
function () {
// Add your integration logic here.
},
10,
0
);

Notes

  • This is a Pro/add-on integration hook. It may only be useful when the corresponding Pro upload or setup flow is active.
  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.
  • Consumed by Pro code or designed as a Pro integration extension point.

scorm_player_admin_upload_form

Type: Action Category: Admin/Setup Source: includes/admin/pages/main-page.php:314 Status: Pro integration

When It Runs

Fires for admin upload form. The source call is inside scorm_player_admin_page(). Source context: Admin page content (upload form for SCORM package).

Parameters

This hook does not pass callback parameters.

Example

add_action(
'scorm_player_admin_upload_form',
function () {
// Add your integration logic here.
},
10,
0
);

Notes

  • This is a Pro/add-on integration hook. It may only be useful when the corresponding Pro upload or setup flow is active.
  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.
  • Consumed by Pro code or designed as a Pro integration extension point.

scorm_player_creator_integrations_url

Type: Filter Category: Admin/Setup Source: includes/admin/pages/setup-page.php:490 Status: Public

When It Runs

Filters the Creator integrations URL. The source call is inside scorm_player_get_creator_integrations_base_url(). Source context: Build Creator integrations base URL based on environment.

Parameters

Callback parameterSource valueNotes
$url$urlValue passed through the filter. Source default: $url.
$env$envAdditional context passed by the hook.

Return Value

Return the filtered $url value. Source default: $url. If you do not need to change it, return the original value unchanged.

Example

add_filter(
'scorm_player_creator_integrations_url',
function ( $url, $env ) {
return $url;
},
10,
2
);

Notes

  • Keep callbacks small and scoped to the source context shown above.

scorm_player_meta_box_extra_sections

Type: Action Category: Admin/Setup Source: includes/admin/meta-fields.php:257 Status: Public

When It Runs

Fires for meta box extra sections. The source call is inside scorm_player_meta_box_callback(). Source context: Meta box callback function.

Parameters

Callback parameterSource valueNotes
$post$postAdditional context passed by the hook.

Example

add_action(
'scorm_player_meta_box_extra_sections',
function ( $post ) {
// Add your integration logic here.
},
10,
1
);

Notes

  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.

scorm_player_package_management_ui

Type: Action Category: Admin/Setup Source: includes/admin/meta-fields.php:438 Status: Pro integration

When It Runs

Fires while the package management UI is rendered. The source call is inside scorm_player_meta_box_callback(). Source context: Meta box callback function.

Parameters

Callback parameterSource valueNotes
$post_id$post->IDAdditional context passed by the hook.
$package_path$package_pathAdditional context passed by the hook.
$launch_file$launch_fileAdditional context passed by the hook.
$formatted_upload_date$formatted_upload_dateAdditional context passed by the hook.
$package_attached$package_attachedAdditional context passed by the hook.

Example

add_action(
'scorm_player_package_management_ui',
function ( $post_id, $package_path, $launch_file, $formatted_upload_date, $package_attached ) {
// Add your integration logic here.
},
10,
5
);

Notes

  • This is a Pro/add-on integration hook. It may only be useful when the corresponding Pro upload or setup flow is active.
  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.
  • Consumed by Pro code or designed as a Pro integration extension point.

scorm_player_package_row_actions

Type: Action Category: Admin/Setup Source: includes/admin/pages/main-page.php:445 Status: Pro integration

When It Runs

Fires for package row actions. The source call is inside scorm_player_admin_page(). Source context: Admin page content (upload form for SCORM package).

Parameters

Callback parameterSource valueNotes
$package$packageAdditional context passed by the hook.
$can_edit_package$can_edit_packageAdditional context passed by the hook.

Example

add_action(
'scorm_player_package_row_actions',
function ( $package, $can_edit_package ) {
// Add your integration logic here.
},
10,
2
);

Notes

  • This is a Pro/add-on integration hook. It may only be useful when the corresponding Pro upload or setup flow is active.
  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.
  • Consumed by Pro code or designed as a Pro integration extension point.

scorm_player_register_upload_rest_routes

Type: Action Category: Admin/Setup Source: includes/api/rest-api.php:36 Status: Pro integration

When It Runs

Fires while upload REST routes are registered. The source call is inside scorm_player_register_rest_routes(). Source context: Register REST API endpoints for SCORM packages.

Parameters

This hook does not pass callback parameters.

Example

add_action(
'scorm_player_register_upload_rest_routes',
function () {
// Add your integration logic here.
},
10,
0
);

Notes

  • This is a Pro/add-on integration hook. It may only be useful when the corresponding Pro upload or setup flow is active.
  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.
  • Consumed by Pro code or designed as a Pro integration extension point.

scorm_player_setup_create_account_url

Type: Filter Category: Admin/Setup Source: includes/admin/pages/setup-page.php:81 Status: Public

When It Runs

Filters the setup create-account URL. The source call is inside scorm_player_get_setup_create_account_url(). Source context: Get the setup wizard account creation URL.

Parameters

Callback parameterSource valueNotes
$url'https://mentorkit.com/get-a-free-account/'Value passed through the filter. Source default: 'https://mentorkit.com/get-a-free-account/'.

Return Value

Return the filtered $url value. Source default: 'https://mentorkit.com/get-a-free-account/'. If you do not need to change it, return the original value unchanged.

Example

add_filter(
'scorm_player_setup_create_account_url',
function ( $url ) {
return $url;
},
10,
1
);

Notes

  • Keep callbacks small and scoped to the source context shown above.

scorm_player_setup_wizard_first_course_after

Type: Action Category: Admin/Setup Source: includes/admin/pages/setup-page.php:1753 Status: Pro integration

When It Runs

Fires after setup wizard first course. The source call is inside scorm_player_setup_page(). Source context: Render Setup page content.

Parameters

Callback parameterSource valueNotes
$state$stateAdditional context passed by the hook.
$current_step$current_stepAdditional context passed by the hook.

Example

add_action(
'scorm_player_setup_wizard_first_course_after',
function ( $state, $current_step ) {
// Add your integration logic here.
},
10,
2
);

Notes

  • This is a Pro/add-on integration hook. It may only be useful when the corresponding Pro upload or setup flow is active.
  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.
  • Consumed by Pro code or designed as a Pro integration extension point.

scorm_player_setup_wizard_step_labels

Type: Filter Category: Admin/Setup Source: includes/admin/pages/setup-page.php:91 Status: Public

When It Runs

Filters setup wizard step labels. The source call is inside scorm_player_get_setup_wizard_step_labels(). Source context: Get setup wizard step labels keyed by step slug.

Parameters

Callback parameterSource valueNotes
$labelsarray('welcome' => __('Welcome', 'mentorkit-lms-pro-freemium'), 'create_account' => __('Create Account', 'mentorkit-lms-pro-freemium'), 'connect' => __('Connect', 'mentorkit-lms-pro-freemium'), 'optional' => __('Optional Add-ons', 'mentorkit-lms-pro-freemium'), 'first_course' => __('First Course', 'mentorkit-lms-pro-freemium'),)Value passed through the filter. Source default: array('welcome' => __('Welcome', 'mentorkit-lms-pro-freemium'), 'create_account' => __('Create Account', 'mentorkit-lms-pro-freemium'), 'connect' => __('Connect', 'mentorkit-lms-pro-freemium'), 'optional' => __('Optional Add-ons', 'mentorkit-lms-pro-freemium'), 'first_course' => __('First Course', 'mentorkit-lms-pro-freemium'),).
$steps$stepsAdditional context passed by the hook.

Return Value

Return the filtered $labels value. Source default: array('welcome' => __('Welcome', 'mentorkit-lms-pro-freemium'), 'create_account' => __('Create Account', 'mentorkit-lms-pro-freemium'), 'connect' => __('Connect', 'mentorkit-lms-pro-freemium'), 'optional' => __('Optional Add-ons', 'mentorkit-lms-pro-freemium'), 'first_course' => __('First Course', 'mentorkit-lms-pro-freemium'),). If you do not need to change it, return the original value unchanged.

Example

add_filter(
'scorm_player_setup_wizard_step_labels',
function ( $labels, $steps ) {
return $labels;
},
10,
2
);

Notes

  • Keep callbacks small and scoped to the source context shown above.

scorm_player_setup_wizard_steps

Type: Filter Category: Admin/Setup Source: includes/admin/pages/setup-page.php:18 Status: Pro integration

When It Runs

Filters setup wizard steps. The source call is inside scorm_player_get_setup_wizard_steps(). Source context: Get setup wizard steps in order.

Parameters

Callback parameterSource valueNotes
$stepsarray('welcome', 'connect', 'optional', 'first_course')Value passed through the filter. Source default: array('welcome', 'connect', 'optional', 'first_course').

Return Value

Return the filtered $steps value. Source default: array('welcome', 'connect', 'optional', 'first_course'). If you do not need to change it, return the original value unchanged.

Example

add_filter(
'scorm_player_setup_wizard_steps',
function ( $steps ) {
return $steps;
},
10,
1
);

Notes

  • This is a Pro/add-on integration hook. It may only be useful when the corresponding Pro upload or setup flow is active.
  • MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.
  • Consumed by Pro code or designed as a Pro integration extension point.

scorm_player_setup_wizard_welcome_benefits

Type: Filter Category: Admin/Setup Source: includes/admin/pages/setup-page.php:164 Status: Public

When It Runs

Filters setup wizard welcome benefits. The source call is inside scorm_player_get_setup_wizard_welcome_benefits(). Source context: Get the welcome-step benefit list for the active wizard steps.

Parameters

Callback parameterSource valueNotes
$benefits$benefitsValue passed through the filter. Source default: $benefits.
$steps$stepsAdditional context passed by the hook.

Return Value

Return the filtered $benefits value. Source default: $benefits. If you do not need to change it, return the original value unchanged.

Example

add_filter(
'scorm_player_setup_wizard_welcome_benefits',
function ( $benefits, $steps ) {
return $benefits;
},
10,
2
);

Notes

  • Keep callbacks small and scoped to the source context shown above.