diff options
author | Brian Evans <grknight@gentoo.org> | 2021-11-17 09:29:33 -0500 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2021-11-17 09:29:33 -0500 |
commit | 77aee18277b221d0030e95d8823a53ad93794869 (patch) | |
tree | 570fa4def18ed45d4273b784e23094d83e80218b | |
parent | Remove deprecated function call to setupSkinUserCss (diff) | |
download | skin-tyrian-77aee18277b221d0030e95d8823a53ad93794869.tar.gz skin-tyrian-77aee18277b221d0030e95d8823a53ad93794869.tar.bz2 skin-tyrian-77aee18277b221d0030e95d8823a53ad93794869.zip |
Change toolbox to keep what we expect
getToolbox and the hooks are deprecated and set to be removed
Signed-off-by: Brian Evans <grknight@gentoo.org>
-rw-r--r-- | TyrianTemplate.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/TyrianTemplate.php b/TyrianTemplate.php index 30f9f11..c889284 100644 --- a/TyrianTemplate.php +++ b/TyrianTemplate.php @@ -305,12 +305,18 @@ class TyrianTemplate extends BaseTemplate { <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-cog"></i> <?php $this->msg( 'toolbox' ) ?> <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <?php - foreach ( $this->getToolbox() as $key => $tbitem) { + $toolbox = $this->getSkin()->makeToolbox( + $this->data['nav_urls'], + $this->data['feeds'] + ); + + // Merge content that might be added to the toolbox section by hook + if ( isset( $this->data['sidebar']['TOOLBOX'] ) ) { + $toolbox = array_merge( $toolbox, $this->data['sidebar']['TOOLBOX'] ?? [] ); + } + foreach ( $toolbox as $key => $tbitem) { echo $this->makeListItem( $key, $tbitem ); } - - Hooks::Run( 'MonoBookTemplateToolboxEnd', [&$this] ); - Hooks::Run( 'SkinTemplateToolboxEnd', [ &$this, true ] ); ?> </ul> </li> |