Changeset 12428
- Timestamp:
- 08/12/2019 08:42:30 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-schema.php
r12390 r12428 541 541 do_action( 'bp_core_install_emails' ); 542 542 } 543 544 /** 545 * Install database tables for the Invitations API 546 * 547 * @since 5.0.0 548 * 549 * @uses bp_core_set_charset() 550 * @uses bp_core_get_table_prefix() 551 * @uses dbDelta() 552 */ 553 function bp_core_install_invitations() { 554 $sql = array(); 555 $charset_collate = $GLOBALS['wpdb']->get_charset_collate(); 556 $bp_prefix = bp_core_get_table_prefix(); 557 $sql[] = "CREATE TABLE {$bp_prefix}bp_invitations ( 558 id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, 559 user_id bigint(20) NOT NULL, 560 inviter_id bigint(20) NOT NULL, 561 invitee_email varchar(100) DEFAULT NULL, 562 class varchar(120) NOT NULL, 563 item_id bigint(20) NOT NULL, 564 secondary_item_id bigint(20) DEFAULT NULL, 565 type varchar(12) NOT NULL DEFAULT 'invite', 566 content longtext DEFAULT '', 567 date_modified datetime NOT NULL, 568 invite_sent tinyint(1) NOT NULL DEFAULT '0', 569 accepted tinyint(1) NOT NULL DEFAULT '0', 570 KEY user_id (user_id), 571 KEY inviter_id (inviter_id), 572 KEY invitee_email (invitee_email), 573 KEY class (class), 574 KEY item_id (item_id), 575 KEY secondary_item_id (secondary_item_id), 576 KEY type (type), 577 KEY invite_sent (invite_sent), 578 KEY accepted (accepted) 579 ) {$charset_collate};"; 580 dbDelta( $sql ); 581 582 /** 583 * Fires after BuddyPress adds the invitations table. 584 * 585 * @since 5.0.0 586 */ 587 do_action( 'bp_core_install_invitations' ); 588 } -
trunk/src/bp-core/bp-core-cache.php
r11864 r12428 380 380 return wp_cache_delete( 'incrementor', $group ); 381 381 } 382 383 /** 384 * Resets all incremented bp_invitations caches. 385 * 386 * @since 5.0.0 387 */ 388 function bp_invitations_reset_cache_incrementor() { 389 bp_core_reset_incrementor( 'bp_invitations' ); 390 } 391 add_action( 'bp_invitation_after_save', 'bp_invitations_reset_cache_incrementor' ); 392 add_action( 'bp_invitation_after_delete', 'bp_invitations_reset_cache_incrementor' ); -
trunk/src/bp-core/bp-core-update.php
r12390 r12428 212 212 bp_core_add_page_mappings( $default_components, 'delete' ); 213 213 bp_core_install_emails(); 214 bp_core_install_invitations(); 214 215 215 216 // Upgrades. … … 552 553 * 553 554 * - Make sure the custom visibility is disabled for the default profile field. 555 * - Create the invitations table. 554 556 * 555 557 * @since 5.0.0 … … 580 582 ) 581 583 ); 584 585 bp_core_install_invitations(); 582 586 } 583 587 -
trunk/src/class-buddypress.php
r12405 r12428 573 573 'BP_Walker_Nav_Menu_Checklist' => 'core', 574 574 'BP_Walker_Nav_Menu' => 'core', 575 'BP_Invitation_Manager' => 'core', 576 'BP_Invitation' => 'core', 575 577 576 578 'BP_Core_Friends_Widget' => 'friends',
Note: See TracChangeset
for help on using the changeset viewer.