wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_set_options_autoload › WordPress Function

Desde6.4.0
Obsoleton/a
› wp_set_options_autoload ( $options, $autoload )
Parâmetros: (2)
  • (string[]) $options List of option names. Expected to not be SQL-escaped.
    Required: Yes
  • (bool) $autoload Autoload value to control whether to load the options when WordPress starts up. For backward compatibility 'yes' and 'no' are also accepted, though using these values is deprecated.
    Required: Yes
Ver:
Retorna:
  • (array) Associative array of all provided $options as keys and boolean values for whether their autoload value
    was updated.
Definido em:
Codex:
Log de mudanças:
  • 6.7.0

Sets the autoload value for multiple options in the database.

This is a wrapper for Ver página de detalhe para wp_set_option_autoload_values »

" href="https://pt.wpseek.com/function/%5Cwp_set_option_autoload_values/">wp_set_option_autoload_values
, which can be used to set different autoload values for each option at once.


Fonte

function wp_set_options_autoload( array $options, $autoload ) {
	return wp_set_option_autoload_values(
		array_fill_keys( $options, $autoload )
	);
}