jenkins-bot has submitted this change and it was merged. Change subject: Add hook to allow template tweaks before rendering ......................................................................
Add hook to allow template tweaks before rendering Things like Zero want to override certain data keys. This allows them to e.g. public static function onMinervaPreRender( $template ) { $template->set( 'privacy', 'New privacy label' ); return true; } Change-Id: I89a89e9994b074d066e2a318aad0a160a634d7ae --- M includes/skins/MinervaTemplate.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Dr0ptp4kt: Verified; Looks good to me, approved awjrichards: Verified; Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/includes/skins/MinervaTemplate.php b/includes/skins/MinervaTemplate.php index 46ebb9a..3f85005 100644 --- a/includes/skins/MinervaTemplate.php +++ b/includes/skins/MinervaTemplate.php @@ -57,10 +57,12 @@ } $this->set( 'banners', $banners ); } + public function execute() { $this->prepareCommonData(); $this->prepareData(); $this->prepareBannerData(); + wfRunHooks( 'MinervaPreRender', array( $this ) ); $this->render( $this->data ); } -- To view, visit https://gerrit.wikimedia.org/r/64350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I89a89e9994b074d066e2a318aad0a160a634d7ae Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Dr0ptp4kt <ab...@wikimedia.org> Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com> Gerrit-Reviewer: awjrichards <aricha...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits