WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 1344 | function wp_filter_default_autoload_value_via_option_size( $autoload, $option, $value, $serialized_value ) { |
| 1345 | /** |
| 1346 | * Filters the maximum size of option value in bytes. |
| 1347 | * |
| 1348 | * @since 6.6.0 |
| 1349 | * |
| 1350 | * @param int $max_option_size The option-size threshold, in bytes. Default 150000. |
| 1351 | * @param string $option The name of the option. |
| 1352 | */ |
| 1353 | $max_option_size = (int) apply_filters( 'wp_max_autoloaded_option_size', 150000, $option ); |
| 1354 | $size = ! empty( $serialized_value ) ? strlen( $serialized_value ) : 0; |
| 1355 | |
| 1356 | if ( $size > $max_option_size ) { |
| 1357 | return false; |
| 1358 | } |
| 1359 | |
| 1360 | return $autoload; |
| 1361 | } |
| 1362 | |