bp_update_to_2_7()

2.7.0 update routine.

Description

  • Add email unsubscribe salt.
  • Save legacy directory titles to the corresponding WP pages.
  • Add ignore deprecated code option (false for updates).

Source

File: bp-core/bp-core-update.php

570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
function bp_update_to_2_7() {
    bp_add_option( 'bp-emails-unsubscribe-salt', base64_encode( wp_generate_password( 64, true, true ) ) );
 
    // Update post_titles
    bp_migrate_directory_page_titles();
 
    /*
     * Add `parent_id` column to groups table.
     * Also handled by `bp_core_install()`.
     */
    if ( bp_is_active( 'groups' ) ) {
        bp_core_install_groups();
 
        // Invalidate all cached group objects.
        global $wpdb;
        $bp = buddypress();
 
        $group_ids = $wpdb->get_col( "SELECT id FROM {$bp->groups->table_name}" );
 
        foreach ( $group_ids as $group_id ) {
            wp_cache_delete( $group_id, 'bp_groups' );
        }
    }
 
    // Do not ignore deprecated code for existing installs.
    bp_add_option( '_bp_ignore_deprecated_code', false );
}

Changelog

Changelog
Version Description
BuddyPress 2.7.0 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.