akismet_scheduled_recheck

akismet_scheduled_recheck

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('akismet_scheduled_recheck') is found 5 times:

  • /wp-content/plugins/akismet/class.akismet.php line 434
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
        }
     
        if ( ! wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) {
            wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
            do_action( 'akismet_scheduled_recheck', 'invalid-response-' . $response[1] );
        }
     
        self::$prevent_moderation_email_for_these_comments[] = $commentdata;
    }
     
    // Delete old comments daily
  • /wp-content/plugins/akismet/class.akismet.php line 1111
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    1116
    1117
    $status = self::verify_key( $api_key );
    if ( get_option( 'akismet_alert_code' ) || $status == 'invalid' ) {
        // since there is currently a problem with the key, reschedule a check for 6 hours hence
        wp_schedule_single_event( time() + 21600, 'akismet_schedule_cron_recheck' );
        do_action( 'akismet_scheduled_recheck', 'key-problem-' . get_option( 'akismet_alert_code' ) . '-' . $status );
        return false;
    }
     
    delete_option( 'akismet_available_servers' );
     
    $comment_errors = $wpdb->get_col( "SELECT comment_id FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'   LIMIT 100" );
  • /wp-content/plugins/akismet/class.akismet.php line 1179
    1175
    1176
    1177
    1178
    1179
    1180
    1181
    1182
    1183
    1184
    1185
            }
     
            delete_comment_meta( $comment_id, 'akismet_rechecking' );
            wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
            do_action( 'akismet_scheduled_recheck', 'check-db-comment-' . $status );
            return;
        }
        delete_comment_meta( $comment_id, 'akismet_rechecking' );
    }
     
    $remaining = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" );
  • /wp-content/plugins/akismet/class.akismet.php line 1188
    1185
    1186
    1187
    1188
    1189
    1190
    1191
    1192
    1193
    1194
        $remaining = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" );
        if ( $remaining && ! wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) {
            wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
            do_action( 'akismet_scheduled_recheck', 'remaining' );
        }
    }
     
    public static function fix_scheduled_recheck() {
        $future_check = wp_next_scheduled( 'akismet_schedule_cron_recheck' );
        if ( ! $future_check ) {
  • /wp-content/plugins/akismet/class.akismet.php line 1206
    1202
    1203
    1204
    1205
    1206
    1207
    1208
    1209
    1210
    1211
    1212
        $check_range = time() + 1200;
        if ( $future_check > $check_range ) {
            wp_clear_scheduled_hook( 'akismet_schedule_cron_recheck' );
            wp_schedule_single_event( time() + 300, 'akismet_schedule_cron_recheck' );
            do_action( 'akismet_scheduled_recheck', 'fix-scheduled-recheck' );
        }
    }
     
    public static function add_comment_nonce( $post_id ) {
        /**
         * To disable the Akismet comment nonce, add a filter for the 'akismet_comment_nonce' tag