benecaster_resolve_wall_display_name()
Canonical function for resolving the name shown on community surfaces — the Supporter Wall, [benecaster_member_thanks], and any add-on that needs to display a subscriber’s name consistently. Centralises the three-step resolution chain so calling code does not need to read user meta directly:
-
Wall name (
_benecaster_wall_display_name) — the name the subscriber has explicitly
set for community surfaces. -
First + last name —
first_nameandlast_namefrom WordPress user meta,
space-joined, when no wall name is set. -
WordPress display name (
wp_users.display_name) — the final fallback.
Pass a prefetched row object as $prefetched when iterating a result set that already contains the required user fields to skip the extra get_userdata() call per row.