function _xbbcode_build_filter in Extensible BBCode 7
Same name and namespace in other branches
- 8 xbbcode.inc \_xbbcode_build_filter()
Create or load a parser object.
Parameters
$filter: The filter object containing settings for the given format.
$format: The text format object assigned to the text to be filtered.
Return value
The XBBCodeFilter object.
1 call to _xbbcode_build_filter()
File
- ./
xbbcode.inc, line 19 - General library of internal functions only called by this module.
Code
function _xbbcode_build_filter($filter, $format) {
$filters =& drupal_static(__FUNCTION__, array());
if (!isset($filters[$format->format])) {
$tags = _xbbcode_build_tags($format->format);
$filters[$format->format] = new XBBCodeFilter($tags, $filter, $format);
}
return $filters[$format->format];
}