diff --git a/assets/pasted-20260608-125136-1168801d.png b/assets/pasted-20260608-125136-1168801d.png new file mode 100644 index 0000000..a12cadc Binary files /dev/null and b/assets/pasted-20260608-125136-1168801d.png differ 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 89204d1..310bf4a 100644 --- a/wp-content/plugins/matthew-lms-mvp/matthew-lms-mvp.php +++ b/wp-content/plugins/matthew-lms-mvp/matthew-lms-mvp.php @@ -751,8 +751,14 @@ function matthew_lms_mvp_handle_signup_onboarding_submission(): array { return ['success' => true, 'email' => $email, 'role' => $role, 'goal' => $goal, 'link' => $link, 'profile' => $profile, 'post_id' => is_wp_error($post_id) ? 0 : (int) $post_id, 'redirect' => $redirect]; } +function matthew_lms_mvp_is_removed_starter_profile_copy(string $profile): bool { + $normalized = trim(preg_replace('/\s+/', ' ', wp_strip_all_tags($profile)) ?: ''); + return str_starts_with($normalized, 'Starter WAX profile Learning path: Start with AI workflow fluency') + || (str_contains($normalized, 'Starter WAX profile') && str_contains($normalized, 'Start with AI workflow fluency')); +} + function matthew_lms_mvp_generate_profile_bootstrap(string $email, string $role, string $goal, string $link): string { - $fallback = "Starter WAX profile\n\nLearning path: Start with AI workflow fluency, then map one real weekly task into a repeatable prompt-and-review system.\n\nFirst wins:\n1. Pick one high-friction task connected to your goal.\n2. Build a simple AI-assisted draft, review, and handoff loop.\n3. Save the result as your first portfolio artifact."; + $fallback = ''; $api = dirname(__DIR__, 3) . '/ai/LocalAIApi.php'; if (!file_exists($api)) { return $fallback; } require_once $api; @@ -1391,6 +1397,9 @@ function matthew_lms_mvp_profile_context(): array { $role = $user_id ? (string) get_user_meta($user_id, '_mlms_functional_role', true) : ''; $goal = $user_id ? (string) get_user_meta($user_id, '_mlms_learning_goal', true) : ''; $profile = $user_id ? (string) get_user_meta($user_id, '_mlms_ai_profile_bootstrap', true) : ''; + if ($profile !== '' && matthew_lms_mvp_is_removed_starter_profile_copy($profile)) { + $profile = ''; + } $profile_link = $user_id ? (string) get_user_meta($user_id, '_mlms_profile_link', true) : ''; $source_type = $user_id ? (string) get_user_meta($user_id, '_mlms_external_source_type', true) : ''; $photo = $user_id ? (string) get_user_meta($user_id, '_mlms_google_picture', true) : '';