diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-11-13 18:38:32 +0000 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-11-13 18:38:32 +0000 |
| commit | 394d606fe977a331f733c62e5509469c2eb3ef31 (patch) | |
| tree | 27832a131eafec209a8de1361c35c69baa45231f /index.php | |
| parent | 6273e26ea463e2762f2d736455f4912de7171cfa (diff) | |
| parent | 859ce4d7f69a46716a10eacc485ffaf9867a76d4 (diff) | |
Merge branch 'feature/phpstan-2.0.x' into 'master'
PHPStan 2.0.x
See merge request tt-rss/tt-rss!74
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -36,8 +36,9 @@ <style type="text/css"> <?php foreach (PluginHost::getInstance()->get_plugins() as $p) { - if (method_exists($p, "get_css")) { - echo $p->get_css(); + $css = $p->get_css(); + if ($css) { + echo $css; } } ?> @@ -73,16 +74,14 @@ <script type="text/javascript"> <?php foreach (PluginHost::getInstance()->get_plugins() as $n => $p) { - if (method_exists($p, "get_js")) { - $script = $p->get_js(); - - if ($script) { - echo "try { - $script - } catch (e) { - console.warn('failed to initialize plugin JS: $n', e); - }"; - } + $script = $p->get_js(); + + if ($script) { + echo "try { + $script + } catch (e) { + console.warn('failed to initialize plugin JS: $n', e); + }"; } } ?> |