WPDev.one
Core Function
View Source on Trac ↗

wp_determine_option_autoload_value()

wp_determine_option_autoload_value( mixed $option, mixed $value, mixed $serialized_value, mixed $autoload )

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

Parameters 4 required

Name / Type Description
$option
string

The name of the option.

Required
$value
mixed

The value of the option to check its autoload value.

Required
$serialized_value
mixed

The serialized value of the option to check its autoload value.

Required
mixed

(bool | null) $autoload The autoload value to check. Accepts 'on'|true to enable or 'off'|false to disable, or 'auto-on', 'auto-off', or 'auto' for internal purposes. Any other autoload value will be forced to either 'auto-on', 'auto-off', or 'auto'. 'yes' and 'no' are supported for backward compatibility.

Required

Return Value

(string)
string Returns the original $autoload value if explicit, or 'auto-on', 'auto-off', or 'auto' depending on default heuristics.

Function Information

Since Version
6.6.0
Source File
wp-includes/option.php
Advertisement