You are here

function shorten_current in Shorten URLs 6

Same name and namespace in other branches
  1. 7.2 shorten.module \shorten_current()
  2. 7 shorten.module \shorten_current()

Builds a textfield to show the short URL for the current page.

1 string reference to 'shorten_current'
shorten_block in ./shorten.module
Implementation of hook_block().

File

./shorten.module, line 589
Shortens URLs via external services.

Code

function shorten_current(&$form_state) {
  drupal_add_js(drupal_get_path('module', 'shorten') . '/shorten.js');
  $form['this_shortened'] = array(
    '#type' => 'textfield',
    '#size' => 25,
    '#default_value' => shorten_url(),
  );
  return $form;
}