jetpack
Last commit date
3rd-party
6 years ago
_inc
6 years ago
bin
6 years ago
css
6 years ago
extensions
1 year ago
images
6 years ago
json-endpoints
3 years ago
languages
6 years ago
modules
1 year ago
sal
6 years ago
src
6 years ago
vendor
6 years ago
views
7 years ago
.svnignore
12 years ago
CODE-OF-CONDUCT.md
9 years ago
changelog.txt
6 years ago
class.frame-nonce-preview.php
6 years ago
class.jetpack-admin.php
6 years ago
class.jetpack-affiliate.php
6 years ago
class.jetpack-autoupdate.php
6 years ago
class.jetpack-bbpress-json-api.compat.php
6 years ago
class.jetpack-cli.php
6 years ago
class.jetpack-client-server.php
6 years ago
class.jetpack-connection-banner.php
6 years ago
class.jetpack-data.php
6 years ago
class.jetpack-debugger.php
7 years ago
class.jetpack-error.php
10 years ago
class.jetpack-gutenberg.php
6 years ago
class.jetpack-heartbeat.php
6 years ago
class.jetpack-idc.php
6 years ago
class.jetpack-ixr-client.php
6 years ago
class.jetpack-modules-list-table.php
6 years ago
class.jetpack-network-sites-list-table.php
6 years ago
class.jetpack-network.php
6 years ago
class.jetpack-plan.php
6 years ago
class.jetpack-post-images.php
6 years ago
class.jetpack-twitter-cards.php
6 years ago
class.jetpack-user-agent.php
6 years ago
class.jetpack-xmlrpc-server.php
6 years ago
class.jetpack.php
6 years ago
class.json-api-endpoints.php
3 years ago
class.json-api.php
6 years ago
class.photon.php
6 years ago
composer.json
6 years ago
functions.compat.php
6 years ago
functions.cookies.php
6 years ago
functions.gallery.php
6 years ago
functions.global.php
6 years ago
functions.opengraph.php
6 years ago
functions.photon.php
6 years ago
jest.config.js
6 years ago
jetpack.php
1 year ago
json-api-config.php
10 years ago
json-endpoints.php
7 years ago
load-jetpack.php
6 years ago
locales.php
7 years ago
readme.txt
1 year ago
require-lib.php
6 years ago
uninstall.php
6 years ago
wpml-config.xml
10 years ago
uninstall.php
48 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Functionality that is executed when Jetpack is uninstalled via built-in WordPress commands. |
| 4 | * |
| 5 | * @package Jetpack |
| 6 | */ |
| 7 | |
| 8 | use Automattic\Jetpack\Sync\Sender; |
| 9 | use Automattic\Jetpack\Backup\Helper_Script_Manager; |
| 10 | |
| 11 | if ( |
| 12 | !defined( 'WP_UNINSTALL_PLUGIN' ) |
| 13 | || |
| 14 | !WP_UNINSTALL_PLUGIN |
| 15 | || |
| 16 | dirname( WP_UNINSTALL_PLUGIN ) != dirname( plugin_basename( __FILE__ ) ) |
| 17 | ) { |
| 18 | status_header( 404 ); |
| 19 | exit; |
| 20 | } |
| 21 | |
| 22 | if ( ! defined( 'JETPACK__PLUGIN_DIR' ) ) { |
| 23 | define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); |
| 24 | } |
| 25 | |
| 26 | require JETPACK__PLUGIN_DIR . 'vendor/autoload_packages.php'; |
| 27 | |
| 28 | Jetpack_Options::delete_all_known_options(); |
| 29 | |
| 30 | // Delete all legacy options |
| 31 | delete_option( 'jetpack_was_activated' ); |
| 32 | delete_option( 'jetpack_auto_installed' ); |
| 33 | delete_option( 'jetpack_register' ); |
| 34 | delete_transient( 'jetpack_register' ); |
| 35 | |
| 36 | // Delete sync options |
| 37 | // |
| 38 | // Do not initialize any listeners. |
| 39 | // Since all the files will be deleted. |
| 40 | // No need to try to sync anything. |
| 41 | add_filter( 'jetpack_sync_modules', '__return_empty_array', 100 ); |
| 42 | |
| 43 | // Jetpack Sync |
| 44 | Sender::get_instance()->uninstall(); |
| 45 | |
| 46 | // Jetpack Backup: Cleanup any leftover Helper Scripts |
| 47 | Helper_Script_Manager::delete_all_helper_scripts(); |
| 48 |