diff --git a/wp-content/plugins/matthew-lms-mvp/matthew-lms-mvp.php b/wp-content/plugins/matthew-lms-mvp/matthew-lms-mvp.php
index 06e1686..89204d1 100644
--- a/wp-content/plugins/matthew-lms-mvp/matthew-lms-mvp.php
+++ b/wp-content/plugins/matthew-lms-mvp/matthew-lms-mvp.php
@@ -60,6 +60,7 @@ add_action('wp_head', function () {
add_action('template_redirect', 'matthew_lms_mvp_maybe_handle_login_submission');
add_action('template_redirect', 'matthew_lms_mvp_maybe_handle_google_oauth_callback');
+add_action('template_redirect', 'matthew_lms_mvp_maybe_handle_signup_onboarding_submission');
add_action('template_redirect', 'matthew_lms_mvp_maybe_handle_profile_source_submission');
add_action('template_redirect', 'matthew_lms_mvp_require_auth_for_member_routes', 4);
add_action('template_redirect', 'matthew_lms_mvp_maybe_render_course_route', 5);
@@ -134,13 +135,20 @@ function matthew_lms_mvp_require_auth_for_member_routes(): void {
}
function matthew_lms_mvp_render_header(): string {
- $links = [
+ $profile_url = matthew_lms_mvp_public_url('platform/');
+ $lessons_url = matthew_lms_mvp_public_url('platform/course/');
+ $public_links = [
'Home' => matthew_lms_mvp_public_url(),
'WAX Coach' => matthew_lms_mvp_public_url('career-coach/'),
- 'Profile' => matthew_lms_mvp_member_access_url('platform/'),
- 'Course' => matthew_lms_mvp_member_access_url('platform/course/'),
];
- $login_url = add_query_arg('redirect_to', rawurlencode(matthew_lms_mvp_public_url('platform/')), matthew_lms_mvp_public_url('log-in/'));
+ $access_links = [
+ 'Profile' => $profile_url,
+ 'Lessons' => $lessons_url,
+ ];
+ $links = array_merge($public_links, $access_links);
+ $login_url = add_query_arg('redirect_to', rawurlencode($profile_url), matthew_lms_mvp_public_url('log-in/'));
+ $register_url = add_query_arg('redirect_to', rawurlencode($profile_url), matthew_lms_mvp_public_url('sign-up/'));
+ $logout_url = wp_logout_url(matthew_lms_mvp_public_url());
ob_start();
?>
@@ -164,11 +179,15 @@ function matthew_lms_mvp_render_header(): string {
function matthew_lms_mvp_render_footer(): string {
$links = [
'Career Coach' => matthew_lms_mvp_public_url('career-coach/'),
- 'Profile' => matthew_lms_mvp_public_url('platform/'),
- 'Course Dashboard' => matthew_lms_mvp_course_url('course'),
- 'Log In' => matthew_lms_mvp_public_url('log-in/'),
- 'Sign Up' => matthew_lms_mvp_public_url('sign-up/'),
];
+ if (is_user_logged_in()) {
+ $links['Profile'] = matthew_lms_mvp_public_url('platform/');
+ $links['Dashboard'] = matthew_lms_mvp_course_url('course');
+ $links['Log Out'] = wp_logout_url(matthew_lms_mvp_public_url());
+ } else {
+ $links['Log In'] = matthew_lms_mvp_public_url('log-in/');
+ $links['Sign Up'] = matthew_lms_mvp_public_url('sign-up/');
+ }
ob_start();
?>