Offer ends in:
  
Black Friday: 40% off your first year: 40% off on annual plans. Use code with BF2026 at checkout. View Plugins

Developer reference for WebberZone Code Block Highlighting.

PHP wrapper functions

wzcbh_get_settings()

Returns all plugin settings merged with defaults.

Returns: array


wzcbh_get_option( $key, $default_value )

Returns the value of a single setting key, or the default value if the key does not exist.

$mode = wzcbh_get_option( 'highlighting-mode', 'client' );

Parameters:

  • $key (string): The setting key.
  • $default_value (mixed, optional): Value to return if the key does not exist. Default null.

Returns: mixed


wzcbh_update_option( $key, $value )

Updates a single setting key in the database and in the in-memory settings array. Passing an empty, false, or null value removes the key from the settings array.

Parameters:

  • $key (string): The setting key.
  • $value (string|bool|int): The value to set.

Returns: bool: true on success, false on failure.


wzcbh_delete_option( $key )

Removes a setting key from the database and from the in-memory settings array.

Parameters:

  • $key (string): The setting key to remove.

Was this article helpful?