akismet_plugin_action_links

Definition:
function akismet_plugin_action_links( $links, $file ) {}

Parameters

  • $links
  • $file

Source code

function akismet_plugin_action_links( $links, $file ) {

	if ( $file == plugin_basename( dirname(__FILE__).'/akismet.php' ) ) {

		$links[] = '<a href="plugins.php?page=akismet-key-config">'.__('Settings').'</a>';

	}



	return $links;

}

9035

akismet_microtime

Definition:
function akismet_microtime() {}

Source code

function akismet_microtime() {

	$mtime = explode( ' ', microtime() );

	return $mtime[1] + $mtime[0];

}

9032

akismet_get_user_comments_approved

Definition:
function akismet_get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) {}

Parameters

  • $user_id
  • $comment_author_email
  • $comment_author
  • $comment_author_url

Source code

function akismet_get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) {

	global $wpdb;

	

	if ( !empty($user_id) )

		return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->comments WHERE user_id = %d AND comment_approved = 1", $user_id ) );

		

	if ( !empty($comment_author_email) )

		return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_author_email = %s AND comment_author = %s AND comment_author_url = %s AND comment_approved = 1", $comment_author_email, $comment_author, $comment_author_url ) );

		

	return 0;

}

9025

akismet_get_server_connectivity

Definition:
function akismet_get_server_connectivity( $cache_timeout = 86400 ) {}

Parameters

  • $cache_timeout

Source code

function akismet_get_server_connectivity( $cache_timeout = 86400 ) {

	$servers = get_option('akismet_available_servers');

	if ( (time() - get_option('akismet_connectivity_time') < $cache_timeout) && $servers !== false )

		return $servers;

	

	// There's a race condition here but the effect is harmless.

	$servers = akismet_check_server_connectivity();

	update_option('akismet_available_servers', $servers);

	update_option('akismet_connectivity_time', time());

	return $servers;

}

9023

akismet_get_comment_history

Definition:
function akismet_get_comment_history( $comment_id ) {}

Parameters

  • $comment_id

Source code

function akismet_get_comment_history( $comment_id ) {

	

	// failsafe for old WP versions

	if ( !function_exists('add_comment_meta') )

		return false;



	$history = get_comment_meta( $comment_id, 'akismet_history', false );

	usort( $history, 'akismet_cmp_time' );

	return $history;

}

9020