Skip to content

Commit

Permalink
Fix broken css/js files on individual shaare pages
Browse files Browse the repository at this point in the history
  • Loading branch information
immanuelfodor authored Sep 6, 2020
1 parent 7a3c69e commit eff52e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions related/related.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function hook_related_render_includes($data)
// Note that you just need to specify CSS path.
global $routerClass;
if ($data['_PAGE_'] == $routerClass::$PAGE_LINKLIST) {
$data['css_files'][] = PluginManager::$PLUGINS_PATH . '/related/related.css';
$data['css_files'][] = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH . '/related/related.css';
}

return $data;
Expand Down Expand Up @@ -248,7 +248,7 @@ function hook_related_render_footer($data)
// Note that you just need to specify CSS path.
global $routerClass;
if ($data['_PAGE_'] == $routerClass::$PAGE_LINKLIST) {
$data['js_files'][] = PluginManager::$PLUGINS_PATH . '/related/related.js';
$data['js_files'][] = ($data['_BASE_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH . '/related/related.js';
}

return $data;
Expand Down

0 comments on commit eff52e2

Please sign in to comment.