Title: wp_default_autoload_value
Published: July 16, 2024
Last modified: April 28, 2025

---

# apply_filters( ‘wp_default_autoload_value’, bool|null $autoload, string $option, mixed $value )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_default_autoload_value/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_default_autoload_value/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_default_autoload_value/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_default_autoload_value/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_default_autoload_value/?output_format=md#wp--skip-link--target)

Allows to determine the default autoload value for an option where no explicit value
is passed.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_default_autoload_value/?output_format=md#parameters)󠁿

 `$autoload`bool|null

The default autoload value to set. Returning true will be set as `'auto-on'` in 
the database, false will be set as `'auto-off'`, and null will be set as `'auto'`.

`$option`string

The passed option name.

`$value`mixed

The passed option value to be saved.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_default_autoload_value/?output_format=md#source)󠁿

    ```php
    $autoload = apply_filters( 'wp_default_autoload_value', null, $option, $value, $serialized_value );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/option.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/option.php#L1333)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/option.php#L1333-L1333)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_default_autoload_value/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_determine_option_autoload_value()](https://developer.wordpress.org/reference/functions/wp_determine_option_autoload_value/)`wp-includes/option.php` |

Determines the appropriate autoload value for an option based on input.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_default_autoload_value/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.6.0](https://developer.wordpress.org/reference/since/6.6.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_default_autoload_value%2F)
before being able to contribute a note or feedback.