You are here

function _xbbcode_list_render in Extensible BBCode 7

Same name and namespace in other branches
  1. 8 xbbcode_list/xbbcode_list.module \_xbbcode_list_render()
1 string reference to '_xbbcode_list_render'
xbbcode_list_xbbcode_info in xbbcode_list/xbbcode_list.module

File

xbbcode_list/xbbcode_list.module, line 27

Code

function _xbbcode_list_render($tag) {
  $settings = variable_get('xbbcode_list', array(
    'type' => 'ol',
    'ol' => array(
      'style' => 'hierarchy',
      'classes' => array(
        'numeric',
        'lower-alpha',
        'lower-roman',
      ),
    ),
  ));
  $type = $tag->name == 'list' ? $settings['type'] : $tag->name;
  $classes = $type == 'ol' ? $settings['ol']['style'] == 'hierarchy' ? $settings['ol']['classes'] : array(
    'sectioned',
  ) : array(
    'default',
  );
  $tree = _xbbcode_list_tree($tag->content);
  return _xbbcode_list_render_tree($type, $classes, $tree);
}