summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2024-11-13 18:38:32 +0000
committerAndrew Dolgov <fox@fakecake.org>2024-11-13 18:38:32 +0000
commit394d606fe977a331f733c62e5509469c2eb3ef31 (patch)
tree27832a131eafec209a8de1361c35c69baa45231f /index.php
parent6273e26ea463e2762f2d736455f4912de7171cfa (diff)
parent859ce4d7f69a46716a10eacc485ffaf9867a76d4 (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.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/index.php b/index.php
index a2a6d2373..ac37043cd 100644
--- a/index.php
+++ b/index.php
@@ -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);
+ }";
}
}
?>