akismet_comment_nonce

akismet_comment_nonce

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('akismet_comment_nonce') is found 2 times:

  • /wp-content/plugins/akismet/class.akismet.php line 291
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
        $comment['user_role'] = self::get_user_roles( $comment['user_ID'] );
    }
     
    /** See filter documentation in init_hooks(). */
    $akismet_nonce_option             = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) );
    $comment['akismet_comment_nonce'] = 'inactive';
    if ( $akismet_nonce_option == 'true' || $akismet_nonce_option == '' ) {
        $comment['akismet_comment_nonce'] = 'failed';
        if ( isset( $_POST['akismet_comment_nonce'] ) && wp_verify_nonce( $_POST['akismet_comment_nonce'], 'akismet_comment_nonce_' . $comment['comment_post_ID'] ) ) {
            $comment['akismet_comment_nonce'] = 'passed';
        }
  • /wp-content/plugins/akismet/class.akismet.php line 1224
    1220
    1221
    1222
    1223
    1224
    1225
    1226
    1227
    1228
    1229
    1230
    if ( ! self::get_api_key() ) {
        return;
    }
     
    $akismet_comment_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) );
     
    if ( $akismet_comment_nonce_option == 'true' || $akismet_comment_nonce_option == '' ) {
        echo '<p style="display: none;">';
        wp_nonce_field( 'akismet_comment_nonce_' . $post_id, 'akismet_comment_nonce', false );
        echo '</p>';
    }