Created
October 20, 2016 13:35
-
-
Save jeherve/103e3f8678e9471792d3960e903acc15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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