mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding shortcut icon generating to HtmlHelper::meta()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4324 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
bd67cfc0db
commit
cb2952d60b
1 changed files with 7 additions and 2 deletions
|
@ -185,7 +185,12 @@ class HtmlHelper extends AppHelper {
|
|||
* @return string
|
||||
*/
|
||||
function meta($title = null, $url = null, $attributes = array(), $inline = true) {
|
||||
$types = array('html' => 'text/html', 'rss' => 'application/rss+xml', 'atom' => 'application/atom+xml');
|
||||
$types = array(
|
||||
'html' => 'text/html',
|
||||
'rss' => 'application/rss+xml',
|
||||
'atom' => 'application/atom+xml',
|
||||
'icon' => 'image/x-icon'
|
||||
);
|
||||
|
||||
if (!isset($attributes['type']) && is_array($url) && isset($url['ext'])) {
|
||||
if (in_array($url['ext'], array_keys($types))) {
|
||||
|
@ -193,7 +198,7 @@ class HtmlHelper extends AppHelper {
|
|||
} else {
|
||||
$attributes['type'] = 'rss';
|
||||
}
|
||||
} else {
|
||||
} elseif (!isset($attributes['type'])) {
|
||||
$attributes['type'] = 'rss';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue