wp_autoload_values_to_autoload
Filter HookDescription
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.Hook Information
File Location |
wp-includes/option.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3237 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$autoload_values
|
Autoload values used to autoload option. Default list contains 'yes', 'on', 'auto-on', and 'auto'. |
Usage Examples
Basic Usage
<?php
// Hook into wp_autoload_values_to_autoload
add_filter('wp_autoload_values_to_autoload', 'my_custom_filter', 10, 1);
function my_custom_filter($autoload_values) {
// Your custom filtering logic here
return $autoload_values;
}
Source Code Context
wp-includes/option.php:3237
- How this hook is used in WordPress core
<?php
3232 * @since 6.6.0
3233 *
3234 * @param string[] $autoload_values Autoload values used to autoload option.
3235 * Default list contains 'yes', 'on', 'auto-on', and 'auto'.
3236 */
3237 $filtered_values = apply_filters( 'wp_autoload_values_to_autoload', $autoload_values );
3238
3239 return array_intersect( $filtered_values, $autoload_values );
3240 }
PHP Documentation
<?php
/**
* 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.
*
* @since 6.6.0
*
* @param string[] $autoload_values Autoload values used to autoload option.
* Default list contains 'yes', 'on', 'auto-on', and 'auto'.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/option.php
Related Hooks
Related hooks will be displayed here in future updates.