function read_more_token_info in Read More Link 7
Implements hook_token_info().
File
- ./
read_more.tokens.inc, line 11 - Defines the tokens which can be used for the Read more module
Code
function read_more_token_info() {
$types = $tokens = array();
$types['read-more'] = array(
'name' => t("Read More Link"),
'description' => t('Tokens related to the read-more link.'),
'needs-data' => 'node',
);
$tokens['read-more'] = array(
'link' => array(
'name' => t('Link'),
'description' => t('The %link_text linked to %link_url with title attribute %link_title. Does not include the wrapper text.', array(
'%link_text' => t('Link text'),
'%link_url' => t('Link URL'),
'%link_title' => t('Link title'),
)),
),
'link-text' => array(
'name' => t('Link text'),
'description' => t('The text wrapped by the link.'),
),
'link-url' => array(
'name' => t('Link URL'),
'description' => t('The target URL.'),
),
'link-full-url' => array(
'name' => t('Link Absolute URL'),
'description' => t('The absolute target URL.'),
),
'link-title' => array(
'name' => t('Link title'),
'description' => t('The value of the link\'s title attribute.'),
),
);
// Make it a sub-token of node tokens.
$tokens['node']['read-more'] = array(
'name' => t('Read More Link'),
'description' => t('Read More Link'),
'type' => 'read-more',
);
$token_info = array(
'types' => $types,
'tokens' => $tokens,
);
return $token_info;
}