). */ function hook_linkit_attributes($profile) { $attributes['my_attribute'] = array( '#type' => 'textfield', '#title' => t('My attribute'), '#maxlength' => 255, '#size' => 40, '#default_value' => '', '#weight' => isset($profile->data['attributes']['my_attribute']['weight']) ? $profile->data['attributes']['my_attribute']['weight'] : 0, ); return $attributes; } /** * 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. * * @param $attributes * An associative array with form elements defining attributes. * * @see hook_linkit_attributes() */ 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'), ); }