我已经挣扎了几个小时来让它工作。。。希望这里有人能帮助我。
我刚刚开始使用wp脚注插件,我正在尝试将反向链接上的title属性设置为“返回到文本中的脚注”其中#=脚注编号。
下面是我尝试的,将$id\\u num变量放在title属性中,但它最终只显示为存在的脚注数。You can see this at my development site on the first post.
提前非常感谢您的帮助。
这相当多,因此我将在最后粘贴代码:
// Display identifiers
foreach ($identifiers as $key => $value) {
$id_id = "identifier_".$key."_".$post->ID;
$id_num = ($style == \'decimal\') ? $value[\'use_footnote\']+$start_number : $this->convert_num($value[\'use_footnote\']+$start_number, $style, count($footnotes));
$id_replace = $this->current_options[\'pre_identifier\'].\'<a href="\'.$id_href.\'" id="\'.$id_id.\'" title="\'.$id_title.\'">\'.$id_num.\'</a>\'.$this->current_options[\'post_identifier\'];
if ($this->current_options[\'superscript\']) $id_replace = \'<sup>\'.$id_replace.\'</sup>\';
}
// Display footnotes
if ($display) {
$start = ($start_number != 1) ? \'start="\'.$start_number.\'" \' : \'\';
if ($style == \'symbol\') {
$data = $data . \'<span class="symbol">\' . $this->convert_num($key+$start_number, $style, count($footnotes)) . \'</span> \';
}
$data = $data.$value[\'text\'];
if (!is_feed()){
foreach($value[\'identifiers\'] as $identifier){
$data = $data.$this->current_options[\'pre_backlink\'].\'
<a href="\'.( ($use_full_link) ? get_permalink($post->ID) : \'\' ).\'#identifier_\'.$identifier.\'_\'.$post->ID.\'" class="backlink"
title="Return to footnote \'.$id_num.\' in the text.">↩</a>\'
.$this->current_options[\'post_backlink\'];
}
return $data;
}