function hook_linkit_attributes in Linkit 7.2
Defines one or more attributes to use with Linkit.
All attributes is defined as form elements, and it used both in the Linkit profile form and in the Linkit dashboard.
See Drupal FAPI for more info. http://api.drupal.org/api/drupal/developer--topics--forms_api_reference....
Parameters
array $profile: The profile settings the user calling this function has.
Return value
An associative array with form elements with the key being the HTML attribute name (my_attribute = <a my_attribute="value"></a>).
1 function implements hook_linkit_attributes()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- linkit_linkit_attributes in ./
linkit.module - Implements hook_linkit_attributes().
1 invocation of hook_linkit_attributes()
- linkit_get_attributes in ./
linkit.module - Get all attributes defined by hook_linkit_attributes().
File
- ./
linkit.api.php, line 46 - Hooks and alters provided by Linkit.
Code
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;
}