Changeset 12898 for trunk/src/bp-core/admin/bp-core-admin-schema.php
- Timestamp:
- 04/20/2021 04:02:43 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/admin/bp-core-admin-schema.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-schema.php
r12886 r12898 40 40 // Install the invitations table. 41 41 bp_core_install_invitations(); 42 43 // Install the nonmember opt-outs table. 44 bp_core_install_nonmember_opt_outs(); 42 45 43 46 // Notifications. … … 591 594 do_action( 'bp_core_install_invitations' ); 592 595 } 596 597 /** 598 * Install database tables to store opt-out requests from nonmembers. 599 * 600 * @since 8.0.0 601 * 602 * @uses bp_core_set_charset() 603 * @uses bp_core_get_table_prefix() 604 * @uses dbDelta() 605 */ 606 function bp_core_install_nonmember_opt_outs() { 607 $sql = array(); 608 $charset_collate = $GLOBALS['wpdb']->get_charset_collate(); 609 $bp_prefix = bp_core_get_table_prefix(); 610 $optouts_class = new BP_Optout(); 611 $table_name = $optouts_class->get_table_name(); 612 $sql = "CREATE TABLE {$table_name} ( 613 id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, 614 email_address_hash varchar(255) NOT NULL, 615 user_id bigint(20) NOT NULL, 616 email_type varchar(255) NOT NULL, 617 date_modified datetime NOT NULL, 618 KEY user_id (user_id), 619 KEY email_type (email_type), 620 KEY date_modified (date_modified) 621 ) {$charset_collate};"; 622 dbDelta( $sql ); 623 624 /** 625 * Fires after BuddyPress adds the nonmember opt-outs table. 626 * 627 * @since 8.0.0 628 */ 629 do_action( 'bp_core_install_nonmember_opt_outs' ); 630 }
Note: See TracChangeset
for help on using the changeset viewer.