rest_get_max_batch_size хук-фильтрWP 5.6.0

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

Использование

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.

Список изменений

С версии 5.6.0 Введена.

Где вызывается хук

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 );

Где используется хук в WordPress

Использование не найдено.