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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
274 |
|
275 | $stat_totals = array(); |
276 |
|
277 | $request_args = array( |
278 | 'blog' => get_option( 'home' ), |
279 | 'key' => $api_key, |
280 | 'from' => $interval, |
281 | ); |
282 |
|
283 | $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' ); |
284 |
|
285 | $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' ); |
286 |
|
287 | if ( ! empty( $response[1] ) ) { |
288 | $stat_totals[$interval] = json_decode( $response[1] ); |
289 | } |
290 |
|
291 | return rest_ensure_response( $stat_totals ); |
292 | } |
Line | Code |
335 | return self::get_alert( $request ); |
336 | } |
337 |
|
338 | private static function key_is_valid( $key ) { |
339 | $request_args = array( |
340 | 'key' => $key, |
341 | 'blog' => get_option( 'home' ), |
342 | ); |
343 |
|
344 | $request_args = apply_filters( 'akismet_request_args', $request_args, 'verify-key' ); |
345 |
|
346 | $response = Akismet::http_post( Akismet::build_query( $request_args ), 'verify-key' ); |
347 |
|
348 | if ( $response[1] == 'valid' ) { |
349 | return true; |
350 | } |
351 |
|
352 | return false; |
353 | } |