Samwilson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/97467


Change subject: New hook: OutputPageHtmlAttributes
......................................................................

New hook: OutputPageHtmlAttributes

Add a hook, modeled after OutputPageBodyAttributes which is in the same
OutputPage method, to add or modify attributes of the HTML element.
Will help with adding the manifest attribute in bug 45980, but other
things too.

Change-Id: I3fe05ecf8858d1daafb1e14a8dbcccb4bef7c700
---
M includes/OutputPage.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/67/97467/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 2c4c64e..66763e9 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2485,7 +2485,9 @@
                $userdir = $this->getLanguage()->getDir();
                $sitedir = $wgContLang->getDir();
 
-               $ret = Html::htmlHeader( array( 'lang' => 
$this->getLanguage()->getHtmlCode(), 'dir' => $userdir, 'class' => 
'client-nojs' ) );
+               $htmlAttrs = array( 'lang' => 
$this->getLanguage()->getHtmlCode(), 'dir' => $userdir, 'class' => 
'client-nojs' );
+               wfRunHooks( 'OutputPageHtmlAttributes', array( $this, $sk, 
&$htmlAttrs ) );
+               $ret = Html::htmlHeader( $htmlAttrs );
 
                if ( $this->getHTMLTitle() == '' ) {
                        $this->setHTMLTitle( $this->msg( 'pagetitle', 
$this->getPageTitle() ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/97467
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fe05ecf8858d1daafb1e14a8dbcccb4bef7c700
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Samwilson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to