public function generate_quote($text, array $attributes = array())
{
$quote = '[quote';
if (isset($attributes['author'])) {
// Add the author as the BBCode's default attribute
$quote .= '=' . $this->enquote($attributes['author']);
unset($attributes['author']);
}
foreach ($attributes as $name => $value) {
$quote .= ' ' . $name . '=' . $this->enquote($value);
}
$quote .= ']' . $text . '[/quote]';
return $quote;
}