Admin Interfaces & Shortcodes

Admin Interfaces & Shortcodes

User edit screen (wp-admin)

add_backend_profile_fields() (hooked on show_user_profile/edit_user_profile) adds a "Profile Data" section to the standard WordPress user edit screen, visible only to users who can edit_user for that profile. Fields shown: phone, secondary phone, street address, town, postcode, state/province, country, gender, birthdate, additional emails. Saved via save_backend_profile_profile_fields() on personal_options_update / edit_user_profile_update / user_register.

Frontend shortcodes

BuddyPress xProfile integration

This plugin registers 9 custom BuddyPress xProfile field types (add_field_types(), hooked on bp_xprofile_get_field_types) so each of these fields can be added to a BuddyPress profile field group and rendered/edited through the normal xProfile UI, while the actual data lives in plain user meta rather than the bp_xprofile_data table:

lh_profile-first_name, -last_name, -display_name, -street_address, -town, -postcode, -gender, -birthdate, -phone – each backed by its own LH_Profile_xprofile_{field}_extender class in includes/.

override_returned_data() and override_returned_value() intercept BuddyPress's normal xProfile data-fetching so these "faux" fields transparently return the real user meta value instead of (non-existent) bp_xprofile_data rows.

No field visibility. Because the values are user meta, BuddyPress's per-field visibility does not apply to these types. Since 3.13.0 each extender class declares public static $supported_features = array( 'allow_custom_visibility' => false );, so BuddyPress hides the visibility settings for these fields in wp-admin, and templates that check field type support (BP LocalHero 0.1.47 and later) show no visibility control or "This field can be seen by" label on the profile edit and registration forms.

Note: state_province and country have no xProfile field type – they're admin-backend-only, never exposed through BuddyPress.

Network Settings

A "Google Places API key" field is added to Network Settings (show_network_settings() / save_network_settings()), but the save handler doesn't currently persist the value anywhere – appears vestigial/incomplete.