wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
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
Depuis6.6.0
Dépréciéen/a
› wp_filter_default_autoload_value_via_option_size ( $autoload, $option, $value, $serialized_value )
Accès: |
|
Paramètres: (4) |
|
Retourne: |
|
Défini(e) dans: |
|
Codex: |
Filters the default autoload value to disable autoloading if the option value is too large.
Source
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; }