add_site_option

FUNCTION wp-includes\option.php (ligne 1938) github
Adds a new option for the current network. Existing options will not be updated. Note that prior to 3.3 this wasn't the case.

Paramètres

Entrée :
$option, $value
Sortie :
@param string $option Name of the option to add. Expected to not be SQL-escaped.
@param mixed  $value  Option value, can be anything. Expected to not be SQL-escaped.
@return bool True if the option was added, false otherwise.

Utilisation

// Utilisation de la fonction add_site_option
$result = add_site_option($option, $value);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...