You are here

function webform_bootstrap_link_alter in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_bootstrap/webform_bootstrap.module \webform_bootstrap_link_alter()

Implements hook_link_alter().

File

modules/webform_bootstrap/webform_bootstrap.module, line 100
Helps support Webform to Bootstrap integration.

Code

function webform_bootstrap_link_alter(&$variables) {
  if (!_webform_bootstrap_is_active_theme()) {
    return;
  }

  // Convert .button classes to .btn CSS classes.
  if (isset($variables['options']['attributes']['class']) && is_array($variables['options']['attributes']['class'])) {
    _webform_bootstrap_convert_button_classes($variables['options']['attributes']['class']);
  }
}