EOF; $code['lisp'] = << "Hello World!" EOF; $code['html'] = <<Hello World

Hello World!

howdy

EOF; $code['ocaml'] = << int = let rec fact x = if x < = 1 then 1 else x * fact (x - 1);; val fact : int -> int = fact 5;; - : int = 120 square 120;; - : int = 14400 EOF; function test_lang($lang, $language = null) { global $code; if (!isset($language)) $language = $lang; else $as = "as $language"; $snippet = <<$lang $as

This is *what* some $lang code looks like:

 \t \r
$code[$lang]
EOF; return $snippet; } function test_all() { $content = ''; $content .= test_lang('php'); $content .= test_lang('lisp'); $content .= test_lang('java'); $content .= test_lang('xml'); $content .= test_lang('html', 'html4strict'); $content .= test_lang('html', 'xml'); $content .= test_lang('ocaml'); echo apply_filters("the_content", $content); } ?> WP-Syntax Test Page ]*)>/", "[$1pre$2]", $content); } /* * === WORDPRESS STUBS === */ function remove_filter($tag, $function_to_remove, $priority = 10) { return true; } function add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) { global $test_filter; $test_filter[$tag][$priority][] = $function_to_add; $test_filter[$tag][$priority] = array_unique($test_filter[$tag][$priority]); return true; } function apply_filters($tag, $string) { global $test_filter; if (!isset($test_filter[$tag])) return $string; uksort($test_filter[$tag], "strnatcasecmp"); foreach ($test_filter[$tag] as $priority => $functions) { if (is_null($functions)) continue; foreach($functions as $function) { $string = call_user_func_array($function, array($string)); } } return $string; } ?>