wppaste
WordPress

apply_filters( 'wp_default_autoload_value', bool|null $autoload, string $option, mixed $value )

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

Compatibility

WordPress
since 6.6.0
  • 6.7.10
  • 6.8.11
  • 6.9.10
  • 7.0.7
  • 7.1.3

Present in every tracked release (6.7.10 to 7.1.3).

Parameters

$autoloadbool|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'.
$optionstring
The passed option name.
$valuemixed
The passed option value to be saved.

Where this hook fires · 1

  • wp-includes/option.php:1333wp_determine_option_autoload_value()

Source code

	 *	 * @param bool|null $autoload 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'.	 * @param string    $option   The passed option name.	 * @param mixed     $value    The passed option value to be saved.	 */	$autoload = apply_filters( 'wp_default_autoload_value', null, $option, $value, $serialized_value );	if ( is_bool( $autoload ) ) {		return $autoload ? 'auto-on' : 'auto-off';	} 	return 'auto';}

Changelog

Introduced in 6.6.0. One change between 6.7.10 and 7.1.3.

  1. 6.7.10
  2. 6.8.11
  3. 6.9.10
  4. 7.0.7
  5. 7.1.3

Signature, return type and hooks compared across 5 parsed releases.

7.0.7
Parameter $serialized_value added.verified against source
6.6.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.8.11 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.