15
This commit is contained in:
parent
151142df0e
commit
3ab4fb728e
BIN
assets/pasted-20260608-125136-1168801d.png
Normal file
BIN
assets/pasted-20260608-125136-1168801d.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
@ -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) : '';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user