Support customization of the header [with fix]
-
Thanks for building such an awesome plugin, it just saved me hours of fiddling with regex! Just a simple request that would make this perfect – could you apply filter to the header so that:
- It’s possible to maintainably change the label (i.e. from “Notes:” to “Sources:”)
- Translation is possible
In the version I’m using, I changed line 84 from:
$content .= '<div class="simple-footnotes"><p class="notes">Notes:</p><ol>';
to
$content .= apply_filters('simple_footnotes_header','<div class="simple-footnotes"><p class="notes">Notes:</p><ol>');
I’ve set up a filter in my functions.php file with a custom string, including a gettext target:
function footnote_header($header){ return sprintf( '<div class="simple-footnotes"><h2>%s:</h2><ol>', __('Sources','theme') ); } add_filter('simple_footnotes_header','footnote_header');
This is working perfectly for me. Could you add the filter to your plugin?
https://www.ads-software.com/extend/plugins/simple-footnotes/
- The topic ‘Support customization of the header [with fix]’ is closed to new replies.