X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp.php;h=7622a1a0ce3aacb5e2795fbdd6b9c1e7b572e78e;hb=4528d8748c76cf4257ae2c29bd2d7b13f8395922;hp=08cf382b5467f2e3131e32d40802b18eee3a4e50;hpb=66a103e36a42ab251fd9ca6c4b56b54380e4d535;p=friendica.git diff --git a/src/App.php b/src/App.php index 08cf382b54..7622a1a0ce 100644 --- a/src/App.php +++ b/src/App.php @@ -4,16 +4,13 @@ */ namespace Friendica; +use Detection\MobileDetect; +use Exception; use Friendica\Core\Config; use Friendica\Core\L10n; use Friendica\Core\PConfig; use Friendica\Core\System; -use Friendica\Database\DBM; -use dba; - -use Detection\MobileDetect; - -use Exception; +use Friendica\Database\DBA; require_once 'boot.php'; require_once 'include/dba.php'; @@ -99,6 +96,41 @@ class App public $force_max_items = 0; public $theme_events_in_profile = true; + public $stylesheets = []; + public $footerScripts = []; + + /** + * Register a stylesheet file path to be included in the tag of every page. + * Inclusion is done in App->initHead(). + * The path can be absolute or relative to the Friendica installation base folder. + * + * @see App->initHead() + * + * @param string $path + */ + public function registerStylesheet($path) + { + $url = str_replace($this->get_basepath() . DIRECTORY_SEPARATOR, '', $path); + + $this->stylesheets[] = trim($url, '/'); + } + + /** + * Register a javascript file path to be included in the