rest_get_max_batch_size filter-hookWP 5.6.0

Filters the maximum number of REST API requests that can be included in a batch.

Usage

add_filter( 'rest_get_max_batch_size', 'wp_kama_rest_get_max_batch_size_filter' );

/**
 * Function for `rest_get_max_batch_size` filter-hook.
 * 
 * @param int $max_size The maximum size.
 *
 * @return int
 */
function wp_kama_rest_get_max_batch_size_filter( $max_size ){

	// filter...
	return $max_size;
}
$max_size(int)
The maximum size.

Changelog

Since 5.6.0 Introduced.

Where the hook is called

WP_REST_Server::get_max_batch_size()
rest_get_max_batch_size
wp-includes/rest-api/class-wp-rest-server.php 1644
return apply_filters( 'rest_get_max_batch_size', 25 );

Where the hook is used in WordPress

Usage not found.