summaryrefslogtreecommitdiff
path: root/themes/_custom
diff options
context:
space:
mode:
Diffstat (limited to 'themes/_custom')
-rw-r--r--themes/_custom/theme.php33
1 files changed, 11 insertions, 22 deletions
diff --git a/themes/_custom/theme.php b/themes/_custom/theme.php
index 6e2d9e0410..aa6f289576 100644
--- a/themes/_custom/theme.php
+++ b/themes/_custom/theme.php
@@ -61,14 +61,9 @@ class MyTheme extends WebtreesTheme {
* {@inheritdoc}
*/
public function stylesheets() {
- try {
- $css_files = parent::stylesheets();
- // Put a version number in the URL, to prevent browsers from caching old versions.
- $css_files[] = WT_BASE_URL . 'themes/custom/custom.css';
- } catch (\Exception $ex) {
- // Something went wrong with our script? Use the default behaviour instead.
- return parent::stylesheets();
- }
+ $css_files = parent::stylesheets();
+ // Put a version number in the URL, to prevent browsers from caching old versions.
+ $css_files[] = WT_BASE_URL . 'themes/_custom/custom-v1.0.css';
return $css_files;
}
@@ -81,20 +76,14 @@ class MyTheme extends WebtreesTheme {
* {@inheritdoc}
*/
public function menuLists($surname) {
- try {
- // Start with the default "Lists" menu.
- $menu = parent::menuLists($surname);
- // Remove the "notes" sub-menu.
- $submenus = array_filter($menu->getSubmenus(), function (Menu $menu) {
- return $menu->getClass() !== 'menu-list-note';
- });
- // Replace the sub-menus
- $menu->setSubmenus($submenus);
- } catch (\Exception $ex) {
- // Something went wrong with our script? Maybe the core code was updated?
- // Use the default behaviour instead, so that our theme continues to work.
- return parent::menuLists($surname);
- }
+ // Start with the default "Lists" menu.
+ $menu = parent::menuLists($surname);
+ // Remove the "notes" sub-menu.
+ $submenus = array_filter($menu->getSubmenus(), function (Menu $menu) {
+ return $menu->getClass() !== 'menu-list-note';
+ });
+ // Replace the sub-menus
+ $menu->setSubmenus($submenus);
return $menu;
}