@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/portfolio/lh-membership/>
  a sioc:Post ;
  dc:title "Invitation meta" ;
  dcterms:identifier 155359 ;
  dc:modified "2026-11-22T16:25:41Z"^^xsd:dateTime ;
  dc:created "2026-11-22T14:05:39Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-membership/invitation-meta/> ;
  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-membership/\">LH Membership</a></li></ul><p class=\"wp-block-paragraph\">BuddyPress has no meta for invitations, so LH Membership adds it: per-invitation data such as when a reminder was sent, kept with the invitation and deleted with it.</p><h2 class=\"wp-block-heading\">Storage</h2><ul class=\"wp-block-list\"><li>A table beside the invitations table BuddyPress actually uses, named from it: <code>BP_Invitation_Manager::get_table_name()</code> plus <code>_invitemeta</code>, so <code>lhero_bp_invitations_invitemeta</code> on LocalHero. It is in BuddyPress&#8217;s meta-table shape: <code>id</code> (primary key), <code>invite_id</code> (indexed), <code>meta_key</code> (indexed) and <code>meta_value</code>.</li><li>The name is deliberately not built from <code>bp_core_get_table_prefix()</code>. On LocalHero, LH BuddyPress Multi Network makes that prefix each site&#8217;s own, while the invitations table is kept network-wide, so the prefix would give each site its own meta table. Before 2.120.1 it did: a site&#8217;s own requests (its reminder runs among them) wrote to a per-site table, while requests reaching the site with <code>site_id</code> read the network one.</li><li>Read and written with WordPress&#8217;s metadata API under the meta type <code>invite</code> (<code>$wpdb-&gt;invitemeta</code>), wrapped in BuddyPress&#8217;s <code>bp_filter_metaid_column_name</code> exactly as BuddyPress&#8217;s groupmeta functions are.</li><li>Object-cached in the <code>invite_meta</code> group, registered as a global cache group, so meta reads the same from any site, including through the main connector with <code>site_id</code>.</li><li>When BuddyPress deletes invitations (today only when an account is deleted), their meta is deleted with them.</li></ul><h2 class=\"wp-block-heading\">Functions</h2><p class=\"wp-block-paragraph\">Static methods on <code>LH_Membership_organisation_team_invitations_class</code>, with the same arguments as WordPress&#8217;s own meta functions:</p><ul class=\"wp-block-list\"><li><code>add_invite_meta( $invite_id, $meta_key, $meta_value, $unique = false )</code></li><li><code>get_invite_meta( $invite_id, $meta_key = '', $single = true )</code>: an empty key returns all of the invitation&#8217;s meta.</li><li><code>update_invite_meta( $invite_id, $meta_key, $meta_value, $prev_value = '' )</code></li><li><code>delete_invite_meta( $invite_id, $meta_key = '', $meta_value = '' )</code>: an empty key deletes all of the invitation&#8217;s meta.</li></ul><p class=\"wp-block-paragraph\">They are deliberately not named <code>bp_invitations_*_invitemeta()</code>, so they cannot clash with BuddyBoss&#8217;s functions of that name or with any BuddyPress adds later.</p><h2 class=\"wp-block-heading\">Installation</h2><p class=\"wp-block-paragraph\">The table is created with <code>dbDelta</code> if it is missing, once per network, keyed on the class&#8217;s <code>schema_version()</code> (recorded in the network option <code>lh_membership-invitemeta_schema_version</code>), never on the plugin version. A table that already exists with the same schema is used as it is: on LocalHero it was created earlier by BuddyBoss. If BuddyBoss is active, its own invitation meta functions are left alone; they share the table, so there is no conflict.</p><h2 class=\"wp-block-heading\">Filters</h2><ul class=\"wp-block-list\"><li><code>lh_membership_return_invite_meta_table_name</code> ( string $table ): the table.</li><li><code>lh_membership_return_invite_meta_type</code> ( string $type ): the meta type. WordPress derives the <code>$wpdb</code> property, the <code>invite_id</code> column and the cache group from it, so change it only together with the table.</li></ul><p class=\"wp-block-paragraph\">The code is in <code>includes/lh-membership-organisation-team-invitations-class.php</code>. (Since 2.113.0; table named from BuddyPress&#8217;s invitations table since 2.120.1.)</p>"^^rdf:XMLLiteral ;
  sioc:content "Part of: LH MembershipBuddyPress has no meta for invitations, so LH Membership adds it: per-invitation data such as when a reminder was sent, kept with the invitation and deleted with it.StorageA table beside the invitations table BuddyPress actually uses, named from it: BP_Invitation_Manager::get_table_name() plus _invitemeta, so lhero_bp_invitations_invitemeta on LocalHero. It is in BuddyPress&#8217;s meta-table shape: id (primary key), invite_id (indexed), meta_key (indexed) and meta_value.The name is deliberately not built from bp_core_get_table_prefix(). On LocalHero, LH BuddyPress Multi Network makes that prefix each site&#8217;s own, while the invitations table is kept network-wide, so the prefix would give each site its own meta table. Before 2.120.1 it did: a site&#8217;s own requests (its reminder runs among them) wrote to a per-site table, while requests reaching the site with site_id read the network one.Read and written with WordPress&#8217;s metadata API under the meta type invite ($wpdb-&gt;invitemeta), wrapped in BuddyPress&#8217;s bp_filter_metaid_column_name exactly as BuddyPress&#8217;s groupmeta functions are.Object-cached in the invite_meta group, registered as a global cache group, so meta reads the same from any site, including through the main connector with site_id.When BuddyPress deletes invitations (today only when an account is deleted), their meta is deleted with them.FunctionsStatic methods on LH_Membership_organisation_team_invitations_class, with the same arguments as WordPress&#8217;s own meta functions:add_invite_meta( $invite_id, $meta_key, $meta_value, $unique = false )get_invite_meta( $invite_id, $meta_key = '', $single = true ): an empty key returns all of the invitation&#8217;s meta.update_invite_meta( $invite_id, $meta_key, $meta_value, $prev_value = '' )delete_invite_meta( $invite_id, $meta_key = '', $meta_value = '' ): an empty key deletes all of the invitation&#8217;s meta.They are deliberately not named bp_invitations_*_invitemeta(), so they cannot clash with BuddyBoss&#8217;s functions of that name or with any BuddyPress adds later.InstallationThe table is created with dbDelta if it is missing, once per network, keyed on the class&#8217;s schema_version() (recorded in the network option lh_membership-invitemeta_schema_version), never on the plugin version. A table that already exists with the same schema is used as it is: on LocalHero it was created earlier by BuddyBoss. If BuddyBoss is active, its own invitation meta functions are left alone; they share the table, so there is no conflict.Filterslh_membership_return_invite_meta_table_name ( string $table ): the table.lh_membership_return_invite_meta_type ( string $type ): the meta type. WordPress derives the $wpdb property, the invite_id column and the cache group from it, so change it only together with the table.The code is in includes/lh-membership-organisation-team-invitations-class.php. (Since 2.113.0; table named from BuddyPress&#8217;s invitations table since 2.120.1.)" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1>, <https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261122t031500-lh-membership-invitation-meta> .

<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> .
<https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261122t031500-lh-membership-invitation-meta> rdfs:seeAlso <https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261122t031500-lh-membership-invitation-meta&feed=lhrdf&format=turtle> .
