Hooks Reference
All registered in plugin_init() unless noted. This plugin integrates with a large number of other lh- plugins – grouped by what they connect to.
Registered meta (see Database Schema for details)
register_meta() is called on init for gender, birthdate, and all five address fields, each via its own field class’s register_meta_fields(). The phone keys stopped being registered in 3.30.4: phone numbers live in LH Phone Numbers. The address keys are legacy too: addresses live in LH Addresses, and since LH Addresses 0.11.0 the keys are no longer kept up to date.
User edit / save lifecycle
show_user_profile/edit_user_profile->add_backend_profile_fields()personal_options_update/edit_user_profile_update/user_register->save_backend_profile_profile_fields()wp->save_data()->post_handler()(frontend form POST handling)updated_user_meta/added_user_meta->track_last_meta_update_time()(address saves no longer write the meta, so they no longer reach this)add_user_metadata->prevent_bad_meta_values()(rejects empty writes to non-native fields)
BuddyPress
bp_xprofile_get_field_types->add_field_types()xprofile_get_field_data/bp_get_the_profile_field_value-> override to read the real values (user meta, phone numbers from LH Phone Numbers, addresses from LH Addresses) instead ofbp_xprofile_databp_after_has_profile_parse_args->intercept_profile_query_args()(excludes the native Name field from the xprofile loop)get_avatar/bp_core_fetch_avatar/bp_core_fetch_avatar_url-> gender-based fallback avatar imagesbp_xprofile_new_avatar_action-> gendered pronoun text (“changed his/her profile picture”)
“Users Insights” plugin integration
usin_fields/usin_db_map/usin_query_join_table(the original Users Insights) and, since 3.32.0,lh_ui_fields/lh_ui_db_map/lh_ui_query_join_table(LH User Insights), which take the same arguments, so the fields show in both while they run in parallel. On each set, both this class’s ownregister_fields()/filter_db_map()/filter_query_joins()(address group, joining LH Addresses’ tables throughown_residential_subquery()since 3.25.1; gender and birthdate join usermeta) andLH_Profile_Phone_Field‘s equivalents (phone group) are hooked separately, since they can’t be merged into one callback (see Field Class Architecture). Since 3.31.0 the phone group joins LH Phone Numbers’ tables: Phone is a user’s first current number and Secondary Phone their second, primary first then oldest link, asreturn_user_phone().
LH Check-Ins / Log Entry integration
lh_bp_check_ins_check_if_can_check_in/lh_bp_log_entry_check_if_can_check_in->force_to_unknown()(routes to the “unknown user” flow if gender/phone/birthdate are missing)lh_bp_check_ins_form_unknown/lh_bp_log_entry_form_unknown->add_fields_to_form_unknown()lh_bp_check_ins_activity_added/lh_bp_log_entry_activity_added/*_user_recognised->maybe_add_user_data_on_activity_add()/maybe_add_user_data_on_user_recognised()->maybe_do_user_update(){namespace}_user_table_header_after/*_row_after(conditional onLH_Buddypress_check_ins_pluginexisting) -> adds mobile/gender columns to check-in reports
LH CRM / Group Invites
lh_crm_http_post_after_user/lh_bgr_http_post_after_user->new_user_update()(a near-duplicate ofpost_handler()/maybe_do_user_update()– see Field Class Architecture’s note on unconsolidated orchestrator methods)lh_crm_send_notification_tokens->add_notification_tokens()
CSV import and export
lh_iubc_result_handle_new_user_success/lh_iubc_result_exists->maybe_add_details_when_csv_is_uploaded()lh_eutc_value(LH Export Users to CSV 1.0.2+) ->filter_csv_export_value()(the phone columns come from LH Phone Numbers)
LH Buddypress Group Reports
lh_bg_reports_fields->add_new_report_fields()(the Birthdate column is added only whenuser_can_view_report_birthdates()passes, so group admins and moderators don’t get it)lh_bg_reports_field_output->format_report_fields()(formats birthdate asd-m-Yand phone as clickable tel/sms links)
LH Contacts
Registered at file level in includes/lh-profile-vcard-integration-class.php (LH_Profile_Vcard_Integration). Until 3.10.5 these hooked LH Vcard’s lh_vcard_* filters; LH Contacts replaced LH Vcard. Phone numbers on cards come from LH Phone Numbers, not here.
lh_contacts_add_data->add_vcard_data()(gender, birthday and home address on contact cards; the address read from LH Addresses)lh_contacts_return_all_tracked_meta_fields->add_vcard_tracking()(this plugin’s profile fields, less the phone and address keys, mark the card changed; since 3.26.2 LH Contacts follows LH Addresses’ actions for addresses, as it follows LH Phone Numbers for phones)
LH Add User
lh_add_user_page_after_email->add_additional_inputs()(adds phone + gender fields to the add-user flow)lh_add_user_page_after_user_insertion->maybe_add_values_to_user()
Search & user list
In includes/lh-profile-admin-users-class.php (LH_Profile_Admin_Users).
user_search_columns/pre_user_query->add_search_columns()/add_search_joins()(the Users screen search also matches every current phone number in LH Phone Numbers, and additional emails; filterlh_profile_return_searchable_fields)pre_get_users->modify_user_list()(filter users list by gender query param)manage_users_columns/manage_users_custom_column/default_hidden_columns-> gender/emails admin columns
Filters this plugin exposes for other plugins to hook
lh_profile_return_plugin_debugging_status– gate forwrite_log()output (defaultstrue)lh_profile_birthdate_minimum_age_years– added v2.14, lets another plugin (intended: LH Membership) restrict the birthdate input’s client-sidemaxdate to enforce a minimum age. Defaults0(no restriction). See Architectural Notes.lh_profile_user_can_view_report_birthdates– added v3.11.2, decides who gets the Birthdate column in LH Buddypress Group Reports. Receives the default,current_user_can( 'promote_users' ), and the group ID.lh_profile_return_ambiguous_first_names/lh_profile_return_gender_check_countries– added v3.28.0, the ambiguous first names and the check countries used byLH_Profile_First_Name_Gender::suggest(). See First-name gender lookup.lh_profle_return_required_fields/lh_profle_has_required_fields– customise which fields count as “required” forhas_required_fields()

