Added support for Preconnect

This commit is contained in:
alistair3149 2019-12-10 22:59:10 -05:00
parent 7ae34cb91c
commit b5ccf5d8b9
2 changed files with 11 additions and 0 deletions

View file

@ -27,6 +27,15 @@ class SkinCitizen extends SkinTemplate {
$out->addMeta( 'theme-color',
$this->getConfig()->get( 'CitizenThemeColor' )
);
// Preconnect origin
if ( $this->getConfig()->get( 'CitizenEnablePreconnect' ) ) {
$out->addLink(
[
'rel' => 'preconnect',
'href' => $this->getConfig()->get( 'CitizenPreconnectOrigin' )
]
);
}
// Generate manifest
if ( $this->getConfig()->get( 'CitizenEnableManifest' ) ) {
$out->addLink(

View file

@ -13,6 +13,8 @@
},
"config": {
"CitizenThemeColor": "#11151d",
"CitizenEnablePreconnect": true,
"CitizenPreconnectOrigin": "https://www.google-analytics.com",
"CitizenEnableManifest": true,
"CitizenManifestThemeColor": "#11151d",
"CitizenManifestBackgroundColor": "#fff"