WordPress Plugin, Convert 'SyntaxHighlighter for Movable Type' style to SyntaxHighlighter Evolved style
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
<?php | |
/* | |
Plugin Name: Syntaxhighlighter For Movable Type to Evolved | |
Description: Convert 'SyntaxHighlighter for Movable Type' style to SyntaxHighlighter Evolved style | |
Version: 1.0 | |
Author: makoto_kw | |
Author URI: http://www.makotokw.com/ | |
*/ | |
function SyntaxhighlighterForMovableType2Evolved($text) { | |
return preg_replace('/\[code:([\w#+-]+)\]/s','[code lang="$1"]', $text); | |
} | |
add_filter('the_content', 'SyntaxhighlighterForMovableType2Evolved', 6); // SyntaxHighlighter Evolved used 7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment