Skip to content

Commit 079c5f2

Browse files
committed
Use the $wp_filesystem
1 parent 738e3bc commit 079c5f2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

activate.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ function sqlite_activation() {
3939

4040
// Handle upgrading from the performance-lab plugin.
4141
if ( isset( $_GET['upgrade-from-pl'] ) ) {
42+
global $wp_filesystem;
43+
require_once ABSPATH . '/wp-admin/includes/file.php';
4244
// Delete the previous db.php file.
43-
unlink( WP_CONTENT_DIR . '/db.php' );
45+
$wp_filesystem->delete( WP_CONTENT_DIR . '/db.php' );
4446
// Deactivate the performance-lab SQLite module.
4547
$pl_option_name = defined( 'PERFLAB_MODULES_SETTING' ) ? PERFLAB_MODULES_SETTING : 'perflab_modules_settings';
4648
$pl_option = get_option( $pl_option_name, array() );

0 commit comments

Comments
 (0)