Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.