From 46d5b7d5a1a081273f4130c1cbc0db45ad3cbe88 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Sun, 15 Jul 2018 10:26:05 +0100 Subject: Administration theme --- themes/_custom/theme.php | 77 ------------------------------------------------ 1 file changed, 77 deletions(-) delete mode 100644 themes/_custom/theme.php (limited to 'themes/_custom/theme.php') diff --git a/themes/_custom/theme.php b/themes/_custom/theme.php deleted file mode 100644 index 98cda54034..0000000000 --- a/themes/_custom/theme.php +++ /dev/null @@ -1,77 +0,0 @@ -. - */ -use Fisharebest\Webtrees\Menu; -use Fisharebest\Webtrees\Theme\WebtreesTheme; - -/** - * Class MyTheme - This is a template showing how to create a custom theme. - * - * Since theme folders beginning with an underscore are reserved for special - * use, you should copy this entire folder ("themes/_custom") to a new name. - * For example, "themes/mytheme". You should also rename the class. - * - * In this example, we are extending the webtrees theme, but you could - * also extend any of the core themes, or even the base theme. - */ -class MyTheme extends WebtreesTheme { - // The ID (and folder) for your theme. - const THEME_DIR = '_custom'; - - /** - * Give your theme a name. This is shown to the users. - * Use HTML entities where appropriate. e.g. “Black & white”. - */ - public function themeName() { - return 'Custom theme'; - } - - /** - * This is an example function which shows how to add an additional CSS file to the theme. - * - * @return string[] - */ - public function stylesheets() { - return array_merge(parent::stylesheets(), [ - // Put a version number in the URL, for efficient browser caching. - WT_BASE_URL . 'themes/' . self::THEME_DIR . '/css-1.0.0/style.css', - ]); - } - - /** - * This is an example function which shows one way to remove an entry from a menu. - * - * @param string $surname The significant surname for the page. - * - * {@inheritdoc} - */ - public function 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; - } -} - -return new MyTheme; // This script must return a theme object. - -- cgit v1.3