akismet_request_args

akismet_request_args

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.8

apply_filters('akismet_request_args') is found 13 times:

  • /wp-content/plugins/akismet/class.akismet-admin.php line 976
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
        'key'  => $api_key,
        'blog' => get_option( 'home' ),
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-subscription' );
     
    $subscription_verification = Akismet::http_post( Akismet::build_query( $request_args ), 'get-subscription' );
     
    if ( ! empty( $subscription_verification[1] ) ) {
        if ( 'invalid' !== $subscription_verification[1] ) {
            $akismet_user = json_decode( $subscription_verification[1] );
  • /wp-content/plugins/akismet/class.akismet-admin.php line 999
    0995
    0996
    0997
    0998
    0999
    1000
    1001
    1002
    1003
    1004
    1005
        'key'  => $api_key,
        'from' => $interval,
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' );
     
    $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' );
     
    if ( ! empty( $response[1] ) ) {
        $data = json_decode( $response[1] );
        /*
  • /wp-content/plugins/akismet/class.akismet-admin.php line 1028
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
        ),
        $extra
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'verify-wpcom-key' );
     
    $akismet_account = Akismet::http_post( Akismet::build_query( $request_args ), 'verify-wpcom-key' );
     
    if ( ! empty( $akismet_account[1] ) ) {
        $akismet_account = json_decode( $akismet_account[1] );
    }
  • /wp-content/plugins/akismet/class.akismet-cli.php line 156
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
        'key'  => $api_key,
        'from' => $interval,
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' );
     
    $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' );
     
    if ( empty( $response[1] ) ) {
        WP_CLI::error( __( 'Currently unable to fetch stats. Please try again.', 'akismet' ) );
    }
  • /wp-content/plugins/akismet/class.akismet-rest-api.php line 307
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
        'key'  => $api_key,
        'from' => $interval,
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' );
     
    $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' );
     
    if ( ! empty( $response[1] ) ) {
        $stat_totals[ $interval ] = json_decode( $response[1] );
    }
  • /wp-content/plugins/akismet/class.akismet-rest-api.php line 370
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
        'key'  => $key,
        'blog' => get_option( 'home' ),
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'verify-key' );
     
    $response = Akismet::http_post( Akismet::build_query( $request_args ), 'verify-key' );
     
    if ( $response[1] == 'valid' ) {
        return true;
    }
  • /wp-content/plugins/akismet/class.akismet.php line 145
    142
    143
    144
    145
    146
    147
    148
    149
    150
    if ( is_null( $access_token ) ) {
        $request_args = array( 'api_key' => self::get_api_key() );
     
        $request_args = apply_filters( 'akismet_request_args', $request_args, 'token' );
     
        $response = self::http_post( self::build_query( $request_args ), 'token' );
     
        $access_token = $response[1];
    }
  • /wp-content/plugins/akismet/class.akismet.php line 161
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
            'key'  => $key,
            'blog' => get_option( 'home' ),
        );
     
        $request_args = apply_filters( 'akismet_request_args', $request_args, 'verify-key' );
     
        return self::http_post( self::build_query( $request_args ), 'verify-key', $ip );
    }
     
    public static function verify_key( $key, $ip = null ) {
        // Shortcut for obviously invalid keys.
  • /wp-content/plugins/akismet/class.akismet.php line 187
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
        'key'  => $key,
        'blog' => get_option( 'home' ),
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'deactivate' );
     
    $response = self::http_post( self::build_query( $request_args ), 'deactivate' );
     
    if ( $response[1] != 'deactivated' ) {
        return 'failed';
    }
  • /wp-content/plugins/akismet/class.akismet.php line 375
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    *
     * @param array $comment An array of request data.
     * @param string $endpoint The API endpoint being requested.
     */
    $comment = apply_filters( 'akismet_request_args', $comment, 'comment-check' );
     
    $response = self::http_post( self::build_query( $comment ), 'comment-check' );
     
    do_action( 'akismet_comment_check_response', $response );
     
    $commentdata['comment_as_submitted'] = array_intersect_key( $comment, self::$comment_as_submitted_allowed_keys );
  • /wp-content/plugins/akismet/class.akismet.php line 831
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    if ( self::is_test_mode() ) {
        $c['is_test'] = 'true';
    }
     
    $c = apply_filters( 'akismet_request_args', $c, 'comment-check' );
     
    $response = self::http_post( self::build_query( $c ), 'comment-check' );
     
    if ( ! empty( $response[1] ) ) {
        return $response[1];
    }
  • /wp-content/plugins/akismet/class.akismet.php line 1017
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    }
     
    $comment['comment_check_response'] = self::last_comment_check_response( $comment_id );
     
    $comment = apply_filters( 'akismet_request_args', $comment, 'submit-spam' );
     
    $response = self::http_post( self::build_query( $comment ), 'submit-spam' );
     
    update_comment_meta( $comment_id, 'akismet_user_result', 'true' );
     
    if ( $comment['reporter'] ) {
  • /wp-content/plugins/akismet/class.akismet.php line 1086
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    }
     
    $comment['comment_check_response'] = self::last_comment_check_response( $comment_id );
     
    $comment = apply_filters( 'akismet_request_args', $comment, 'submit-ham' );
     
    $response = self::http_post( self::build_query( $comment ), 'submit-ham' );
     
    update_comment_meta( $comment_id, 'akismet_user_result', 'false' );
     
    if ( $comment['reporter'] ) {
akismet_request_args - WordPress Hooks

akismet_request_args

akismet_request_args

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: akismet.5.3.1

apply_filters('akismet_request_args') is found 13 times:

  • /class.akismet-admin.php line 860
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
        'key' => $api_key,
        'blog' => get_option( 'home' ),
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-subscription' );
     
    $subscription_verification = Akismet::http_post( Akismet::build_query( $request_args ), 'get-subscription' );
     
    if ( ! empty( $subscription_verification[1] ) ) {
        if ( 'invalid' !== $subscription_verification[1] ) {
            $akismet_user = json_decode( $subscription_verification[1] );
  • /class.akismet-admin.php line 883
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
        'key' => $api_key,
        'from' => $interval,
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' );
     
    $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' );
     
    if ( ! empty( $response[1] ) ) {
        $stat_totals[$interval] = json_decode( $response[1] );
    }
  • /class.akismet-admin.php line 905
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
        ),
        $extra
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'verify-wpcom-key' );
     
    $akismet_account = Akismet::http_post( Akismet::build_query( $request_args ), 'verify-wpcom-key' );
     
    if ( ! empty( $akismet_account[1] ) )
        $akismet_account = json_decode( $akismet_account[1] );
  • /class.akismet-cli.php line 155
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
        'key'  => $api_key,
        'from' => $interval,
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' );
     
    $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' );
     
    if ( empty( $response[1] ) ) {
        WP_CLI::error( __( 'Currently unable to fetch stats. Please try again.', 'akismet' ) );
    }
  • /class.akismet-rest-api.php line 273
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
        'key' => $api_key,
        'from' => $interval,
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' );
     
    $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' );
     
    if ( ! empty( $response[1] ) ) {
        $stat_totals[$interval] = json_decode( $response[1] );
    }
  • /class.akismet-rest-api.php line 334
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
        'key' => $key,
        'blog' => get_option( 'home' ),
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'verify-key' );
     
    $response = Akismet::http_post( Akismet::build_query( $request_args ), 'verify-key' );
     
    if ( $response[1] == 'valid' ) {
        return true;
    }
  • /class.akismet.php line 113
    110
    111
    112
    113
    114
    115
    116
    117
    118
    if ( is_null( $access_token ) ) {
        $request_args = array( 'api_key' => self::get_api_key() );
     
        $request_args = apply_filters( 'akismet_request_args', $request_args, 'token' );
     
        $response = self::http_post( self::build_query( $request_args ), 'token' );
     
        $access_token = $response[1];
    }
  • /class.akismet.php line 129
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
            'key' => $key,
            'blog' => get_option( 'home' ),
        );
     
        $request_args = apply_filters( 'akismet_request_args', $request_args, 'verify-key' );
     
        return self::http_post( self::build_query( $request_args ), 'verify-key', $ip );
    }
     
    public static function verify_key( $key, $ip = null ) {
        // Shortcut for obviously invalid keys.
  • /class.akismet.php line 154
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
        'key' => $key,
        'blog' => get_option( 'home' ),
    );
     
    $request_args = apply_filters( 'akismet_request_args', $request_args, 'deactivate' );
     
    $response = self::http_post( self::build_query( $request_args ), 'deactivate' );
     
    if ( $response[1] != 'deactivated' )
        return 'failed';
  • /class.akismet.php line 312
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    *
     * @param array $comment An array of request data.
     * @param string $endpoint The API endpoint being requested.
     */
    $comment = apply_filters( 'akismet_request_args', $comment, 'comment-check' );
     
    $response = self::http_post( self::build_query( $comment ), 'comment-check' );
     
    do_action( 'akismet_comment_check_response', $response );
     
    $commentdata['comment_as_submitted'] = array_intersect_key( $comment, self::$comment_as_submitted_allowed_keys );
  • /class.akismet.php line 750
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    if ( self::is_test_mode() )
        $c['is_test'] = 'true';
     
    $c = apply_filters( 'akismet_request_args', $c, 'comment-check' );
     
    $response = self::http_post( self::build_query( $c ), 'comment-check' );
     
    if ( ! empty( $response[1] ) ) {
        return $response[1];
    }
  • /class.akismet.php line 914
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    if ( ! is_null( $post ) ) {
        $comment->comment_post_modified_gmt = $post->post_modified_gmt;
    }
     
    $comment = apply_filters( 'akismet_request_args', $comment, 'submit-spam' );
     
    $response = self::http_post( self::build_query( $comment ), 'submit-spam' );
     
    update_comment_meta( $comment_id, 'akismet_user_result', 'true' );
     
    if ( $comment->reporter ) {
  • /class.akismet.php line 974
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    if ( ! is_null( $post ) ) {
        $comment->comment_post_modified_gmt = $post->post_modified_gmt;
    }
     
    $comment = apply_filters( 'akismet_request_args', $comment, 'submit-ham' );
     
    $response = self::http_post( self::build_query( $comment ), 'submit-ham' );
     
    update_comment_meta( $comment_id, 'akismet_user_result', 'false' );
     
    if ( $comment->reporter ) {