Changeset 13168 for trunk/src/bp-core/bp-core-update.php
- Timestamp:
- 12/10/2021 04:14:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-update.php
r12929 r13168 279 279 bp_update_to_8_0(); 280 280 } 281 282 // Version 10.0.0. 283 if ( $raw_db_version < 13165 ) { 284 bp_update_to_10_0(); 285 } 286 281 287 } 282 288 … … 700 706 if ( isset( $emails['bp-members-invitation'] ) ) { 701 707 $new_emails['bp-members-invitation'] = $emails['bp-members-invitation']; 708 } 709 710 return $new_emails; 711 } 712 713 /** 714 * 10.0.0 update routine. 715 * 716 * - Install new BP Emails for membership requests. 717 * 718 * @since 10.0.0 719 */ 720 function bp_update_to_10_0() { 721 722 // Install membership request emails. 723 add_filter( 'bp_email_get_schema', 'bp_core_get_10_0_upgrade_email_schema' ); 724 725 bp_core_install_emails(); 726 727 remove_filter( 'bp_email_get_schema', 'bp_core_get_10_0_upgrade_email_schema' ); 728 } 729 730 /** 731 * Select only the emails that need to be installed with version 10.0. 732 * 733 * @since 10.0.0 734 * 735 * @param array $emails The array of emails schema. 736 */ 737 function bp_core_get_10_0_upgrade_email_schema( $emails ) { 738 $new_emails = array(); 739 740 if ( isset( $emails['members-membership-request'] ) ) { 741 $new_emails['members-membership-request'] = $emails['members-membership-request']; 742 } 743 744 if ( isset( $emails['members-membership-request-rejected'] ) ) { 745 $new_emails['members-membership-request-rejected'] = $emails['members-membership-request-rejected']; 702 746 } 703 747
Note: See TracChangeset
for help on using the changeset viewer.