public static function logo($Properties = array())
{
$Logo = c('Garden.Logo');
if ($Logo) {
// Only trim slash from relative paths.
if (!stringBeginsWith($Logo, '//')) {
$Logo = ltrim($Logo, '/');
}
// Fix the logo path.
if (stringBeginsWith($Logo, 'uploads/')) {
$Logo = substr($Logo, strlen('uploads/'));
}
// Set optional title text.
if (empty($Properties['title']) && c('Garden.LogoTitle')) {
$Properties['title'] = c('Garden.LogoTitle');
}
}
// Use the site title as alt if none was given.
$Title = c('Garden.Title', 'Title');
if (empty($Properties['alt'])) {
$Properties['alt'] = $Title;
}
echo $Logo ? Img(Gdn_Upload::url($Logo), $Properties) : $Title;
}