Skip to content

Commit

Permalink
Use the $wp_filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed May 9, 2023
1 parent 738e3bc commit 079c5f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion activate.php
Expand Up @@ -39,8 +39,10 @@ function sqlite_activation() {

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

0 comments on commit 079c5f2

Please sign in to comment.