You are here

function _site_settings_token_label in Site Settings and Labels 8

Convert the token key into a more readable label.

Parameters

string $key: The token key.

Return value

string A more readable label.

1 call to _site_settings_token_label()
_site_settings_build_token in ./site_settings.tokens.inc
Build the tokens from the site settings.

File

./site_settings.tokens.inc, line 188
Builds placeholder replacement tokens for node-related data.

Code

function _site_settings_token_label($key) {
  $label = str_replace([
    '--',
    '-',
    '_',
  ], ' ', $key);
  $label = rtrim($label);
  $label = ucwords($label);
  return $label;
}