WordPress.org

Ready to get started?Download WordPress

Forums

Simple Footnotes
Support customization of the header [with fix] (1 post)

  1. Senning
    Member
    Posted 1 year ago #

    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:

    1. It's possible to maintainably change the label (i.e. from "Notes:" to "Sources:")
    2. 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?

    http://wordpress.org/extend/plugins/simple-footnotes/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic