You are here

function hierarchical_select_common_sanitize_var in Hierarchical Select 7.3

Sanitize the key for a system variable.

Parameters

string $key: The key of the system variable that is about to be used.

Return value

string The sanitized key.

4 calls to hierarchical_select_common_sanitize_var()
hierarchical_select_common_config_del in includes/common.inc
Delete a config.
hierarchical_select_common_config_get in includes/common.inc
Retrieve a config.
hierarchical_select_common_config_set in includes/common.inc
Set a config.
hierarchical_select_update_7003 in ./hierarchical_select.install
Update system variable keys. Issue #1368916.

File

includes/common.inc, line 63
Functions used by more than one Hierarchical Select implementation.

Code

function hierarchical_select_common_sanitize_var($key) {

  // Meet Drupal Code standards.
  // https://www.drupal.org/project/hierarchical_select/issues/1368916
  $key = str_replace('-', '_', $key);
  return $key;
}