Make WordPress Core

Ticket #50513: 50513.patch

File 50513.patch, 906 bytes (added by dchymko, 5 years ago)
  • wp-includes/comment.php

    diff --git a/wp-includes/comment.php b/wp-includes/comment.php
    index a8cc4dda29..21ff8c50a6 100644
    a b function _wp_batch_update_comment_type() { 
    38233823        // Empty comment type found? We'll need to run this script again.
    38243824        wp_schedule_single_event( time() + ( 2 * MINUTE_IN_SECONDS ), 'wp_update_comment_type_batch' );
    38253825
    3826         // Update the `comment_type` field value to be `comment` for the next 100 rows of comments.
     3826        $comment_batch_size = intval( apply_filters( 'wp_comment_batch_update_size', 100 ) );
     3827
     3828        // Update the `comment_type` field value to be `comment` for the next ($comment_batch_size) rows of comments.
    38273829        $wpdb->query(
    38283830                "UPDATE {$wpdb->comments}
    38293831                SET comment_type = 'comment'
    38303832                WHERE comment_type = ''
    38313833                ORDER BY comment_ID DESC
    3832                 LIMIT 100"
     3834                LIMIT {$comment_batch_size}"
    38333835        );
    38343836
    38353837        delete_option( $lock_name );