You are here

function hook_pathauto_punctuation_chars_alter in Pathauto 6.2

Same name and namespace in other branches
  1. 8 pathauto.api.php \hook_pathauto_punctuation_chars_alter()
  2. 7 pathauto.api.php \hook_pathauto_punctuation_chars_alter()

Alter the list of punctuation characters for Pathauto control.

Parameters

$punctuation: An array of punctuation to be controlled by Pathauto 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.
1 invocation of hook_pathauto_punctuation_chars_alter()
pathauto_punctuation_chars in ./pathauto.inc
Return an array of arrays for punctuation values.

File

./pathauto.api.php, line 81
Documentation for pathauto API.

Code

function hook_pathauto_punctuation_chars_alter(array &$punctuation) {

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

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