Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// github gist Shortcode Usage: [gist id="" file=""]
function gist_shortcode( $atts ) {
extract(shortcode_atts(array(
'id' => '',
'file' => ''
), $atts));
return '<script src="https://gist.github.com/'.$id.'.js?file='.$file.'"></script>';
}
add_shortcode('gist', 'gist_shortcode');
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.