You appear to be a bot. Output may be restricted
Description
Is Akismet registered and active?
Usage
$bool|WP_Error = Jetpack_Core_API_Module_Data_Endpoint::akismet_is_active_and_registered();
Parameters
Returns
bool|WP_Error True if Akismet is active and registered. Otherwise, a WP_Error instance with the corresponding error.
Source
File name: jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php
Lines:
1 to 16 of 16
private function akismet_is_active_and_registered() { if ( is_wp_error( $akismet_exists = $this->akismet_class_exists() ) ) { return $akismet_exists; } // What about if Akismet is put in a sub-directory or maybe in mu-plugins? require_once WP_PLUGIN_DIR . '/akismet/class.akismet.php'; require_once WP_PLUGIN_DIR . '/akismet/class.akismet-admin.php'; $akismet_key = Akismet::verify_key( Akismet::get_api_key() ); if ( ! $akismet_key || 'invalid' === $akismet_key || 'failed' === $akismet_key ) { return new WP_Error( 'invalid_key', esc_html__( 'Invalid Akismet key. Please contact support.', 'jetpack' ), array( 'status' => 400 ) ); } return true; }