wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
wp_filter_default_autoload_value_via_option_size is private and should not be used in themes or plugins directly.
wp_filter_default_autoload_value_via_option_size › WordPress Function
Da6.6.0
Deprecaton/a
› wp_filter_default_autoload_value_via_option_size ( $autoload, $option, $value, $serialized_value )
Accedi: |
|
Parametri: (4) |
|
Ritorna: |
|
Definito a: |
|
Codex: |
Filters the default autoload value to disable autoloading if the option value is too large.
Sorgenti
function wp_filter_default_autoload_value_via_option_size( $autoload, $option, $value, $serialized_value ) { /** * Filters the maximum size of option value in bytes. * * @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; } return $autoload; }