function xbbcode_get_custom_tag in Extensible BBCode 6
Same name and namespace in other branches
- 5 xbbcode-misc.php \xbbcode_get_custom_tag()
3 calls to xbbcode_get_custom_tag()
File
- ./
xbbcode.inc, line 120
Code
function xbbcode_get_custom_tag($tag = NULL) {
static $tags;
if (!isset($tags)) {
$res = db_query("SELECT name, sample, description, selfclosing, dynamic, multiarg, replacewith FROM {xbbcode_custom_tags}");
while ($row = db_fetch_array($res)) {
$tags[$row['name']] = $row;
}
}
if ($tag && !empty($tags[$tag])) {
return $tags[$tag];
}
else {
if (!empty($tags)) {
return array_keys($tags);
}
}
}