Sets the autoload value for an option in the database.
Description
This is a wrapper for wp_set_option_autoload_values(), which can be used to set the autoload value for multiple options at once.
See also
Parameters
$option
stringrequired- Name of the option. Expected to not be SQL-escaped.
$autoload
string|boolrequired- Autoload value to control whether to load the option when WordPress starts up.
Accepts
to enable or'yes'
|true
to disable.'no'
|false
Source
function wp_set_option_autoload( $option, $autoload ) {
$result = wp_set_option_autoload_values( array( $option => $autoload ) );
if ( isset( $result[ $option ] ) ) {
return $result[ $option ];
}
return false;
}
Changelog
Version | Description |
---|---|
6.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.