Sets the given preference to the specified value if the preference is
modifiable.
public setValue ( string $pref, string $val, array $opts = [] ) : boolean | ||
$pref | string | The preference name to modify. |
$val | string | The preference value (UTF-8). |
$opts | array | Additional options:
- force: (boolean) If true, will set the value disregarding the current locked status of the pref. (@since 2.5.0) DEFAULT: false - nosave: (boolean) If true, the preference will not be saved to the storage backend(s). DEFAULT: false |
return | boolean | True if the value was successfully set, false on a failure. |