Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/31/2020 02:45:13 AM (6 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/class-bp-blogs-blog.php

    r12246 r12606  
    99                if ( ! is_multisite() ) {
    1010                        $this->markTestSkipped();
    11                 }
    12 
    13                 if ( function_exists( 'wp_initialize_site' ) ) {
    14                         $this->setExpectedDeprecated( 'wpmu_new_blog' );
    1511                }
    1612
     
    4238                }
    4339
    44                 if ( function_exists( 'wp_initialize_site' ) ) {
    45                         $this->setExpectedDeprecated( 'wpmu_new_blog' );
    46                 }
    47 
    4840                $old_user = get_current_user_id();
    4941
     
    7163                if ( ! is_multisite() ) {
    7264                        $this->markTestSkipped();
    73                 }
    74 
    75                 if ( function_exists( 'wp_initialize_site' ) ) {
    76                         $this->setExpectedDeprecated( 'wpmu_new_blog' );
    7765                }
    7866
     
    10694                }
    10795
    108                 if ( function_exists( 'wp_initialize_site' ) ) {
    109                         $this->setExpectedDeprecated( 'wpmu_new_blog' );
    110                 }
    111 
    11296                $old_user = get_current_user_id();
    11397
     
    136120                if ( ! is_multisite() ) {
    137121                        $this->markTestSkipped();
    138                 }
    139 
    140                 if ( function_exists( 'wp_initialize_site' ) ) {
    141                         $this->setExpectedDeprecated( 'wpmu_new_blog' );
    142122                }
    143123
Note: See TracChangeset for help on using the changeset viewer.