function footnoteContent( $content ) {

		global $id; // This is the Post ID, [@see WP_Query::setup_postdata, ...]

		if ( ! empty( $this->footnotes ) && isset( $this->footnotes[ $id ] ) ) {
			$footnotes = $this->footnotes[ $id ];
		} else {
			return $content;
		}

		if ( $this->numbered[ $id ] ) {
			$content .= '<hr class="before-footnotes" /><div class="footnotes"><ol>';
		} else {
			$content .= '<hr class="before-footnotes" /><div class="footnotes"><ul>';
		}

		foreach ( $footnotes as $num => $footnote ) {
			$num++;
			$numlabel = "$id-$num";
			$content .= '<li id="footnote-' . $numlabel . '">' . make_clickable( $footnote ) . ' <a href="#return-footnote-' . $numlabel . '" class="return-footnote">&crarr;</a></li>';
		}

		if ( $this->numbered[ $id ] ) {
			$content .= '</ol></div>';
		} else {
			$content .= '</ul></div>';
		}

		unset( $this->footnotes[ $id ] ); // Done, reset

		return $content;
	}
function footnoteContent( $content ) {

		global $id; // This is the Post ID, [@see WP_Query::setup_postdata, ...]

		if ( ! empty( $this->footnotes ) && isset( $this->footnotes[ $id ] ) ) {
			$footnotes = $this->footnotes[ $id ];
		} else {
			return $content;
		}

		if ( $this->numbered[ $id ] ) {
			$content .= '<hr class="before-footnotes" /><div class="footnotes"><ol>';
		} else {
			$content .= '<hr class="before-footnotes" /><div class="footnotes"><ul>';
		}

		foreach ( $footnotes as $num => $footnote ) {
			$num++;
			$numlabel = "$id-$num";
			$content .= '<li id="footnote-' . $numlabel . '">' . make_clickable( $footnote ) . ' <a href="#return-footnote-' . $numlabel . '" class="return-footnote">&crarr;</a></li>';
		}

		if ( $this->numbered[ $id ] ) {
			$content .= '</ol></div>';
		} else {
			$content .= '</ul></div>';
		}

		unset( $this->footnotes[ $id ] ); // Done, reset

		return $content;
	}
function footnoteContent ( $ content ) { global $ id ; // This is the Post ID, [@see WP_Query::setup_postdata, ...] if ( ! empty ( $ this -> footnotes ) && isset ( $ this -> footnotes [ $ id ] ) ) { $ footnotes = $ this -> footnotes [ $ id ] ; } else { return $ content ; } if ( $ this -> numbered [ $ id ] ) { $ content .= '<hr class="before-footnotes" /><div class="footnotes"><ol>' ; } else { $ content .= '<hr class="before-footnotes" /><div class="footnotes"><ul>' ; } foreach ( $ footnotes as $ num => $ footnote ) { $ num ++ ; $ numlabel = "$id-$num" ; $ content .= '<li id="footnote-' . $ numlabel . '">' . make_clickable ( $ footnote ) . ' <a href="#return-footnote-' . $ numlabel . '" class="return-footnote">&crarr;</a></li>' ; } if ( $ this -> numbered [ $ id ] ) { $ content .= '</ol></div>' ; } else { $ content .= '</ul></div>' ; } unset ( $ this -> footnotes [ $ id ] ) ; // Done, reset return $ content ; }
Post-process footnote shortcode

@param $content

@return string
Post - process footnote shortcode