wp_determine_option_autoload_value


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

Access:
  • private
Parameters:
  • (string) option The name of the option.
  • (mixed) value The value of the option to check its autoload value.
  • (mixed) serialized_value The serialized value of the option to check its autoload value.
  • (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.
Returns:
  • (string) Returns the original $autoload value if explicit, or 'auto-on', 'auto-off', or 'auto' depending on default heuristics.
Defined at:

Description

Determines the appropriate autoload value for an option based on input.This function checks the provided autoload value and returns a standardized value ('on', 'off', 'auto-on', 'auto-off', or 'auto') based on specific conditions. If no explicit autoload value is provided, the function will check for certain heuristics around the given option. It will return `auto-on` to indicate autoloading, `auto-off` to indicate not autoloading, or `auto` if no clear decision could be made.

Related Functions

wp_set_option_autoload_values, wp_set_option_autoload, wp_set_options_autoload, determine_locale, wp_create_post_autosave

Top Google Results

User discussions

wpseek mobile