Say I have a >=1.35.0 MediaWiki website with the Timeless responsive skin.
I desire to add a link to the default footer menu of that site, programatically, by PHP (most probably with a hook);
I desire to do so without an installed extension and not via frontend.
This in LocalSettings.php didn't help and causes the site to crash:
public static function onSkinAddFooterLinks( Skin $skin, string $key, array &$footerlinks ) { if ( $key === 'places' ) { $footerlinks['test'] = '<A href=#>Test Link</a>'; } }
Error:
Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting end of file in /PATH/LocalSettings.php on line 137
How to add a default footer link in MediaWiki >=1.35.0?