function shorten_current in Shorten URLs 7
Same name and namespace in other branches
- 6 shorten.module \shorten_current()
- 7.2 shorten.module \shorten_current()
Builds a textfield to show the short URL for the current page.
1 string reference to 'shorten_current'
- shorten_current_form in ./
shorten.module - Returns HTML representing the short URL form.
File
- ./
shorten.module, line 654 - Shortens URLs via external services.
Code
function shorten_current($form, $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;
}