Skip to content

Commit d09f591

Browse files
authored
Ensure wpmu_delete_blog() is loaded (#818)
1 parent 676b30c commit d09f591

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## v1.13.1
9+
10+
### Fixed
11+
12+
- Fixed issue with `wpmu_delete_blog()` not being loaded before use.
13+
814
## v1.13.0
915

1016
### Added

src/mantle/testing/class-utils.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ public static function delete_all_blogs(): void {
189189
// phpcs:disable WordPress.DB,WordPressVIPMinimum.Variables
190190
global $wpdb;
191191

192+
if ( ! function_exists( 'wpmu_delete_blog' ) ) {
193+
require_once ABSPATH . 'wp-admin/includes/ms.php';
194+
}
195+
192196
foreach ( $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs} WHERE blog_id != 1" ) as $blog_id ) {
193197
wpmu_delete_blog( $blog_id, true );
194198
}

0 commit comments

Comments
 (0)