You are here

function sms_sendtophone_link in SMS Framework 6

Same name and namespace in other branches
  1. 5 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_link()
  2. 6.2 modules/sms_sendtophone/sms_sendtophone.module \sms_sendtophone_link()

File

modules/sms_sendtophone/sms_sendtophone.module, line 393

Code

function sms_sendtophone_link($type, $node = NULL, $teaser = FALSE) {
  $links = array();
  if ($type == 'node') {
    $types = variable_get('sms_sendtophone_content_types', array());
    if (in_array($node->type, $types)) {
      if ($types[$node->type]) {
        $links['sms_sendtophone'] = array(
          'title' => t('Send to phone'),
          'href' => "sms/sendtophone/node/{$node->nid}",
          'attributes' => array(
            'class' => 'sms-sendtophone',
            'title' => 'Send a link via SMS.',
          ),
        );
      }
    }
  }
  return $links;
}