説明
Grantland と FiveThirtyEight のスタイルに感化された、デスクトップとモバイル用に最適化した脚注。
WordPress エディターの脚注アイコンか、ショートコード [mfn]脚注です[/mfn] を使って投稿内に脚注を入れます。プラグインは自動で連番を入れます。
デスクトップではユーザーが番号をクリックすると、脚注がツールチップとして表示されます。モバイルでは、現在の文章の下に節として展開されます。
また [mfn_list] のショートコードで記事内の脚注の一覧を表示することもできます。
GitHub の公式リポジトリはここです: https://github.com/seankwilliams/modern-footnotes
ショートコードのオプション
ショートコードのオプションを使って、脚注の動作やスタイルを変更できます。
[mfn referencenumber=3] この脚注は3番になります[/mfn] 。
[mfn class=’my-pretty-class’] この脚注は my-pretty-class というクラスが追加され、個別に脚注をスタイルできます[/mfn]。
[mfn referencereset=’true’] 脚注のカウントを初期化するので、1番に戻ります。続く脚注も、この新しく開始された番号に続くことになります。
スクリーンショット



インストール
- Upload the modern-footnotes folder to your wp-content/plugins directory.
- Activate the plugin in the WordPress Plugins section.
- 投稿内に脚注を使うには、エディター内の脚注アイコンを使うか、ショートコードを使います: [mfn]ここが脚注になります[/mfn]
- Reference numbers will be automatically assigned sequentially so the first footnote is labeled 1, then the next footnote is 2, then 3, etc. You can specify custom reference numbers by using the “referencenumber” attribute to specify a particular reference number. For example: [mfn referencenumber=3]This will have the number 3 with it.[/mfn]
- スタイルを変更したいなら、お使いのテーマのカスタム CSS から次のスタイルを上書きできます: .modern-footnotes-footnote – 脚注番号を表示する上付き要素 .modern-footnotes-footnote–selected – 今アクティブな上付き要素 .modern-footnotes-footnote__note – モバイルとデスクトップ両方に適用されるスタイル .modern-footnotes-footnote__note–mobile – モバイル用の脚注のスタイル .modern-footnotes-footnote__note–desktop – デスクトップ用の脚注のスタイル
FAQ
-
脚注を挿入する方法は ?
-
投稿内に脚注を使うには、エディター内の脚注アイコンを使うか、ショートコードを使います: [mfn]ここが脚注になります[/mfn]
-
投稿の末端にも脚注一覧を表示できますか ?
-
はい。設定 -> Modern Footnotes からオプションの「投稿の末端に脚注一覧を表示」を選択します。または印刷時にのみ表示するには、「印刷時に、投稿の末端に脚注一覧」のオプションです。
-
デスクトップでツールチップを表示する代わりに、モバイルみたいに脚注を展開できますか ?
-
はい。設定 -> Modern Footnotes からオプションの「展開可能な脚注」を選択します。
-
本プラグインが出力する出典番号を変更できますか ?
-
はい。出典番号を指定するには、referencenumber 属性を使用します。例: [mfn referencenumber=3]これは3番になります。[/mfn]
-
脚注番号を1に初期化できますか ?
-
はい。referencereset=’true’ の属性により出典番号1から再開されます。例: [mfn referencereset=’true’] これで、それまでの脚注の数に関係なく1から再開されます。これに続く脚注は2になります。[/mfn] ただしプラグインが HTML を処理する方法によっては、他のすべてのプラグインと互換性がない場合があります。数字が正しく表示されなければ、代わりに refnum 属性を使う必要があるかもしれません。(参考: 本プラグインが出力する出典番号を変更できますか ?)
-
脚注のスタイルを変更できますか ?
-
スタイルを変更したいなら、お使いのテーマのカスタム CSS から次のスタイルを上書きできます:
.modern-footnotes-footnote – 脚注番号を表示する上付き要素
.modern-footnotes-footnote–selected – 今アクティブな上付き要素
.modern-footnotes-footnote__note – モバイルとデスクトップ両方に適用されるスタイル
.modern-footnotes-footnote__note–mobile – モバイル用の脚注のスタイル
.modern-footnotes-footnote__note–desktop – デスクトップ用の脚注のスタイルFurthermore, if you want to apply different styles to different footnotes, you can add additional classes to each individual footnote by using the
classoption in the shortcode like this:
[mfn class=”my-pretty-class”] [/mfn] -
ブロック・エディター/グーテンベルグ・エディターに対応していますか ?
-
はい。選択中の文字列を脚注へと移動させるため、ブロックエディターのツールバーに Modern Footnotes ボタンが使えます。一方で、本プラグインが出力する出典番号を指定したいなら、ショートコードを入力することになります。
-
Why isn’t the word “footnote” appearing by all of my footnotes in the Block Editor/Gutenberg Editor?
-
The word “footnote” only shows up by the first footnote in each paragraph in the editor, but all footnotes are highlighted gray. This is to work around a technical limitation of Gutenberg’s editor, though hopefully we can come up with a better solution in the future. Don’t worry, your footnotes will show up correctly when viewing the page/blog post though!
-
本プラグインの開発を支援できますか ?
-
Modern Footnotes は、貢献者の自由時間から成り立つオープンソースのプロジェクトです。手伝いたいという表明にはとても意味があります。肯定的な評価を残したり、開発者にコーヒーをおごることで本プラグインを支援できます。また開発を支援したいなら、GitHub でのプロジェクトへの貢献には深く感謝します。
評価
貢献者と開発者
変更履歴
1.5.0
- Add links from footnote list up to footnote location
- Add links from footnote tooltip down to footnote location
- Minor internal rewrite of the logic when multiple footnotes share the same reference label.
1.4.21
- Formatting fix for block editor in WordPress 7.0.
1.4.20
- Security fix for XSS issue. Thanks to muhammad yudha and Patchstack for identifying the issue.
1.4.19
- Fix compatibility issue with Relevanssi
1.4.18
- Fix PHP warning when $GLOBALS[‘post’] was not a WP_POST instance
1.4.17
- Security fix for XSS issue. Thanks to cleantalk and Dmitrii Ignatyev for identifying the issue.
1.4.16
- Security fix for XSS issue. Thanks to Rio Darmawan for identifying the issue.
1.4.15
- Fix for duplicate HTML ids
1.4.14
- Minor fix for a PHP warning where foreach was attempting to access a null object
1.4.13
- Fixed a problem where using the hover option for footnotes would cause footnote display issues on mobile.
1.4.12
- Add ability to provide a custom class attribute to mfn shortcode tags
- Fix JavaScript error loading Modern Footnotes on widgets page
- Add a new option to customize the heading of a footnote list
- Fix PHP type warnings when strings were provided as footnote reference numbers
1.4.11
- Accessibility fix: set aria-describedby and gave footnote links a role of “button”
1.4.10
- Remove outline style from tooltip when users are focused on it
- Added an option to add heading text to a footnote list
1.4.9
- Fixed a PHP warning in debug mode
1.4.8
- Fixed a PHP warning in debug mode
1.4.7
- Add option to add title attribute with footnote contents to footnote numbers
1.4.6
- Removed title attribute from footnotes (may add this in again in the future as a setting, if it’s requested)
1.4.5
- Fix to issue where footnotes would sometimes interfere with line height
- Only load CSS/JS for Modern Footnotes on pages where it’s used
- Add option to show tooltips on hover
- Add title attribute to a element that opens footnotes
- Fixed issue with rendering footnotes in excerpts
- Fixed issue related to WordPress back-end compatibility with other plugins
- Accessibility improvements: set focus in and out of tooltip footnotes, and make the escape key work when in a footnote
=1.4.4=
* Fixed PHP warning
=1.4.3=
* Add an option to list footnotes at the bottom of an RSS feed
=1.4.2=
* Change “x” button to only close one collapsible footnote at a time to prevent mobile scrolling issues
=1.4.1=
* Added CSS to make the footnotes list display better with some themes.
=1.4=
* Added option to list footnotes at bottom of the page. Fixed issue where Display Posts plugin would cause posts to sometimes render with incorrect numbering.
=1.3.11=
* Prepared plugin for localization
=1.3.10=
* Fixed problem on pages that listed multiple posts where footnote numbers wouldn’t reset. Added an option to reset footnote numbering with an attribute. Fixed a minor code issue with the Gutenberg editor.
=1.3.9=
* Fixed problem in Chrome where a footnote near the right side of the screen would appear with compressed width on desktop
=1.3.8=
* Fixed problems with some custom implementations where footnotes wouldn’t open due to extra DOM elements being placed between the footnote link & content
=1.3.7=
* Fixed JavaScript error
=1.3.6=
* Fix for problem where clicking on a footnote with the same numbering as another footnote would open both footnotes
=1.3.5=
* Fix for problem where footnote numbering would incorrectly start with ‘3’ in some cases, especially when combined with the Yoast SEO plugin
=1.3.4=
* Fix for problem where some extra, empty footnotes would randomly appear
=1.3.3=
* Fix issue where applying multiple formats in conjunction with footnotes in the Gutenberg editor would mess up footnote formatting
=1.3.2=
* Fix issue where links inside footnotes wouldn’t appear inline with other text
=1.3.1=
* Updated style so that long links are truncated with ellipsis in tooltips
=1.3.0=
* Fixed problem where Classic Editor button did not appear in WP 5.x. Added Gutenberg button. Allow shortcode within footnotes.
=1.2.7=
* Fixed additional shortcode rendering issue in RSS feeds.
=1.2.6=
* Removed footnote shortcodes from rendering in RSS feeds.
=1.2.5=
* Fixed issue with footnotes causing line breaks.
=1.2.4=
* Fixed a problem where HTML tags could not be entered inside a footnote.
=1.2.3=
* Tested with WordPress 5.0
=1.2.2=
* Changed license from LGPL to GPL2.
=1.2.1=
* Fixed a problem where footnote would improperly size when it was opened multiple times at the edge of a container
=1.2=
* Stopped using href=”#” for a HTML elements for increased theme compatibility. Added ability to have a custom shortcode. Added a custom CSS area. Added the ability to manually override citations.
=1.1.4=
* Fixed issue where footnote numbering wouldn’t be sequential when other plugins like TablePress caused shortcodes to render in a different order than they appear in the HTML.
=1.1.3=
* Fixed issue where icon was not showing in the admin MCE editor
=1.1.2=
* Fixed problem where scripts were enqueued incorrectly.
=1.1.1=
* Fixed error occuring in PHP versions below 5.3
=1.1=
* Added option to use expandable version of footnotes on desktop instead of the default tooltip style
=1.0=
* initial version
