function shortcode_basic_tags_shortcode_link_tip in Shortcode 7.2
Same name and namespace in other branches
- 6 shortcode_basic_tags/shortcode_basic_tags.module \shortcode_basic_tags_shortcode_link_tip()
- 7 shortcode_basic_tags/shortcode_basic_tags.module \shortcode_basic_tags_shortcode_link_tip()
Provides tip callback for link Shortcode.
1 string reference to 'shortcode_basic_tags_shortcode_link_tip'
- shortcode_basic_tags_shortcode_info in shortcode_basic_tags/
shortcode_basic_tags.module - Implements hook_shortcode_info().
File
- shortcode_basic_tags/
shortcode_basic_tags.module, line 896 - Provides basic ShortCodes (as examples).
Code
function shortcode_basic_tags_shortcode_link_tip($format, $long) {
$output = array();
$output[] = '<p><strong>' . t('[link path="the Drupal path"]link text[/link]') . '</strong>';
$output[] = t('Inserts aliased Drupal path around the link text.');
if ($long) {
$output[] = '<p>';
$output[] = t('If you omit the text and the closing [/link] tag, you get back the URL only.') . '</p>';
$output[] = t('Additional parameters for the link:
<ul>
<li><em>title</em> for link title. Default value is the link text. Use <none> to disable.</li>
<li><em>class</em> for CSS classes.</li>
<li><em>style</em> for additional CSS rules.</li>
<li><em>id</em> for unique HTML id. (No need to use # sign.)</li>
</ul>
Parameters for the URL:
<ul>
<li><em>html</em> If true, enables HTML in the text. Default is false.</li>
<li><em>absolute</em> Provides absolute URL if true. Default is false.</li>
<li><em>fragment</em> The fragment of the URL.</li>
<li><em>alias</em> If false, it disables aliased URL. Default is true.</li>
</ul>
Samples:
<ul>
<li>Simple link with title: [link path="node/5" title="My little title"]link text[/link]</li>
<li>Link with class, style, no title: [link path="node/5" title="<none>" class="button my-button" style="text-transform: uppercase;" id="my-button"]button text[/link]</li>
<li>Absolute path with fragment: [link path="node/6" absolute="true" fragment="jump-to-content" /]</li>
</ul>
');
$output[] = '</p>';
$output[] = '<p> </p>';
}
return implode(' ', $output);
}