Skip to:
Content

bbPress.org

Changeset 6060


Ignore:
Timestamp:
06/09/2016 05:26:13 AM (9 years ago)
Author:
netweb
Message:

Tools - Unit Tests: Use get_sites() for muiltisite PHPUnit testcase in BBP_UnitTestCase::tearDown

WordPress 4.6 deprecated wp_get_sites(), switch to the replacement get_sites() via #WP36994 / changeset:37653

Fixes #2962.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase.php

    r5947 r6060  
    5050
    5151        if ( is_multisite() ) {
    52             $blogs = wp_get_sites();
     52            // WordPress 4.6 deprecated `wp_get_sites()`, see https://core.trac.wordpress.org/changeset/37653
     53            if ( bbp_get_major_wp_version() >= 4.6 ) {
     54                $blogs = get_sites();
     55            } else {
     56                $blogs = wp_get_sites();
     57            }
     58
    5359            foreach ( $blogs as $blog ) {
    5460                if ( 1 !== (int) $blog['blog_id'] ) {
Note: See TracChangeset for help on using the changeset viewer.