I just released Easy Footnotes version 1.1.0 to the WordPress.org plugin repository. One of the big items in this release is that I’ve started improving the code to meet the WordPress Coding Standards. And of course testing everything out with WordPress 5.0 and the new Gutenberg editor. đ
Another big item is the introduction of a new shortcode. Version 1.1.0 adds the efn_note
1 shortcode. The previous note
shortcode is still supported, but prefixing should help compatibility issues with some other shortcodes on the market.
This release also updates the qTip Tooltip functionality to work better with keyboard navigation. Now footnotes should be displayed when tabbed into focus. A much better experience for those not using a mouse and benefitting from hover.
For the developers out there Easy Footnotes 1.1.0 introduces 3 new hooks that can be used to modify Easy Footnotes output.
easy_footnote_label
 – This filter gives you the Easy Footnote label markup and original label text as parameters. You can modify the label markup to changes the element from an <h4>
 or add markup before and after.
// Changing Easy Footnote label to output in an <h5> element.
function efn_change_label_markup( $output, $label ) {
return '<h5>' . $label . '</h5>';
}
add_filter( 'efn_footnote_label', 'change_efn_label', 10, 2 );
before_footnote
 and after_footnote
 – These two filters are run before and after the footnote list that is output after the post content. This was submitted as a pull request on Github.
// Wrap the footnote list in a <div> element.
function efn_before_footnote_list( $footnote_content ) {
return '<div>' . $footnote_content;
}
add_filter( 'before_footnote', 'efn_before_footnote_list' );
function efn_after_footnote_list( $footnote_content ) {
return $footnote_content . </div>;
}
add_filter( 'after_footnote', 'efn_after_footnote_list' );
Contributing
If you’d like to submit your own pull request or open an issue on Github feel free to do so on the official repository.
Roadmap
- Gutenberg block for footnote list.
- Add footnote button in Gutenberg editor.
- Save footnote for re-use.
- Any other ideas, let me know.Â