WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 1324 | * |
| 1325 | * @param string $request The body of the request. |
| 1326 | * @param string $path The path for the request. |
| 1327 | * @param string $ip The specific IP address to hit. |
| 1328 | * @return array A two-member array consisting of the headers and the response body, both empty in the case of a failure. |
| 1329 | */ |
| 1330 | public static function http_post( $request, $path, $ip=null ) { |
| 1331 | |
| 1332 | $akismet_ua = sprintf( 'WordPress/%s | Akismet/%s', $GLOBALS['wp_version'], constant( 'AKISMET_VERSION' ) ); |
| 1333 | $akismet_ua = apply_filters( 'akismet_ua', $akismet_ua ); |
| 1334 | |
| 1335 | $host = self::API_HOST; |
| 1336 | $api_key = self::get_api_key(); |
| 1337 | |
| 1338 | if ( $api_key ) { |
| 1339 | $request = add_query_arg( 'api_key', $api_key, $request ); |
| 1340 | } |
| 1341 | |
| 1342 | $http_host = $host; |