* (bug 22463) Add hook 'SkinGetPoweredBy' to make 'powered by' icon customizable
authorRaimond Spekking <raymond@users.mediawiki.org>
Wed, 10 Nov 2010 08:18:21 +0000 (08:18 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Wed, 10 Nov 2010 08:18:21 +0000 (08:18 +0000)
Patch by Yaron

RELEASE-NOTES
docs/hooks.txt
includes/Skin.php

index c68b843..7650126 100644 (file)
@@ -201,6 +201,7 @@ LocalSettings.php. The specific bugs are listed below in the general notes.
 * Special:Search: Add CSS classes to 'none found' and 'create link' messages
 * Add CSS classes (including namespace and pagename) to the enhanced recent
   changes/watchlist entries
+* (bug 22463) Add hook 'SkinGetPoweredBy' to make 'powered by' icon customizable
 
 === Bug fixes in 1.17 ===
 * (bug 17560) Half-broken deletion moved image files to deletion archive
index 652b90f..0bcf00d 100644 (file)
@@ -1461,6 +1461,9 @@ $type: 'normal' or 'history' for old/diff views
 &$link: overridable HTML link to be passed into the message as $1
 &$forContent: overridable flag if copyright footer is shown in content language. 
 
+'SkinGetPoweredBy'
+&$text: additional 'powered by' icons in HTML
+
 'SkinSubPageSubtitle': At the beginning of Skin::subPageSubtitle()
 &$subpages: Subpage links HTML
 $skin: Skin object
index cc1f2f5..542f384 100644 (file)
@@ -1550,9 +1550,11 @@ class Skin extends Linker {
                global $wgStylePath;
 
                $url = htmlspecialchars( "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" );
-               $img = '<a href="http://www.mediawiki.org/"><img src="' . $url . '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
+               $text = '<a href="http://www.mediawiki.org/"><img src="' . $url . '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
 
-               return $img;
+               wfRunHooks( 'SkinGetPoweredBy', array( &$text ) );
+
+               return $text;
        }
 
        function lastModified() {