Support » Plugin: Simple Footnotes » Removing the space before note in post text

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m similarly troubled. How do I get rid of the space?

    You’ll have to edit the plugin. Change this (on the line that starts with return):

    function shortcode( $atts, $content = null ) {
                    global $id;
                    if ( null === $content )
                            return;
                    if ( ! isset( $this->footnotes[$id] ) )
                            $this->footnotes[$id] = array( 0 => false );
                    $this->footnotes[$id][] = $content;
                    $note = count( $this->footnotes[$id] ) - 1;
                    return ' <a class="simple-footnote" title="' . esc_attr( wp_strip_all_tags( $content ) ) . '" id="return-note-' . $id . '-' . $note . '" href="#note-' . $id . '-' . $note . '"><sup>' . $note . '</sup></a>';
            }

    to this:

    function shortcode( $atts, $content = null ) {
                    global $id;
                    if ( null === $content )
                            return;
                    if ( ! isset( $this->footnotes[$id] ) )
                            $this->footnotes[$id] = array( 0 => false );
                    $this->footnotes[$id][] = $content;
                    $note = count( $this->footnotes[$id] ) - 1;
                    return '<a class="simple-footnote" title="' . esc_attr( wp_strip_all_tags( $content ) ) . '" id="return-note-' . $id . '-' . $note . '" href="#note-' . $id . '-' . $note . '"><sup>' . $note . '</sup></a>';
            }

    Just remove the space before the opening of the <a> tag.

    Thanks Grant for posting a solution. I will try that.

    It’s a shame it’s not baked into the plugin, as this means that every time we upgrade we’ll have to edit this file.

    Yes, this works. Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Removing the space before note in post text’ is closed to new replies.