Profile and Dashboard Hooks
Use these hooks to customize the learner profile shortcode, profile URLs, login messaging, group leader dashboard panels, and the data shown in profile course/group sections.
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: 12.
Documented Hooks
| Hook | Type | Status |
|---|---|---|
| scorm_after_my_profile_login_notice | Action | Public |
| scorm_before_my_profile_login_notice | Action | Public |
| scorm_leader_dashboard_after_invite_tab | Action | Public |
| scorm_leader_dashboard_before_stats_row | Action | Public |
| scorm_my_profile_after | Action | Public |
| scorm_my_profile_atts | Filter | Public |
| scorm_my_profile_before | Action | Public |
| scorm_my_profile_courses_page_url | Filter | Public |
| scorm_my_profile_groups_page_url | Filter | Public |
| scorm_my_profile_login_url | Filter | Public |
| scorm_my_profile_user_courses | Filter | Public |
| scorm_my_profile_user_groups | Filter | Public |
scorm_after_my_profile_login_notice
Type: Action
Category: Profile/Dashboard
Source: includes/frontend/my-courses-shortcode.php:1384
Status: Public
When It Runs
Fires after my profile login notice. The source call is inside SCORM_My_Profile_Shortcode::render_login_notice().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$login_url | $login_url | Additional context passed by the hook. |
Example
add_action(
'scorm_after_my_profile_login_notice',
function ( $login_url ) {
// Add your integration logic here.
},
10,
1
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_before_my_profile_login_notice
Type: Action
Category: Profile/Dashboard
Source: includes/frontend/my-courses-shortcode.php:1373
Status: Public
When It Runs
Fires before my profile login notice. The source call is inside SCORM_My_Profile_Shortcode::render_login_notice().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$login_url | $login_url | Additional context passed by the hook. |
Example
add_action(
'scorm_before_my_profile_login_notice',
function ( $login_url ) {
// Add your integration logic here.
},
10,
1
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_leader_dashboard_after_invite_tab
Type: Action
Category: Profile/Dashboard
Source: includes/frontend/group-leader-dashboard-shortcode.php:1610
Status: Public
When It Runs
Fires in the group leader dashboard invite tab after the seat summary and intro, before the invite cards and the collapsed single-add manual form. Use it to add invite-related cards or controls for the group being viewed.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$group_id | $group_id | Group post ID being viewed. |
Example
add_action(
'scorm_leader_dashboard_after_invite_tab',
function ( $group_id ) {
// Add your integration logic here.
},
20,
1
);
Notes
- MentorKit renders built-in invite cards on this hook at priorities 5 and 10. Choose a priority based on whether your card should appear before, between, or after those cards.
- Output frontend-safe markup. The built-in invite tab expects card-style blocks to use the
.gld-invite-cardlayout class.
scorm_leader_dashboard_before_stats_row
Type: Action
Category: Profile/Dashboard
Source: includes/frontend/group-leader-dashboard-shortcode.php:489
Status: Public
When It Runs
Fires in the group leader dashboard after the group detail header and subtitle, before the stats row. Use it to add status panels, notices, or group-level context above the learner statistics.
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$group_id | $group_id | Group post ID being viewed. |
Example
add_action(
'scorm_leader_dashboard_before_stats_row',
function ( $group_id ) {
// Add your integration logic here.
},
10,
1
);
Notes
- MentorKit also registers an internal status-panel callback on this hook. Keep custom callbacks narrowly scoped and choose priorities deliberately when ordering matters.
scorm_my_profile_after
Type: Action
Category: Profile/Dashboard
Source: includes/frontend/my-courses-shortcode.php:111
Status: Public
When It Runs
Fires after my profile. The source call is inside SCORM_My_Profile_Shortcode::render_my_profile().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$current_user_id | $current_user_id | Additional context passed by the hook. |
Example
add_action(
'scorm_my_profile_after',
function ( $current_user_id ) {
// Add your integration logic here.
},
10,
1
);
Notes
- MentorKit also registers internal callbacks for this hook. Keep custom callbacks narrowly scoped.
scorm_my_profile_atts
Type: Filter
Category: Profile/Dashboard
Source: includes/frontend/my-courses-shortcode.php:41
Status: Public
When It Runs
Filters my profile shortcode attributes. The source call is inside SCORM_My_Profile_Shortcode::render_my_profile().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$attributes | $attributes | Value passed through the filter. Source default: $attributes. |
Return Value
Return the filtered $attributes value. Source default: $attributes. If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_my_profile_atts',
function ( $attributes ) {
return $attributes;
},
10,
1
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_my_profile_before
Type: Action
Category: Profile/Dashboard
Source: includes/frontend/my-courses-shortcode.php:82
Status: Public
When It Runs
Fires before my profile. The source call is inside SCORM_My_Profile_Shortcode::render_my_profile().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$current_user_id | $current_user_id | Additional context passed by the hook. |
Example
add_action(
'scorm_my_profile_before',
function ( $current_user_id ) {
// Add your integration logic here.
},
10,
1
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_my_profile_courses_page_url
Type: Filter
Category: Profile/Dashboard
Source: includes/frontend/my-courses-shortcode.php:506
Status: Public
When It Runs
Filters the my profile courses page URL. The source call is inside SCORM_My_Profile_Shortcode::render_courses_section().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$url | $archive_url ?: home_url() | Value passed through the filter. Source default: $archive_url ?: home_url(). |
Return Value
Return the filtered $url value. Source default: $archive_url ?: home_url(). If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_my_profile_courses_page_url',
function ( $url ) {
return $url;
},
10,
1
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_my_profile_groups_page_url
Type: Filter
Category: Profile/Dashboard
Source: includes/frontend/my-courses-shortcode.php:694
Status: Public
When It Runs
Filters the my profile groups page URL. The source call is inside SCORM_My_Profile_Shortcode::render_groups_section().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$url | $archive_url ?: home_url() | Value passed through the filter. Source default: $archive_url ?: home_url(). |
Return Value
Return the filtered $url value. Source default: $archive_url ?: home_url(). If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_my_profile_groups_page_url',
function ( $url ) {
return $url;
},
10,
1
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_my_profile_login_url
Type: Filter
Category: Profile/Dashboard
Source: includes/frontend/my-courses-shortcode.php:1371
Status: Public
When It Runs
Filters the my profile login URL. The source call is inside SCORM_My_Profile_Shortcode::render_login_notice().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$login_url | $login_url | Value passed through the filter. Source default: $login_url. |
Return Value
Return the filtered $login_url value. Source default: $login_url. If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_my_profile_login_url',
function ( $login_url ) {
return $login_url;
},
10,
1
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_my_profile_user_courses
Type: Filter
Category: Profile/Dashboard
Source: includes/frontend/my-courses-shortcode.php:60
Status: Public
When It Runs
Filters my profile user courses. The source call is inside SCORM_My_Profile_Shortcode::render_my_profile().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$user_courses | $user_courses | Value passed through the filter. Source default: $user_courses. |
$current_user_id | $current_user_id | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
Return Value
Return the filtered $user_courses value. Source default: $user_courses. If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_my_profile_user_courses',
function ( $user_courses, $current_user_id, $attributes ) {
return $user_courses;
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.
scorm_my_profile_user_groups
Type: Filter
Category: Profile/Dashboard
Source: includes/frontend/my-courses-shortcode.php:61
Status: Public
When It Runs
Filters my profile user groups. The source call is inside SCORM_My_Profile_Shortcode::render_my_profile().
Parameters
| Callback parameter | Source value | Notes |
|---|---|---|
$user_groups | $user_groups | Value passed through the filter. Source default: $user_groups. |
$current_user_id | $current_user_id | Additional context passed by the hook. |
$attributes | $attributes | Additional context passed by the hook. |
Return Value
Return the filtered $user_groups value. Source default: $user_groups. If you do not need to change it, return the original value unchanged.
Example
add_filter(
'scorm_my_profile_user_groups',
function ( $user_groups, $current_user_id, $attributes ) {
return $user_groups;
},
10,
3
);
Notes
- Keep callbacks small and scoped to the source context shown above.