Action hook 'akismet_http_request_pre'

in WP Core File wp-content/plugins/akismet/class.akismet.php at line 1497

View Source

akismet_http_request_pre

Action Hook
Description
Try SSL first; if that fails, try without it and don't try it again for a while.

Hook Information

File Location wp-content/plugins/akismet/class.akismet.php View on GitHub
Hook Type Action
Line Number 1497

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into akismet_http_request_pre
add_action('akismet_http_request_pre', 'my_custom_function');

function my_custom_function() {
    // Your custom code here
}

Source Code Context

wp-content/plugins/akismet/class.akismet.php:1497 - How this hook is used in WordPress core
<?php
1492  			if ( is_wp_error( $response ) ) {
1493  				$ssl_failed = true;
1494  
1495  				do_action( 'akismet_https_request_failure', $response );
1496  
1497  				do_action( 'akismet_http_request_pre' );
1498  
1499  				// Try the request again without SSL.
1500  				$response = wp_remote_post( $http_akismet_url, $http_args );
1501  
1502  				self::log( compact( 'http_akismet_url', 'http_args', 'response' ) );

PHP Documentation

<?php
/**
		 * Try SSL first; if that fails, try without it and don't try it again for a while.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 0
  • File: wp-content/plugins/akismet/class.akismet.php
Related Hooks

Related hooks will be displayed here in future updates.