A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Special:MyLanguage/Skin:Minerva_Neue/MobileMenu below:

Skin:Minerva Neue/Hooks/MobileMenu - MediaWiki

This page is

outdated

.

It was written for an older version of MediaWiki and may not apply to the most recent version. If you have checked or updated this page and found the content to be suitable, please remove this notice. See the

talk page

for a possible discussion on this.

MobileMenu Available from version master (Gerrit change 260948)
Allows other extensions to add or override items of the mobile menu (hamburger menu) and some other toolbars.
Define function:
public static function onMobileMenu( $name, \MediaWiki\Minerva\Menu\Group &$group ) { ... }
Attach hook:
$wgHooks['MobileMenu'][] = 'MyExtensionHooks::onMobileMenu';
Called from: File(s): Minerva Neue /

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:MobileMenu extensions.

Allows other extensions to add or override items of the mobile menu (hamburger menu).

Add this to LocalSettings.php to add a link to the file upload page at the bottom of the contribution tools section of the mobile menu:

// adds upload menu item with upload icon to discovery menu.
$wgHooks['MobileMenu'][] = function ( $name, \MediaWiki\Minerva\Menu\Group &$group ) {
    if ( $name !== 'discovery' ) {
            $group->insert( 'upload' )
			->addComponent(
                    'mobile-frontend-upload-button',
                    SpecialPage::getTitleFor( 'Upload' )->getLocalUrl() . '#/upload',
                    MobileUI::iconClass( 'mf-upload-invert', 'before' ),
	                [
                        'id' => 'uploadButton',
                        'data-event-name' => 'upload',
                    ]   
			);
	}
};

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4