forked from wpengine/phpcompat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.php
More file actions
33 lines (26 loc) · 700 Bytes
/
uninstall.php
File metadata and controls
33 lines (26 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Uninstall script
*
* @package WPEngine\PHPCompat
* @since 1.0.0
*/
// If uninstall.php is not called by WordPress, die.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
die;
}
delete_option( 'wpephpcompat.lock' );
delete_option( 'wpephpcompat.status' );
delete_option( 'wpephpcompat.numdirs' );
// Clear scheduled cron.
wp_clear_scheduled_hook( 'wpephpcompat_start_test_cron' );
// Make sure all directories are removed from the queue.
$args = array(
'posts_per_page' => -1,
'post_type' => 'wpephpcompat_jobs',
);
$directories = get_posts( $args );
foreach ( $directories as $directory ) {
wp_delete_post( $directory->ID );
}
delete_option( 'wpephpcompat.scan_results' );