]> git.mxchange.org Git - friendica.git/blobdiff - src/App/Page.php
Merge pull request #9039 from MrPetovan/task/frio-accent-scheme
[friendica.git] / src / App / Page.php
index d3365a16c130d2b5d0453f8618447175e6f3ddab..c2bfb388788085ccbdbdc176f0a9db74bb32b447 100644 (file)
@@ -165,11 +165,10 @@ class Page implements ArrayAccess
         * The path can be absolute or relative to the Friendica installation base folder.
         *
         * @param string $path
-        *
+        * @param string $media
         * @see Page::initHead()
-        *
         */
-       public function registerStylesheet($path)
+       public function registerStylesheet($path, string $media = 'screen')
        {
                $path = Network::appendQueryParam($path, ['v' => FRIENDICA_VERSION]);
 
@@ -177,7 +176,7 @@ class Page implements ArrayAccess
                        $path = mb_substr($path, mb_strlen($this->basePath . DIRECTORY_SEPARATOR));
                }
 
-               $this->stylesheets[] = trim($path, '/');
+               $this->stylesheets[trim($path, '/')] = $media;
        }
 
        /**
@@ -252,7 +251,7 @@ class Page implements ArrayAccess
                        '$shortcut_icon'   => $shortcut_icon,
                        '$touch_icon'      => $touch_icon,
                        '$block_public'    => intval($config->get('system', 'block_public')),
-                       '$stylesheets'     => array_unique($this->stylesheets),
+                       '$stylesheets'     => $this->stylesheets,
                ]) . $this->page['htmlhead'];
        }