Self Closing Tags

Self Closing Tags are discourages according to W3C. Validation shows warning but it's better to not have them. Same is for  <br>
This commit is contained in:
Suleman 2022-09-28 00:52:06 +05:30 committed by GitHub
parent 55d3b162bf
commit 92600d9070
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,10 +4,10 @@ class pluginCanonical extends Plugin {
public function siteHead() {
if ($GLOBALS['WHERE_AM_I'] === 'home') {
return '<link rel="canonical" href="'.DOMAIN_BASE.'"/>'.PHP_EOL;
return '<link rel="canonical" href="'.DOMAIN_BASE.'">'.PHP_EOL;
} elseif ($GLOBALS['WHERE_AM_I'] === 'page') {
global $page;
return '<link rel="canonical" href="'.$page->permalink().'"/>'.PHP_EOL;
return '<link rel="canonical" href="'.$page->permalink().'">'.PHP_EOL;
}
}
}
}