Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Plugin Name: Force Deactivate Jetpack's Protect Module.
* Plugin URI: https://jetpack.com/support/security-features/#unblock
* Description: If you have lost access to your site's dashboard, you can use this plugin to deactivate the Protect module.
* Author: Automattic
* Version: 1.0.0
* Author URI: http://jetpack.com
* License: GPL2+
*
* @package Force Deactivate Protect
*/
/**
* Drop this plugin to your site's `wp-content/mu-plugins/` folder to activate it on your site,
* even if you don't have access to your dashboard.
*
* Before to use this plugin, try to unblock yourself by following the instructions here:
* https://jetpack.com/support/security-features/#unblock
*
* If you have more questions, you can contact the Jetpack team here:
* http://jetpack.com/contact-support/
*/
function jetpack_2877983_force_deactivate_protect() {
if ( class_exists( 'Jetpack' ) ) {
Jetpack::deactivate_module( 'protect' );
}
}
add_action( 'init', 'jetpack_2877983_force_deactivate_protect' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.