wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_set_option_autoload › WordPress Function

Seit6.4.0
Veraltetn/v
wp_set_option_autoload ( $option, $autoload )
Parameter: (2)
  • (string) $option Name of the option. Expected to not be SQL-escaped.
    Erforderlich: Ja
  • (bool) $autoload Autoload value to control whether to load the option when WordPress starts up. For backward compatibility 'yes' and 'no' are also accepted, though using these values is deprecated.
    Erforderlich: Ja
Siehe:
Gibt zurück:
  • (bool) True if the autoload value was modified, false otherwise.
Definiert in:
Codex:
Changelog:
  • 6.7.0

Sets the autoload value for an option in the database.

This is a wrapper for {@see}, which can be used to set the autoload value for multiple options at once.


Quellcode

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;
}