apply_filters( 'wp_max_autoloaded_option_size', int $max_option_size, string $option )
- Since
- 6.6.0
Filters the maximum size of option value in bytes.
Compatibility
- WordPress
- since 6.6.0
- 6.7.10
- 6.8.11
- 6.9.10
- 7.0.7
- 7.1.3
Present in every tracked release (6.7.10 to 7.1.3).
Parameters
$max_option_sizeint- The option-size threshold, in bytes. Default 150000.
$optionstring- The name of the option.
Where this hook fires · 1
wp-includes/option.php:1360wp_filter_default_autoload_value_via_option_size()
Source code
* * @since 6.6.0 * * @param int $max_option_size The option-size threshold, in bytes. Default 150000. * @param string $option The name of the option. */ $max_option_size = (int) apply_filters( 'wp_max_autoloaded_option_size', 150000, $option ); $size = ! empty( $serialized_value ) ? strlen( $serialized_value ) : 0; if ( $size > $max_option_size ) { return false; }Changelog
Introduced in 6.6.0. Unchanged from 6.7.10 through 7.1.3.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.