rest_get_max_batch_size
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
rest_get_max_batch_size
wp-includes/rest-api/class-wp-rest-server.php 1698
return apply_filters( 'rest_get_max_batch_size', 25 );