Created
November 11, 2009 10:15
-
-
Save makotokw/231844 to your computer and use it in GitHub Desktop.
PukiWiki gist plugin
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 | |
/** | |
* gist.inc.php - embed gist | |
* | |
* Usage: | |
* #gist(231844) | |
* &gist(231844); | |
* | |
* @author makoto_kw | |
* @licence http://www.gnu.org/licenses/gpl.html GPLv2 | |
* @link http://gist.github.com/231844 | |
* @link http://code.google.com/p/google-code-prettify/ | |
* @version 1.0 | |
*/ | |
function plugin_gist_convert() { | |
$args = func_get_args(); | |
$gistid = array_pop($args); | |
return '<script src="http://gist.github.com/'.$gistid.'.js"></script>'; | |
} | |
function plugin_gist_inline() { | |
$args = func_get_args(); | |
array_pop($args); | |
$gistid = array_pop($args); | |
return '<script src="http://gist.github.com/'.$gistid.'.js"></script>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment