You are here

function xbbcode_list_xbbcode in Extensible BBCode 5

Same name and namespace in other branches
  1. 6 xbbcode_list/xbbcode_list.module \xbbcode_list_xbbcode()

File

xbbcode_list/xbbcode_list.module, line 2

Code

function xbbcode_list_xbbcode($op = 'list', $delta = '', $tag = NULL) {
  $tags['list'] = array(
    'dynamic' => true,
    'description' => t("Formats a list of items in the default style."),
  );
  $tags['ol'] = array(
    'dynamic' => true,
    'description' => t("Formats a numbered list of items."),
  );
  $tags['ul'] = array(
    'dynamic' => true,
    'description' => t("Formats a non-numbered list of items."),
  );
  switch ($op) {
    case 'list':
      return array_keys($tags);
    case 'info':
      return $tags[$delta];
    case 'render':
      return xbbcode_list_render($delta, $tag->option, $tag->content);
  }
}