function hook_bootstrap_iconize_text_alter

8.x-3.x bootstrap.api.php hook_bootstrap_iconize_text_alter(array &$texts)
7.x-3.x bootstrap.api.php hook_bootstrap_iconize_text_alter(array &$texts)

Allows sub-themes to alter the array used for associating an icon with text.

Parameters

array $texts: An associative array containing the text and icons to be matched, passed by reference.

Related topics

1 invocation of hook_bootstrap_iconize_text_alter()
_bootstrap_iconize_text in includes/common.inc
Matches a Bootstrap Glyphicon based on a string value.

Source ./bootstrap.api.php (line 49)

function hook_bootstrap_iconize_text_alter(array &$texts) {
  // This matches the exact string: "My Unique Button Text".
  $texts['matches'][t('My Unique Button Text')] = 'heart';

  // This would also match the string above, however the class returned would
  // also be the one above; "matches" takes precedence over "contains".
  $texts['contains'][t('Unique')] = 'bullhorn';

  // Remove matching for strings that contain "filter":
  unset($texts['contains'][t('Filter')]);

  // Change the icon that matches "Upload" (originally "upload"):
  $texts['contains'][t('Upload')] = 'ok';
}