function xbbcode_highlighter_xbbcode_info in Extensible BBCode 7
Same name and namespace in other branches
- 8 xbbcode_highlighter/xbbcode_highlighter.module \xbbcode_highlighter_xbbcode_info()
Implements hook_xbbcode_info().
File
- xbbcode_highlighter/
xbbcode_highlighter.module, line 12 - xbbcode_highlighter.module Provides the glue code that shows highlighter languages as xbbcode tags, and invokes the highlighter when rendering.
Code
function xbbcode_highlighter_xbbcode_info() {
$languages = highlighter_languages();
foreach ($languages as $id => $info) {
$tags[$id] = array(
'callback' => 'xbbcode_highlighter_render',
'description' => t('!lang syntax highlighting', array(
'!lang' => $info['name'],
)),
'sample' => "[{$id}]" . $info['sample'] . "[/{$id}]",
'plain' => TRUE,
'nocode' => TRUE,
);
}
return $tags;
}