Commit 46e6fed6 authored by tim-e's avatar tim-e Committed by anon

Added #2079909 by tim-e Added target attribute.

parent afc65708
<?php
/**
* @file
* Define Linkit target attribute plugin.
*/
$plugin = array(
'name' => t('Target'),
'callback' => 'linkit_attribute_plugin_target',
);
/**
* 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_target($plugin, $settings = array()) {
return array(
'#type' => 'select',
'#title' => $plugin['name'],
'#options' => array('_self' => '_self', '_blank' => '_blank', '_parent' => '_parent', '_top' => '_top'),
'#weight' => isset($settings['weight']) ? $settings['weight'] : 0,
);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment