Recent

Options_API class

Options_API

Options API Class.

Namespace: WebberZone\Code_Block_Highlighting
Since: 1.0.0
Source: includes/class-options-api.php line 21

Methods

get_settings() static

Get Settings.

Retrieves all plugin settings

Since: 1.0.0
Line: 55

static public function get_settings(  ): array;

Returns: array — WebberZone Code Block Highlighting settings

get_option() static

Get an option

Looks to see if the specified setting exists, returns default if not

Since: 1.0.0
Line: 86

static public function get_option( $key = ..., $default_value = ... ): mixed;
TypeNameDescription
string$keyOption to fetch.
mixed$default_valueDefault option.

Returns: mixed

update_option() static

Update an option

Updates a setting value in both the db and the global variable. Warning: Passing in an empty, false or null string value will remove the key from the settings array.

Since: 1.0.0
Line: 136

static public function update_option( $key = ..., $value = ... ): boolean;
TypeNameDescription
string$keyThe Key to update.
string|bool|int$valueThe value to set the key to.

Returns: boolean — True if updated, false if not.

update_settings() static

Update all settings at once.

Since: 1.0.0
Line: 170

static public function update_settings( array $settings, bool $merge = ..., bool $autoload = ... ): bool;
TypeNameDescription
array$settingsSettings array to save.
bool$mergeWhether to merge with existing settings. Default true.
bool$autoloadWhether to autoload the option. Default true.

Returns: bool — True if updated, false otherwise.

delete_option() static

Remove an option

Removes a WebberZone Code Block Highlighting setting value in both the db and the static variable.

Since: 1.0.0
Line: 193

static public function delete_option( $key = ... ): boolean;
TypeNameDescription
string$keyThe Key to delete.

Returns: boolean — True if updated, false if not.

get_settings_defaults() static

Default settings.

Since: 1.0.0
Line: 224

static public function get_settings_defaults(  ): array;

Returns: array — Default settings

get_default_option() static

Get the default option for a specific key

Since: 1.0.0
Line: 236

static public function get_default_option( $key = ... ): mixed;
TypeNameDescription
string$keyKey of the option to fetch.

Returns: mixed

reset_settings() static

Reset settings.

Since: 1.0.0
Line: 253

static public function reset_settings(  ): bool;

Returns: bool — True if updated, false if not.