1 path.api.php hook_path_punctuation_chars_alter(array &$punctuation)

Alter the list of punctuation characters used by Path module.

Parameters

$punctuation: An array of punctuation used during replacement keyed by punctuation name. Each punctuation record should be an array with the following key/value pairs:

  • value: The raw value of the punctuation mark.
  • name: The human-readable name of the punctuation mark. This must be translated using t() already.

File

core/modules/path/path.api.php, line 231
Hooks provided by the Path module.

Code

function hook_path_punctuation_chars_alter(array &$punctuation) {
  // Add the trademark symbol.
  $punctuation['trademark'] = array('value' => '™', 'name' => t('Trademark symbol'));

  // Remove the dollar sign.
  unset($punctuation['dollar']);
}