Filter hook 'wp_update_comment_type_batch_size'

in WP Core File wp-includes/comment.php at line 4059

View Source

wp_update_comment_type_batch_size

Filter Hook
Description
Filters the comment batch size for updating the comment type.

Hook Information

File Location wp-includes/comment.php View on GitHub
Hook Type Filter
Line Number 4059

Hook Parameters

Type Name Description
int $comment_batch_size The comment batch size. Default 100.

Usage Examples

Basic Usage
<?php
// Hook into wp_update_comment_type_batch_size
add_filter('wp_update_comment_type_batch_size', 'my_custom_filter', 10, 1);

function my_custom_filter($comment_batch_size) {
    // Your custom filtering logic here
    return $comment_batch_size;
}

Source Code Context

wp-includes/comment.php:4059 - How this hook is used in WordPress core
<?php
4054  	 *
4055  	 * @since 5.5.0
4056  	 *
4057  	 * @param int $comment_batch_size The comment batch size. Default 100.
4058  	 */
4059  	$comment_batch_size = (int) apply_filters( 'wp_update_comment_type_batch_size', 100 );
4060  
4061  	// Get the IDs of the comments to update.
4062  	$comment_ids = $wpdb->get_col(
4063  		$wpdb->prepare(
4064  			"SELECT comment_ID

PHP Documentation

<?php
/**
	 * Filters the comment batch size for updating the comment type.
	 *
	 * @since 5.5.0
	 *
	 * @param int $comment_batch_size The comment batch size. Default 100.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/comment.php
Related Hooks

Related hooks will be displayed here in future updates.