|
|
@ -135,6 +135,16 @@ function _bibcite_footnotes_reference_array_cmp($a, $b) { |
|
|
|
return strcmp($a1, $b1); |
|
|
|
return strcmp($a1, $b1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function bibcite_footnotes_preprocess_footnote_link(&$variables) { |
|
|
|
|
|
|
|
// $variables['fn']['fn']['#type'] = 'markeup'; |
|
|
|
|
|
|
|
// $variables['fn']['fn']['#markup'] = '<h2>Hello!</h2>'; |
|
|
|
|
|
|
|
$fn = $variables['fn']['fn']; |
|
|
|
|
|
|
|
$url = Url::fromUserInput('#' . $fn['ref_id'], ['attributes' => ['id' => $fn['fn_id'], 'class' => 'footnote-link']]); |
|
|
|
|
|
|
|
$link = Link::fromTextAndUrl(($dont_show_backlink_text && $reference_entity_id ? '^' : $fn['value']), $url)->toRenderable(); |
|
|
|
|
|
|
|
$build[] = $link; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Implements hook_theme(). |
|
|
|
* Implements hook_theme(). |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -148,11 +158,14 @@ function bibcite_footnotes_theme() { |
|
|
|
|
|
|
|
|
|
|
|
function bibcite_footnotes_theme_registry_alter(&$theme_registry) { |
|
|
|
function bibcite_footnotes_theme_registry_alter(&$theme_registry) { |
|
|
|
unset($theme_registry['footnote_list']['function']); |
|
|
|
unset($theme_registry['footnote_list']['function']); |
|
|
|
// $theme_registry['footnote_list']['function'] = 'bibcite_footnotes_theme_footnote_list'; |
|
|
|
|
|
|
|
$theme_registry['footnote_list']['path'] = drupal_get_path('module', 'bibcite_footnotes') . '/templates'; |
|
|
|
$theme_registry['footnote_list']['path'] = drupal_get_path('module', 'bibcite_footnotes') . '/templates'; |
|
|
|
$theme_registry['footnote_list']['template'] = 'footnote-list'; |
|
|
|
$theme_registry['footnote_list']['template'] = 'footnote-list'; |
|
|
|
$theme_registry['footnote_list']['variables']['notes'] = []; |
|
|
|
$theme_registry['footnote_list']['variables']['notes'] = []; |
|
|
|
$theme_registry['footnote_list']['variables']['references'] = []; |
|
|
|
$theme_registry['footnote_list']['variables']['references'] = []; |
|
|
|
$theme_registry['footnote_list']['variables']['footnotes'] = []; |
|
|
|
$theme_registry['footnote_list']['variables']['footnotes'] = []; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unset($theme_registry['footnote_link']['function']); |
|
|
|
|
|
|
|
$theme_registry['footnote_link']['path'] = drupal_get_path('module', 'bibcite_footnotes') . '/templates'; |
|
|
|
|
|
|
|
$theme_registry['footnote_link']['template'] = 'footnote-link'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|