Sets the autoload value for an option in the database.
This is a wrapper for wp_set_option_autoload_values(), which can be used to set the autoload value for multiple options at once.
$optionstringrequired
$autoloadboolrequired
'yes' and 'no' are also accepted, though using these values is deprecated.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;
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_set_option_autoload