Added Gravity Forms Addon
This commit is contained in:
@@ -44,6 +44,16 @@ final class Settings {
|
||||
return $data;
|
||||
}
|
||||
|
||||
private static function set(string $key, $value = null):void {
|
||||
$data = self::get();
|
||||
if (is_null($value) && isset($data[$key])) {
|
||||
unset($data[$key]);
|
||||
} else {
|
||||
$data[$key] = $value;
|
||||
}
|
||||
update_option(Plugin::get_id(), $data);
|
||||
}
|
||||
|
||||
private static function is_checked(string $name, string $value):bool {
|
||||
return in_array($value, (array) self::get($name));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user