2 Indentation fixes
source | link

Give it another class in your template.php file, and CSS does the rest

/** * @param $variables */ function yourtheme_preprocess_button(&$variables) { $variables['element']['#attributes']['class'] = array(); $variables['element']['#attributes']['class'][] = 'btn'; if (stristr($variables['element']['#value'], 'Add to cart') !== FALSE) { $variables['element']['#attributes']['class'][] = 'btn-cart'; } }

/**
 * @param $variables
*/
function yourtheme_preprocess_button(&$variables) {
  $variables['element']['#attributes']['class'] = array();
  $variables['element']['#attributes']['class'][] = 'btn';
  if (stristr($variables['element']['#value'], 'Add to cart') !== FALSE) {
    $variables['element']['#attributes']['class'][] = 'btn-cart';
  }
}

Give it another class in your template.php file, and CSS does the rest

/** * @param $variables */ function yourtheme_preprocess_button(&$variables) { $variables['element']['#attributes']['class'] = array(); $variables['element']['#attributes']['class'][] = 'btn'; if (stristr($variables['element']['#value'], 'Add to cart') !== FALSE) { $variables['element']['#attributes']['class'][] = 'btn-cart'; } }

Give it another class in your template.php file, and CSS does the rest

/**
 * @param $variables
*/
function yourtheme_preprocess_button(&$variables) {
  $variables['element']['#attributes']['class'] = array();
  $variables['element']['#attributes']['class'][] = 'btn';
  if (stristr($variables['element']['#value'], 'Add to cart') !== FALSE) {
    $variables['element']['#attributes']['class'][] = 'btn-cart';
  }
}
1
source | link

Give it another class in your template.php file, and CSS does the rest

/** * @param $variables */ function yourtheme_preprocess_button(&$variables) { $variables['element']['#attributes']['class'] = array(); $variables['element']['#attributes']['class'][] = 'btn'; if (stristr($variables['element']['#value'], 'Add to cart') !== FALSE) { $variables['element']['#attributes']['class'][] = 'btn-cart'; } }