bp_core_install_invitations()
Install database tables for the Invitations API
Description
Source
File: bp-core/admin/bp-core-admin-schema.php
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 | function bp_core_install_invitations() { $sql = array (); $charset_collate = $GLOBALS [ 'wpdb' ]->get_charset_collate(); $bp_prefix = bp_core_get_table_prefix(); $sql [] = "CREATE TABLE { $bp_prefix }bp_invitations ( id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, user_id bigint(20) NOT NULL, inviter_id bigint(20) NOT NULL, invitee_email varchar(100) DEFAULT NULL, class varchar(120) NOT NULL, item_id bigint(20) NOT NULL, secondary_item_id bigint(20) DEFAULT NULL, type varchar(12) NOT NULL DEFAULT 'invite' , content longtext DEFAULT '' , date_modified datetime NOT NULL, invite_sent tinyint(1) NOT NULL DEFAULT '0' , accepted tinyint(1) NOT NULL DEFAULT '0' , KEY user_id (user_id), KEY inviter_id (inviter_id), KEY invitee_email (invitee_email), KEY class ( class ), KEY item_id (item_id), KEY secondary_item_id (secondary_item_id), KEY type (type), KEY invite_sent (invite_sent), KEY accepted (accepted) ) { $charset_collate };"; dbDelta( $sql ); /** * Fires after BuddyPress adds the invitations table. * * @since BuddyPress 5.0.0 */ do_action( 'bp_core_install_invitations' ); } |
Changelog
Version | Description |
---|---|
BuddyPress 5.0.0 | BuddyPress 5.0.0 |
BuddyBoss 1.3.5 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.