Skip to content

Commit

Permalink
Remove VectorBeforeFooter hook
Browse files Browse the repository at this point in the history
Bug: T255214
Change-Id: Iac66823119c7279f5e922b0e258602dd6c4ca5c4
  • Loading branch information
Ammarpad authored and jdlrobson committed Jul 30, 2020
1 parent 2c74f08 commit a7c983a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
12 changes: 1 addition & 11 deletions includes/SkinVector.php
Expand Up @@ -233,17 +233,7 @@ private function getFooterData() : array {
}
}

ob_start();
Hooks::run( 'VectorBeforeFooter', [], '1.35' );
$htmlHookVectorBeforeFooter = ob_get_contents();
ob_end_clean();

$data = [
'html-hook-vector-before-footer' => $htmlHookVectorBeforeFooter,
'array-footer-rows' => $footerRows,
];

return $data;
return [ 'array-footer-rows' => $footerRows ];
}

/**
Expand Down
2 changes: 0 additions & 2 deletions includes/templates/Footer.mustache
Expand Up @@ -9,11 +9,9 @@
@prop string id of list element
@prop footerItem[] array-items
string html-hook-vector-before-footer output of VectorBeforeFooter hook
string|null html-user-language-attributes a string of attribute HTML
footerRow[] array-footer-rows iterable list of footer rows
}}
{{{html-hook-vector-before-footer}}}
{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles and
to mitigate a VoiceOver bug. }}
<footer id="footer" class="mw-footer" role="contentinfo" {{{html-user-language-attributes}}}>
Expand Down
3 changes: 1 addition & 2 deletions stories/Footer.stories.data.js
@@ -1,6 +1,6 @@
/* eslint-disable quotes */

import { htmlUserLanguageAttributes, placeholder } from './utils';
import { htmlUserLanguageAttributes } from './utils';
import footerTemplate from '!!raw-loader!../includes/templates/Footer.mustache';

const FOOTER_ROWS = [
Expand Down Expand Up @@ -75,6 +75,5 @@ export { footerTemplate };

export const FOOTER_TEMPLATE_DATA = {
'html-user-language-attributes': htmlUserLanguageAttributes,
'html-hook-vector-before-footer': placeholder( 'output of VectorBeforeFooter hook (deprecated 1.35)', 20 ),
'array-footer-rows': FOOTER_ROWS
};
1 change: 0 additions & 1 deletion stories/skin.stories.data.js
Expand Up @@ -102,7 +102,6 @@ export const LEGACY_TEMPLATE_DATA = {
'html-categories': placeholder( 'Category links component from mediawiki core', 50 ),

// extension dependent..
'html-hook-vector-before-footer': placeholder( 'VectorBeforeFooter hook output', 100 ),
'html-after-content': placeholder( 'Extensions can add here e.g. Related Articles.', 100 ),
'array-indicators': DATA_INDICATORS,
'html-subtitle': placeholder( 'Extensions can configure subtitle', 20 )
Expand Down

0 comments on commit a7c983a

Please sign in to comment.