wp_max_autoloaded_option_size
Filters the maximum size of option value in bytes.
Usage
add_filter( 'wp_max_autoloaded_option_size', 'wp_kama_max_autoloaded_option_size_filter', 10, 2 );
/**
* Function for `wp_max_autoloaded_option_size` filter-hook.
*
* @param int $max_option_size The option-size threshold, in bytes.
* @param string $option The name of the option.
*
* @return int
*/
function wp_kama_max_autoloaded_option_size_filter( $max_option_size, $option ){
// filter...
return $max_option_size;
}
- $max_option_size(int)
- The option-size threshold, in bytes.
Default: 150000 - $option(string)
- The name of the option.
Changelog
| Since 6.6.0 | Introduced. |
Where the hook is called
wp_max_autoloaded_option_size
wp-includes/option.php 1362
$max_option_size = (int) apply_filters( 'wp_max_autoloaded_option_size', 150000, $option );