mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-12 08:58:25 +00:00
Random link in main menu can be customised
Allow editors to define a different URL for random by editing /wiki/MediaWiki:Randompage-url e.g. Special:RandomRootpage Bug: T188697 Change-Id: I72bfbb9b02c99faa0c42c3212939f59b9b87149b
This commit is contained in:
parent
e10f8a8b16
commit
6a8853ad25
|
@ -139,10 +139,11 @@ final class Definitions {
|
|||
* @throws MWException
|
||||
*/
|
||||
public function insertRandomItem( Group $group ) {
|
||||
$page = $this->context->msg( 'randompage-url' )->escaped();
|
||||
// Random link
|
||||
$group->insert( 'random' )
|
||||
->addComponent( $this->context->msg( 'mobile-frontend-random-button' )->escaped(),
|
||||
SpecialPage::getTitleFor( 'Randompage' )->getLocalURL() . '#/random',
|
||||
Title::newFromText( $page )->getLocalURL() . '#/random',
|
||||
MinervaUI::iconClass( 'random', 'before' ), [
|
||||
'id' => 'randomButton',
|
||||
'data-event-name' => 'random',
|
||||
|
|
Loading…
Reference in a new issue