You are here

title.inc in Linkit 7.3

File

plugins/linkit_attribute/title.inc
View source
<?php

/**
 * @file
 * Define Linkit title attribute plugin.
 */
$plugin = array(
  'name' => t('Title'),
  'callback' => 'linkit_attribute_plugin_title',
);

/**
 * Create a FAPI element.
 *
 * @param array $plugin
 *   This is the plugin definition.
 *
 * @param array $settings
 *   An array of settings for this attribute. This is from the profile settings.
 *
 * @return
 *   An FAPI element.
 *
 * @see LinkitProfile::setAttributes()
 */
function linkit_attribute_plugin_title($plugin, $settings = array()) {
  return array(
    '#type' => 'textfield',
    '#title' => $plugin['name'],
    '#maxlength' => 255,
    '#size' => 40,
    '#default_value' => '',
    '#weight' => isset($settings['weight']) ? $settings['weight'] : 0,
  );
}

Functions

Namesort descending Description
linkit_attribute_plugin_title Create a FAPI element.