@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/?post_type=lh-portfolio&#038;p=147168>
  a sioc:Post ;
  dc:title "Admin Interfaces & Shortcodes" ;
  dcterms:identifier 147168 ;
  dc:modified "2026-11-10T11:51:37Z"^^xsd:dateTime ;
  dc:created "2026-09-09T01:46:10Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-profile-page/admin-interfaces-shortcodes/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded "<ul class=\"lh_portfolio-meta\"><li><strong>Part of:</strong> <a href=\"https://lhero.org/portfolio/lh-profile-page/\">LH Profile Page</a></li></ul><h1 class=\"wp-block-heading\">Admin Interfaces &amp; Shortcodes</h1><h2 class=\"wp-block-heading\">User edit screen (wp-admin)</h2><p class=\"wp-block-paragraph\"><code>add_backend_profile_fields()</code> (hooked on <code>show_user_profile</code>/<code>edit_user_profile</code>) adds a &quot;Profile Data&quot; section to the standard WordPress user edit screen, visible only to users who can <code>edit_user</code> for that profile. Fields shown: phone, secondary phone, street address, town, postcode, state/province, country, gender, birthdate, additional emails. Saved via <code>save_backend_profile_profile_fields()</code> on <code>personal_options_update</code> / <code>edit_user_profile_update</code> / <code>user_register</code>.</p><h2 class=\"wp-block-heading\">Frontend shortcodes</h2><ul class=\"wp-block-list\"><li><strong><code>[lh_profile_admin_form]</code></strong> &#8211; <code>admin_form_shortcode_output()</code>. Renders a full front-end editable form (first name, last name, phone, address, town, postcode, gender, birthdate) for the current logged-in user. Posts to <code>post_handler()</code>, hooked on the <code>wp</code> action via <code>save_data()</code>.</li><li><strong><code>[lh_profile_listing_table]</code></strong> &#8211; <code>listing_table_shortcode_output()</code>. A sortable table of all users (ID, display name, gender, phone, email), gated to <code>list_users</code> capability.</li></ul><h2 class=\"wp-block-heading\">BuddyPress xProfile integration</h2><p class=\"wp-block-paragraph\">This plugin registers 9 custom BuddyPress xProfile field types (<code>add_field_types()</code>, hooked on <code>bp_xprofile_get_field_types</code>) 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 <code>bp_xprofile_data</code> table:</p><p class=\"wp-block-paragraph\"><code>lh_profile-first_name</code>, <code>-last_name</code>, <code>-display_name</code>, <code>-street_address</code>, <code>-town</code>, <code>-postcode</code>, <code>-gender</code>, <code>-birthdate</code>, <code>-phone</code> &#8211; each backed by its own <code>LH_Profile_xprofile_{field}_extender</code> class in <code>includes/</code>.</p><p class=\"wp-block-paragraph\"><code>override_returned_data()</code> and <code>override_returned_value()</code> intercept BuddyPress&#039;s normal xProfile data-fetching so these &quot;faux&quot; fields transparently return the real user meta value instead of (non-existent) <code>bp_xprofile_data</code> rows.</p><p class=\"wp-block-paragraph\"><strong>No field visibility.</strong> Because the values are user meta, BuddyPress&#039;s per-field visibility does not apply to these types. Since 3.13.0 each extender class declares <code>public static $supported_features = array( 'allow_custom_visibility' =&gt; false );</code>, 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 &quot;This field can be seen by&quot; label on the profile edit and registration forms.</p><p class=\"wp-block-paragraph\">Note: <code>state_province</code> and <code>country</code> have <strong>no</strong> xProfile field type &#8211; they&#039;re admin-backend-only, never exposed through BuddyPress.</p><h2 class=\"wp-block-heading\">Network Settings</h2><p class=\"wp-block-paragraph\">A &quot;Google Places API key&quot; field is added to Network Settings (<code>show_network_settings()</code> / <code>save_network_settings()</code>), but the save handler doesn&#039;t currently persist the value anywhere &#8211; appears vestigial/incomplete.</p>"^^rdf:XMLLiteral ;
  sioc:content "Part of: LH Profile PageAdmin Interfaces &amp; ShortcodesUser edit screen (wp-admin)add_backend_profile_fields() (hooked on show_user_profile/edit_user_profile) adds a &quot;Profile Data&quot; 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[lh_profile_admin_form] &#8211; admin_form_shortcode_output(). Renders a full front-end editable form (first name, last name, phone, address, town, postcode, gender, birthdate) for the current logged-in user. Posts to post_handler(), hooked on the wp action via save_data().[lh_profile_listing_table] &#8211; listing_table_shortcode_output(). A sortable table of all users (ID, display name, gender, phone, email), gated to list_users capability.BuddyPress xProfile integrationThis 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 &#8211; each backed by its own LH_Profile_xprofile_{field}_extender class in includes/.override_returned_data() and override_returned_value() intercept BuddyPress&#039;s normal xProfile data-fetching so these &quot;faux&quot; 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&#039;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' =&gt; 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 &quot;This field can be seen by&quot; label on the profile edit and registration forms.Note: state_province and country have no xProfile field type &#8211; they&#039;re admin-backend-only, never exposed through BuddyPress.Network SettingsA &quot;Google Places API key&quot; field is added to Network Settings (show_network_settings() / save_network_settings()), but the save handler doesn&#039;t currently persist the value anywhere &#8211; appears vestigial/incomplete." ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
