You are here

function theme_sms_sendtophone_filter_inline_icon in SMS Framework 5

Same name and namespace in other branches
  1. 6.2 modules/sms_sendtophone/sms_sendtophone.module \theme_sms_sendtophone_filter_inline_icon()
  2. 6 modules/sms_sendtophone/sms_sendtophone.module \theme_sms_sendtophone_filter_inline_icon()
  3. 7 modules/sms_sendtophone/sms_sendtophone.module \theme_sms_sendtophone_filter_inline_icon()

File

modules/sms_sendtophone/sms_sendtophone.module, line 172

Code

function theme_sms_sendtophone_filter_inline_icon($text, $format) {
  if (variable_get("sms_sendtophone_filter_inline_default_icon_{$format}", 1)) {
    $icon_path = drupal_get_path('module', 'sms_sendtophone') . '/sms-send.gif';
  }
  else {
    $icon_path = variable_get("sms_sendtophone_filter_inline_custom_icon_path_{$format}", '');
  }
  $icon = theme('image', $icon_path, t(variable_get("sms_sendtophone_filter_inline_display_text_{$format}", 'Send to phone')), t('Send the highlighted text via SMS.'));
  $link = l($icon, 'sms/sendtophone/inline', array(
    'title' => t('Send the highlighted text via SMS.'),
    'class' => 'sms-sendtophone',
  ), 'text=' . urlencode($text) . '&' . drupal_get_destination(), NULL, FALSE, TRUE);
  return '<span class="sms-sendtophone-inline">' . $text . '</span> ' . $link;
}