Filters a specific option before its value is (maybe) serialized and updated. The dynamic portion of the hook name, `$option`, refers to the option name.
$option, $value = '', $deprecated = '', $autoload = null
Sortie :
@param mixed $value The new, unserialized option value. @param mixed $old_value The old option value. @param string $option Option name. @param mixed $value The new, unserialized option value. @param string $option Name of the option. @param mixed $old_value The old option value. @param string $option Name of the option to update. @param mixed $old_value The old option value. @param mixed $value The new option value. @param mixed $old_value The old option value. @param mixed $value The new option value. @param string $option Option name. @param string $option Name of the updated option. @param mixed $old_value The old option value. @param mixed $value The new option value. @param string $option Name of the option to add. Expected to not be SQL-escaped. @param mixed $value Optional. Option value. Must be serializable if non-scalar. @param string $deprecated Optional. Description. Not used anymore. @param bool|null $autoload Optional. Whether to load the option when WordPress starts up. @return bool True if the option was added, false otherwise.
// Utilisation de la fonction add_option
$result = add_option($option, $value = '', $deprecated = '', $autoload = null);
if ($result) {
// Votre logique ici
}
Chargement des actualités...