Plugin

LH Profile Page owns a core set of user profile fields for LocalHero sites – phone, secondary phone, gender, birthdate, street address, town, postcode, state/province, and country – stored as plain WordPress user meta rather than a custom database table. It also integrates these fields into BuddyPress's xProfile system as "faux" field types, so they can be added to a BuddyPress profile field group and edited through the normal xProfile UI while the underlying data stays in ordinary wp_usermeta.

This makes the plugin migration-critical: any site owner leaving LocalHero needs to understand this data model to export or migrate their members' profile data, since a large number of other lh- plugins (check-ins, CRM, group invites, group reports, vcard export, CSV import, "Users Insights") all read or write these same fields.

Key features

  • Per-field validation. Phone numbers are validated to E.164 format (giggsey/libphonenumber-for-php-lite); gender is restricted to a fixed value set; birthdate is normalised to a consistent Y-m-d date string. Each validated field is registered via WordPress's own register_meta(), so the validation applies to any direct write to that meta key – not just writes that go through this plugin's own forms.
  • Front-end and back-end editing. A WordPress admin user-edit screen section, a front-end shortcode form (


    ), and full BuddyPress xProfile integration all edit the same underlying data.
  • A field-class architecture. What was originally one large "god class" has been progressively split into a dedicated class per field (phone, gender, birthdate, and each of the five address fields, plus the three name fields), each with its own file, while keeping the original class's public methods working via back-compat proxy shims – see Field Class Architecture.

Documentation

  • Field Class Architecture – the extraction pattern, back-compat shims, and the shim-call diagnostic logging used to find external callers
  • Database Schema – every lh_profile-* user meta key, its format, and which are validated
  • Admin Interfaces & Shortcodes – every admin screen, shortcode, and BuddyPress integration point
  • Hooks Reference – every action/filter this plugin registers or exposes, grouped by integration
  • Cron Jobs – the daily phone-field background processing job
  • Architectural Notes & Gotchas – Composer dependency migrations, the birthdate storage format history, the still-unresolved "now" data-corruption bug, and a note on safely editing the large god-class file
  • Changelog – version history (structured entries from v2.01 onward; a small number of intermediate versions are summarised rather than individually logged)