"; } function closeCodeTag() { return ""; } // [code]some code goes here[/code] -> to nicely formatted code function shortcode_java($attr, $content) { return openCodeTag('java').strip_tags($content).closeCodeTag(); } add_shortcode('java', 'shortcode_java'); function shortcode_php($attr, $content) { return openCodeTag('php').strip_tags($content).closeCodeTag(); } add_shortcode('php', 'shortcode_php'); function shortcode_html($attr, $content) { return openCodeTag('html').htmlspecialchars(str_replace("
", "", $content)).closeCodeTag(); } add_shortcode('html', 'shortcode_html'); ?>