Skip to content

Commit ec78de4

Browse files
committed
Add uninstall.php and delete scan_results on wp-cli.
1 parent 4492532 commit ec78de4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/wpcli.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function __invoke( $args, $assoc_args ) {
4444
WP_CLI::log( $results );
4545

4646
$wpephpc->clean_after_scan();
47+
delete_option( 'wpephpcompat.scan_results' );
4748

4849
if ( preg_match( '/(\d*) ERRORS?/i', $results ) ) {
4950
WP_CLI::error( 'Your WordPress install is not compatible.' );

uninstall.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
// If uninstall.php is not called by WordPress, die.
4+
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
5+
die;
6+
}
7+
8+
require_once( __DIR__ . '/src/wpephpcompat.php' );
9+
10+
$wpephpc = new \WPEPHPCompat( __DIR__ );
11+
$wpephpc->clean_after_scan();
12+
delete_option( 'wpephpcompat.scan_results' );

0 commit comments

Comments
 (0)