Professional Documents
Culture Documents
php
/*
* Deactivation page to simple deactivate the plugin when backend is not accessible
anymore
* To deactivate:
* 1) rename this file to force-deactivate.php
* 2) Go in your browser to www.yourdomain.com/wp-content/plugins/really-
simple-ssl/force-deactivate.php.
* 3) IMPORTANT!!!! Rename this file back to .txt
*/
?>
<html>
<body>
<?php
# No need for the template engine
define( 'WP_USE_THEMES', false );
if (!is_plugin_active($core_plugin) ) {
echo "<h1>Really Simple SSL is already deactivated!</h1>";
exit;
}
$step = 1;
echo "<h1>Force deactivation of Really Simple SSL</h1>";
echo $step.". Resetting options"."<br>";
$networkwide = is_multisite();
$really_simple_ssl->deactivate($networkwide);
$step++;
$step++;
echo $step.". Completed with <b>".count($really_simple_ssl->errors)."</b>
error(s)"."<br>";
if ( is_multisite() ) {
} else {
$current = get_option( 'active_plugins', array() );
$current = rl_remove_plugin_from_array($plugin, $current);
update_option('active_plugins', $current);
}
update_option('active_plugins', $current);
/**
* Helper function to find Wordpress base path.
*/
function find_wordpress_base_path() {
$dir = dirname(__FILE__);
do {
//it is possible to check for other files here
if( file_exists($dir."/wp-load.php") ) {
return $dir;
}
// The Bedrock wordpress structure's WP base path is not simply up the tree
// from the plugins directory; it's in the /web/wp directory.
// See https://roots.io/bedrock/docs/folder-structure/ for more info.
if (file_exists($dir."/wp")) {
return $dir."/wp";
}
} while( $dir = realpath("$dir/..") );
return null;
}
?>
</body>
</html>