wp_set_option_autoload_values


wp_set_option_autoload_values ( $options )

Parameters:
  • (array) options Associative array of option names and their autoload values to set. The option names are expected to not be SQL-escaped. The autoload values accept 'yes'|true to enable or 'no'|false to disable.
Returns:
  • (array) Associative array of all provided $options as keys and boolean values for whether their autoload value was updated.
Defined at:

Description

Sets the autoload values for multiple options in the database.Autoloading too many options can lead to performance problems, especially if the options are not frequently used. This function allows modifying the autoload value for multiple options without changing the actual option value. This is for example recommended for plugin activation and deactivation hooks, to ensure any options exclusively used by the plugin which are generally autoloaded can be set to not autoload when the plugin is inactive.

Related Functions

wp_set_option_autoload, wp_set_options_autoload, get_post_custom_values, is_user_option_local, wp_prime_option_caches

Top Google Results

User discussions

wpseek mobile