Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Refactor uninstall.php file
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Secchi committed Feb 5, 2024
1 parent 3432f76 commit 1643ec6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions uninstall.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<?php
/**
* Functionality that is executed when WritePoetry is uninstalled via built-in WordPress commands.
*
*/


// if uninstall.php is not called by WordPress, die
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
die;
die;
}

if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
}

use \WritePoetry\Api\PluginConfig;
use WritePoetry\Api\PluginConfig;

$config = PluginConfig::getInstance();
$config = PluginConfig::getInstance();
$all_options = wp_load_alloptions();

// Delete all plugin options in wp_otions table
Expand All @@ -31,4 +30,3 @@

// Clear any cached data that has been removed.
wp_cache_flush();

0 comments on commit 1643ec6

Please sign in to comment.