Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack
File: uninstall.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Functionality that is executed when Jetpack is uninstalled via built-in WordPress commands.
[2] Fix | Delete
*
[3] Fix | Delete
* @package automattic/jetpack
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
use Automattic\Jetpack\Backup\V0005\Helper_Script_Manager;
[7] Fix | Delete
use Automattic\Jetpack\Connection\Manager as Connection_Manager;
[8] Fix | Delete
use Automattic\Jetpack\Sync\Sender;
[9] Fix | Delete
[10] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[11] Fix | Delete
exit( 0 );
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* Uninstall script for Jetpack.
[16] Fix | Delete
*/
[17] Fix | Delete
function jetpack_uninstall() {
[18] Fix | Delete
if (
[19] Fix | Delete
! defined( 'WP_UNINSTALL_PLUGIN' ) ||
[20] Fix | Delete
! WP_UNINSTALL_PLUGIN ||
[21] Fix | Delete
dirname( WP_UNINSTALL_PLUGIN ) !== dirname( plugin_basename( __FILE__ ) )
[22] Fix | Delete
) {
[23] Fix | Delete
status_header( 404 );
[24] Fix | Delete
exit( 0 );
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
if ( ! defined( 'JETPACK__PLUGIN_DIR' ) ) {
[28] Fix | Delete
define( 'JETPACK__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
require JETPACK__PLUGIN_DIR . 'vendor/autoload_packages.php';
[32] Fix | Delete
[33] Fix | Delete
if ( method_exists( Connection_Manager::class, 'is_ready_for_cleanup' ) && ! Connection_Manager::is_ready_for_cleanup( dirname( plugin_basename( __FILE__ ) ) ) ) {
[34] Fix | Delete
// There are other active Jetpack plugins, no need for cleanup.
[35] Fix | Delete
return;
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
Jetpack_Options::delete_all_known_options();
[39] Fix | Delete
[40] Fix | Delete
// Delete all legacy options.
[41] Fix | Delete
delete_option( 'jetpack_was_activated' );
[42] Fix | Delete
delete_option( 'jetpack_auto_installed' );
[43] Fix | Delete
delete_option( 'jetpack_register' );
[44] Fix | Delete
delete_transient( 'jetpack_register' );
[45] Fix | Delete
[46] Fix | Delete
// Delete sync options
[47] Fix | Delete
//
[48] Fix | Delete
// Do not initialize any listeners.
[49] Fix | Delete
// Since all the files will be deleted.
[50] Fix | Delete
// No need to try to sync anything.
[51] Fix | Delete
add_filter( 'jetpack_sync_modules', '__return_empty_array', 100 );
[52] Fix | Delete
[53] Fix | Delete
// Jetpack Sync.
[54] Fix | Delete
Sender::get_instance()->uninstall();
[55] Fix | Delete
[56] Fix | Delete
// Jetpack Backup: Cleanup any leftover Helper Scripts.
[57] Fix | Delete
Helper_Script_Manager::delete_all_helper_scripts();
[58] Fix | Delete
}
[59] Fix | Delete
[60] Fix | Delete
jetpack_uninstall();
[61] Fix | Delete
[62] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function