wp_autoload_values_to_autoload
Filters the autoload values that should be considered for autoloading from the options table.
The filter can only be used to remove autoload values from the default list.
Использование
add_filter( 'wp_autoload_values_to_autoload', 'wp_kama_autoload_values_to_filter' );
/**
* Function for `wp_autoload_values_to_autoload` filter-hook.
*
* @param string[] $autoload_values Autoload values used to autoload option.
*
* @return string[]
*/
function wp_kama_autoload_values_to_filter( $autoload_values ){
// filter...
return $autoload_values;
}
- $autoload_values(string[])
- Autoload values used to autoload option.
По умолчанию: list contains 'yes', 'on', 'auto-on', and 'auto'
Список изменений
| С версии 6.6.0 | Введена. |
Где вызывается хук
wp_autoload_values_to_autoload
wp-includes/option.php 3272
$filtered_values = apply_filters( 'wp_autoload_values_to_autoload', $autoload_values );