• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Akismet::bail_on_activation() –

You appear to be a bot. Output may be restricted

Description

Usage

Akismet::bail_on_activation( $message, $deactivate );

Parameters

$message
( mixed ) required –
$deactivate
( mixed ) optional default: 1 –

Returns

void

Source

File name: akismet/class.akismet.php
Lines:

1 to 41 of 41
  private 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>
</head>
<body>
<p><?php echo esc_html( $message ); ?></p>
</body>
</html>
<?php
    if ( $deactivate ) {
      $plugins = get_option( 'active_plugins' );
      $akismet = plugin_basename( AKISMET__PLUGIN_DIR . 'akismet.php' );
      $update  = false;
      foreach ( $plugins as $i => $plugin ) {
        if ( $plugin === $akismet ) {
          $plugins[$i] = false;
          $update = true;
        }
      }

      if ( $update ) {
        update_option( 'active_plugins', array_filter( $plugins ) );
      }
    }
    exit;
  }
 

 View on GitHub View on Trac

Published: 19th December 2019 | Last updated: 19th December 2019

Primary Sidebar

Information

Function name: Akismet::bail_on_activation
Class ref: Akismet
Plugin ref: Akismet
Version: 5.0.1
Sourcefile: class.akismet.php
File ref: class.akismet.php
Deprecated?: No
API Letters: A,B,O

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 6.1.1. PHP: 8.0.28
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wp-a2z.org
© Copyright WordPress a2z 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites