Skip to content

Instantly share code, notes, and snippets.

@dgw
Created June 9, 2012 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgw/2899333 to your computer and use it in GitHub Desktop.
Save dgw/2899333 to your computer and use it in GitHub Desktop.
WSA Endnotes - Parse shortcodes in notes change
function wsa_the_content_filter( $content ) {
if ( is_single() ) {
$notes = wsa_endnotes( true );
if ( !empty($notes) ) {
$content .= '<div class="wsa-footnotes"><ol>';
foreach($notes as $i => $note) {
$num = $i + 1;
$content .= sprintf( '<li><a name="wsa-endnote-%d"></a>%s &nbsp;<a href="#wsa-inline-%d" class="wsa-up">&#9650;</a></li>',
$num, do_shortcode($note), $num
);
}
$content .= '</ol></div>';
}
}
return $content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment