Merge "New VectorAfterToolbox and VectorBeforeFooter hooks"

This commit is contained in:
jenkins-bot 2017-11-17 21:16:26 +00:00 committed by Gerrit Code Review
commit 56e314ca0c
2 changed files with 13 additions and 0 deletions

View File

@ -169,6 +169,7 @@ class VectorTemplate extends BaseTemplate {
<?php $this->renderPortals( $this->data['sidebar'] ); ?>
</div>
</div>
<?php Hooks::run( 'VectorBeforeFooter' ); ?>
<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
<?php
foreach ( $this->getFooterLinks() as $category => $links ) {
@ -245,6 +246,7 @@ class VectorTemplate extends BaseTemplate {
break;
case 'TOOLBOX':
$this->renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' );
Hooks::run( 'VectorAfterToolbox' );
break;
case 'LANGUAGES':
if ( $this->data['language_urls'] !== false ) {

View File

@ -4,3 +4,14 @@ Hooks provided by the Vector skin.
loaded by the Vector skin.
$skin: SkinVector object
&$styles: Array of module names whose style will be loaded for the skin
'VectorAfterToolbox': Called after rendering the toolbox portlet (div#p-tb).
You can use this to inject items (such as ads or a hit counter, for example)
from an extension.
This is the Vector couterpart to the MonoBookAfterToolbox hook in the MonoBook
skin.
'VectorBeforeFooter': Called before the footer (div#footer) is output, but after
div#mw-navigation has been closed.
You can use this to inject items (such as ads or a hit counter, for example)
from an extension.