wp-footnote 1.4 後端設定 Note Identifier Options 的問題

前幾天 blog 搬家時,plugin 的檔案沒有直接從舊主機移到新主機去,而是重新去每一個 plugin 的網站抓檔案丟到新主機去,這就造成之前改過的東西要重新在改一次。像 wp-footnote 1.4 就是這樣。

wp-footnote 1.4 有個奇怪的 bug。它在 Wordpress 後端的設定介面里有個叫 note identifier options 的設定,我在該設定里將 Before/After 設定成方括號,但在前端網頁卻沒顯示出來。強者 jeffhung 寫的「升級到 wp-footnotes 1.4」一文中在最後兩段有提到如何修正之。

但這次搬家時,抓下來 wp-footnote 1.4 里的 footnote.php 檔案的 code 被作者改過了[1],所以現在這個 bug 沒辦法按照強者 jeffhung 的步驟修正。

改動過 code 的 footnote.php 檔按以下步驟修正即可(`<` 和 `>` 為全形):

$id_replace = $current_settings['pre-link'].'〈a href="'.$id_href.'" id="'.$id_id.'" class="footnote-link footnote-identifier-link" title="'.$id_title.'"〉'.$id_num.'〈/a〉'.$current_settings['post_link'];

改成:

$id_replace = $current_settings['pre_identifier'].'〈a href="'.$id_href.'" id="'.$id_id.'" class="footnote-link footnote-identifier-link" title="'.$id_title.'"〉'.$id_num.'〈/a〉'.$current_settings['post_identifier'];

搞定收工。

  1. 很奇怪,版本號沒變,changelog 里也沒說。 []

0 Responses to “wp-footnote 1.4 後端設定 Note Identifier Options 的問題”


  1. No Comments

Leave a Reply

Quote selected text