Added SkinAfterBottomScripts hook to Skin::bottomScripts(), documented in hooks.txt
authorTim Laqua <tlaqua@users.mediawiki.org>
Thu, 23 Aug 2007 22:34:12 +0000 (22:34 +0000)
committerTim Laqua <tlaqua@users.mediawiki.org>
Thu, 23 Aug 2007 22:34:12 +0000 (22:34 +0000)
docs/hooks.txt
includes/Skin.php

index b46541e..0b846f3 100644 (file)
@@ -612,6 +612,11 @@ or change the value of $siteNotice and return false to alter it.
 &$siteNotice: HTML sitenotice
 Alter the contents of $siteNotice to add to/alter the sitenotice/anonnotice.
 
+'SkinAfterBottomScripts': At the end of Skin::bottomScripts()
+$skin: Skin object
+&$text: bottomScripts Text
+Append to $text to add additional text/scripts after the stock bottom scripts.
+
 'SkinTemplateOutputPageBeforeExec': Before SkinTemplate::outputPage() starts page output
 &$sktemplate: SkinTemplate object
 &$tpl: Template engine object
index 21b60ec..f9e1705 100644 (file)
@@ -708,7 +708,9 @@ END;
         */
        function bottomScripts() {
                global $wgJsMimeType;
-               return "\n\t\t<script type=\"$wgJsMimeType\">if (window.runOnloadHook) runOnloadHook();</script>\n";
+               $bottomScriptText = "\n\t\t<script type=\"$wgJsMimeType\">if (window.runOnloadHook) runOnloadHook();</script>\n";
+               wfRunHooks( 'SkinAfterBottomScripts', array( $this, &$bottomScriptText ) );
+               return $bottomScriptText;
        }
 
        /** @return string Retrievied from HTML text */