PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 7.3.4
Jetpack – WP Security, Backup, Speed, & Growth v7.3.4
12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 14.4.2 All 500 releases
jetpack / uninstall.php
uninstall.php
37 lines 956 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (
4 !defined( 'WP_UNINSTALL_PLUGIN' )
5 ||
6 !WP_UNINSTALL_PLUGIN
7 ||
8 dirname( WP_UNINSTALL_PLUGIN ) != dirname( plugin_basename( __FILE__ ) )
9 ) {
10 status_header( 404 );
11 exit;
12 }
13
14 if ( ! defined( 'JETPACK__PLUGIN_DIR' ) ) {
15 define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
16 }
17 require_once JETPACK__PLUGIN_DIR . 'class.jetpack-options.php';
18
19 Jetpack_Options::delete_all_known_options();
20
21 // Delete all legacy options
22 delete_option( 'jetpack_was_activated' );
23 delete_option( 'jetpack_auto_installed' );
24 delete_option( 'jetpack_register' );
25 delete_transient( 'jetpack_register' );
26
27 // Delete sync options
28 //
29 // Do not initialize any listeners.
30 // Since all the files will be deleted.
31 // No need to try to sync anything.
32 add_filter( 'jetpack_sync_modules', '__return_empty_array', 100 );
33
34 // Jetpack Sync
35 require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-sender.php';
36 Jetpack_Sync_Sender::get_instance()->uninstall();
37