wpcf7_akismet_is_available

The Contact Form 7 wpcf7 akismet is available function.

Description

wpcf7_akismet_is_available(); 

Usage

  1. if ( !function_exists( 'wpcf7_akismet_is_available' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/modules/akismet.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpcf7_akismet_is_available(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/akismet.php  
  1. function wpcf7_akismet_is_available() { 
  2. if ( is_callable( array( 'Akismet', 'get_api_key' ) ) ) { // Akismet v3.0+ 
  3. return (bool) Akismet::get_api_key(); 
  4.  
  5. if ( function_exists( 'akismet_get_key' ) ) { 
  6. return (bool) akismet_get_key(); 
  7.  
  8. return false;