From: Bernhard Posselt Date: Sat, 6 Sep 2014 12:25:28 +0000 (+0200) Subject: add shortcut functions for style and script X-Git-Tag: v7.0.3alpha1~105 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ca121d8438ea0eba6ecf3e3c47c4616d834e787c;p=nextcloud-server.git add shortcut functions for style and script --- diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php index 46e48274001..e4af4aa4e1a 100644 --- a/lib/private/template/functions.php +++ b/lib/private/template/functions.php @@ -23,6 +23,24 @@ function print_unescaped($string) { print($string); } +/** + * Shortcut for adding scripts to a page + * @param string $app the appname + * @param string $file the filename + */ +function script($app, $file) { + OC_Util::addScript($app, $file); +} + +/** + * Shortcut for adding styles to a page + * @param string $app the appname + * @param string $file the filename + */ +function style($app, $file) { + OC_Util::addStyle($app, $file); +} + /** * make OC_Helper::linkTo available as a simple function * @param string $app app