bb_akismet_verify_key

The BuddyPress bb akismet verify key function.

Description

bb_akismet_verify_key( $key ); 

Parameters (1)

0. $key
The key.

Usage

  1. if ( !function_exists( 'bb_akismet_verify_key' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-plugins/akismet.php'; 
  3.  
  4. // The key. 
  5. $key = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_akismet_verify_key($key); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-plugins/akismet.php  
  1. function bb_akismet_verify_key( $key ) 
  2. global $bb_ksd_api_port; 
  3. $blog = urlencode( bb_get_uri( null, null, BB_URI_CONTEXT_TEXT + BB_URI_CONTEXT_AKISMET ) ); 
  4. $response = bb_ksd_http_post( 'key=' . $key . '&blog=' . $blog, 'rest.akismet.com', '/1.1/verify-key', $bb_ksd_api_port ); 
  5. if ( 'valid' == $response[1] ) { 
  6. return true; 
  7. } else { 
  8. return false;