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

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: