]> git.mxchange.org Git - friendica.git/commitdiff
Updated theme-color code
authorPierre Rudloff <contact@rudloff.pro>
Mon, 17 Apr 2017 11:38:55 +0000 (13:38 +0200)
committerPierre Rudloff <contact@rudloff.pro>
Mon, 17 Apr 2017 11:38:55 +0000 (13:38 +0200)
Add comment explaining what the code does
Remove unused include
Code standards

view/theme/frio/php/default.php

index 89ee0bd2e0f87e0566068b084fc3603192417c12..c56f63d9e33fcba28ae2c4342d40616b9956472b 100644 (file)
                }
        ?>
        <?php
-               require_once("view/theme/frio/php/schema.php");
+               // Add the theme color meta
+               // It makes mobile Chrome UI match Frio's top bar color.
                $uid = $a->profile_uid;
                if (is_null($uid)) {
                        $uid = get_theme_uid();
                }
                $schema = get_pconfig($uid, 'frio', 'schema');
                if (($schema) && ($schema != '---')) {
-                       if(file_exists('view/theme/frio/schema/'.$schema.'.php')) {
+                       if (file_exists('view/theme/frio/schema/'.$schema.'.php')) {
                                $schemefile = 'view/theme/frio/schema/'.$schema.'.php';
                                require_once($schemefile);
                        }
                } else {
                        $nav_bg = get_pconfig($uid, 'frio', 'nav_bg');
                }
-               if(!$nav_bg) {
+               if (!$nav_bg) {
                        $nav_bg = "#708fa0";
                }
                echo '<meta name="theme-color" content="'.$nav_bg.'" />';