You appear to be a bot. Output may be restricted
Description
Check if Akismet class file exists and if class is loaded.
Usage
$bool|WP_Error = Jetpack_Core_API_Module_Data_Endpoint::akismet_class_exists();
Parameters
Returns
bool|WP_Error Returns true if class file exists and class is loaded, WP_Error otherwise.
Source
File name: jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php
Lines:
1 to 11 of 11
private function akismet_class_exists() { if ( ! file_exists( WP_PLUGIN_DIR . '/akismet/class.akismet.php' ) ) { return new WP_Error( 'not_installed', esc_html__( 'Please install Akismet.', 'jetpack' ), array( 'status' => 400 ) ); } if ( ! class_exists( 'Akismet' ) ) { return new WP_Error( 'not_active', esc_html__( 'Please activate Akismet.', 'jetpack' ), array( 'status' => 400 ) ); } return true; }