* for the icon, the following keys are used:
* - src: An absolute url to the image to use for the icon, this is recommended
* but not required, however some skins will ignore icons without an image
+ * - srcset: optional additional-resolution images; see HTML5 specs
* - url: The url to use in the a element around the text or icon, if not set an a element will
* not be outputted
* - alt: This is the text form of the icon, it will be displayed without an image in
),
"poweredby" => array(
"mediawiki" => array(
- "src" => null, // Defaults to "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png"
+ "src" => null, // Defaults to "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png" plus srcset for 1.5x, 2x
"url" => "//www.mediawiki.org/",
"alt" => "Powered by MediaWiki",
)
) {
$wgFooterIcons['poweredby']['mediawiki']['src'] =
"$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png";
+ $wgFooterIcons['poweredby']['mediawiki']['srcset'] =
+ "$wgResourceBasePath/resources/assets/poweredby_mediawiki_132x47.png 1.5x, " .
+ "$wgResourceBasePath/resources/assets/poweredby_mediawiki_176x62.png 2x";
}
/**
function getPoweredBy() {
global $wgResourceBasePath;
- $url = htmlspecialchars( "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png" );
- $text = '<a href="//www.mediawiki.org/"><img src="' . $url
- . '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
+ $url1 = htmlspecialchars( "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png" );
+ $url1_5 = htmlspecialchars( "$wgResourceBasePath/resources/assets/poweredby_mediawiki_132x47.png" );
+ $url2 = htmlspecialchars( "$wgResourceBasePath/resources/assets/poweredby_mediawiki_176x62.png" );
+ $text = '<a href="//www.mediawiki.org/"><img src="' . $url1
+ . '" srcset="' . $url1_5 . ' 1.5x, ' . $url2 . ' 2x" '
+ . 'height="31" width="88" alt="Powered by MediaWiki" /></a>';
Hooks::run( 'SkinGetPoweredBy', array( &$text, $this ) );
return $text;
}