You are here

function xbbcode_basic_render_list in Extensible BBCode 7

Same name and namespace in other branches
  1. 8 xbbcode_basic/xbbcode_basic.module \xbbcode_basic_render_list()
  2. 8.2 xbbcode_basic/xbbcode_basic.module \xbbcode_basic_render_list()
  3. 5 xbbcode_basic/xbbcode_basic.module \xbbcode_basic_render_list()
  4. 6 xbbcode_basic/xbbcode_basic.module \xbbcode_basic_render_list()
1 string reference to 'xbbcode_basic_render_list'
xbbcode_basic_xbbcode_info in xbbcode_basic/xbbcode_basic.module

File

xbbcode_basic/xbbcode_basic.module, line 236

Code

function xbbcode_basic_render_list($tag) {
  $items = explode('[*]', $tag->content);
  array_shift($items);
  $text = '<li>' . implode('</li><li>', $items) . '</li>';
  switch ($tag->option) {
    case 'ol':
      return "<ol>{$text}</ol>";
    case 'ul':
    default:
      return "<ul>{$text}</ul>";
  }
}