Automattic / Automattic/WP-Job-Manager
Placeholder for empty display_name
- Dominant language
- PHP
- Stars
- 899
- Forks
- 369
- Avg merge
- 11h 37m
- Merged PRs (30d)
- 12
Description
In the file `wp-job-manager-alerts/includes/emails/class-job-alert-email.php` I'd suggest line 352 is changed from:
`'{display_name}' => $user->display_name ?? $user->user_email,`
to
`'{display_name}' => !empty($user->display_name) ? $user->display_name : 'there',`
...this will stop an alert going out to a user without a display name set (for whatever reason) and rendering a space where the display name would be:
**Before:**
"Hi ,"
**After:**
"Hi there,"
Contributor guide
Research direction
Open wp-job-manager-alerts/includes/emails/class-job-alert-email.php and inspect line 352 and the surrounding email data mapping. Verify the job alert greeting when a user has no display_name; the work is done when the greeting uses “there” instead of rendering a blank name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100