Add `apple-touch-icon.png` support; favicons for the iPhone OS.

This commit is contained in:
Meitar Moscovitz 2009-03-16 18:03:58 -04:00
parent 85d61475aa
commit 91b0fb8028
2 changed files with 10 additions and 0 deletions

BIN
apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -162,6 +162,16 @@ class Action extends HTMLOutputter // lawsuit
$this->element('link', array('rel' => 'shortcut icon',
'href' => common_path('favicon.ico')));
}
if (common_config('site', 'mobile')) {
if (is_readable(INSTALLDIR . '/theme/' . common_config('site', 'theme') . '/apple-touch-icon.png')) {
$this->element('link', array('rel' => 'apple-touch-icon',
'href' => theme_path('apple-touch-icon.png')));
} else {
$this->element('link', array('rel' => 'apple-touch-icon',
'href' => common_path('apple-touch-icon.png')));
}
}
}
/**