Created
June 9, 2012 03:59
-
-
Save dgw/2899333 to your computer and use it in GitHub Desktop.
WSA Endnotes - Parse shortcodes in notes change
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <a href="#wsa-inline-%d" class="wsa-up">▲</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