public static function bail_on_activation($message, $deactivate = true)
{
?>
<!doctype html>
<html>
<head>
<meta charset="<?php
bloginfo('charset');
?>
">
<style>
* {
text-align: center;
margin: 0;
padding: 0;
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
}
p {
margin-top: 1em;
font-size: 18px;
}
</style>
<body>
<p><?php
echo esc_html($message);
?>
</p>
</body>
</html>
<?php
if ($deactivate) {
$plugins = get_option('active_plugins');
$jetpack = plugin_basename(JETPACK__PLUGIN_DIR . 'jetpack.php');
$update = false;
foreach ($plugins as $i => $plugin) {
if ($plugin === $jetpack) {
$plugins[$i] = false;
$update = true;
}
}
if ($update) {
update_option('active_plugins', array_filter($plugins));
}
}
exit;
}