function theme_footnote_link in Footnotes 7.2
Same name and namespace in other branches
- 5.2 footnotes.module \theme_footnote_link()
- 6.2 footnotes.module \theme_footnote_link()
- 7.3 footnotes.module \theme_footnote_link()
Themed output of a footnote link appearing in the text body
Accepts a single associative array, containing values on the following keys: text - the raw unprocessed text extracted from within the [fn] tag text_clean - a sanitized version of the previous, may be used as HTML attribute value value - the raw unprocessed footnote number or other identifying label fn_id - the globally unique identifier for the in-body footnote link anchor, used to allow links from the list to the body ref_id - the globally unique identifier for the footnote's anchor in the footnote listing, used to allow links to the list from the body
1 theme call to theme_footnote_link()
- _footnotes_replace_callback in ./
footnotes.module - Helper function called from preg_replace_callback() above
File
- ./
footnotes.module, line 328 - The Footnotes module is a filter that can be used to insert automatically numbered footnotes into Drupal texts.
Code
function theme_footnote_link($fn) {
// Drupal 7 requires we use "render element" which just introduces a wrapper
// around the old array.
$fn = $fn['fn'];
return '<a class="see-footnote" id="' . $fn['ref_id'] . '" title="' . $fn['text_clean'] . '" href="#' . $fn['fn_id'] . '">' . $fn['value'] . '</a>';
}