You are here

function hook_linkit_attributes_alter in Linkit 7.2

Alter an attribute before it has been processed.

This hook is useful for altering the attribute form array that will be used in both the Linkit profile form and in the Linkit dashboard.

Parameters

$attributes: An associative array with form elements defining attributes.

See also

hook_linkit_attributes()

1 invocation of hook_linkit_attributes_alter()
linkit_get_attributes in ./linkit.module
Get all attributes defined by hook_linkit_attributes().

File

./linkit.api.php, line 70
Hooks and alters provided by Linkit.

Code

function hook_linkit_attributes_alter(&$attributes) {
  $attributes['rel']['#type'] = 'select';
  $attributes['rel']['#title'] = t('Rel select');
  $attributes['rel']['#options'] = array(
    '' => t('None'),
    'now-follow' => t('No follow'),
    'other-rel' => t('Other rel'),
  );
}