Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/31/2020 02:45:13 AM (5 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/blogs/cache.php

    r12247 r12606  
    1414        }
    1515
    16         if ( function_exists( 'wp_initialize_site' ) ) {
    17             $this->setExpectedDeprecated( 'wpmu_new_blog' );
    18         }
    19 
    2016        $b1 = self::factory()->blog->create();
    2117        $b2 = self::factory()->blog->create();
     
    9995        }
    10096
    101         if ( function_exists( 'wp_initialize_site' ) ) {
    102             $this->setExpectedDeprecated( 'wpmu_new_blog' );
    103         }
    104 
    10597        $u = self::factory()->user->create();
    10698
     
    197189        }
    198190
    199         if ( function_exists( 'wp_initialize_site' ) ) {
    200             $this->setExpectedDeprecated( 'wpmu_new_blog' );
    201         }
    202 
    203191        $u = self::factory()->user->create();
    204192
     
    274262        if ( ! is_multisite() ) {
    275263            $this->markTestSkipped();
    276         }
    277 
    278         if ( function_exists( 'wp_initialize_site' ) ) {
    279             $this->setExpectedDeprecated( 'wpmu_new_blog' );
    280             $this->setExpectedDeprecated( 'delete_blog' );
    281264        }
    282265
     
    315298        }
    316299
    317         if ( function_exists( 'wp_initialize_site' ) ) {
    318             $this->setExpectedDeprecated( 'wpmu_new_blog' );
    319         }
    320 
    321300        $u = self::factory()->user->create();
    322301
Note: See TracChangeset for help on using the changeset viewer.