Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/31/2020 02:45:13 AM (4 years ago)
Author:
imath
Message:

Adapt BuddyPress to WP 5.1.0 multisite changes & deprecations

Version 5.1.0 of WordPress deprecated two hooks (wpmu_new_blog & delete_blog) BuddyPress is using to run some of the BP Blogs component's features. In order to preserve these features for the versions of WordPress we support and that are older than 5.1.0 as well as start using the replacement hooks introduced in 5.1.0 (wp_initialize_site & wp_validate_site_deletion), we are introducing a compatibility mechanism to make sure BuddyPress is using the right hooks depending on the installed WordPress it's activated on.

Props boonebgorges & I ;)

Fixes #7984

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/activity/functions.php

    r12605 r12606  
    856856        }
    857857
    858         if ( function_exists( 'wp_initialize_site' ) ) {
    859             $this->setExpectedDeprecated( 'wpmu_new_blog' );
    860         }
    861 
    862858        $b = self::factory()->blog->create();
    863859        $u = self::factory()->user->create();
     
    972968        }
    973969
    974         if ( function_exists( 'wp_initialize_site' ) ) {
    975             $this->setExpectedDeprecated( 'wpmu_new_blog' );
    976         }
    977 
    978970        $b = self::factory()->blog->create();
    979971        $u = self::factory()->user->create();
     
    11071099    public function test_bp_activity_format_activity_action_custom_post_type_comment() {
    11081100        if ( is_multisite() ) {
    1109             if ( function_exists( 'wp_initialize_site' ) ) {
    1110                 $this->setExpectedDeprecated( 'wpmu_new_blog' );
    1111             }
    1112 
    11131101            $b = self::factory()->blog->create();
    11141102            switch_to_blog( $b );
Note: See TracChangeset for help on using the changeset viewer.