I'm new to Mediawiki (MediaWiki 1.30.0, PHP 7.0.22, MySQL 5.7.21)
How can I remove talk tab in Vector skin for users how are not logged in?
- This seems to be old:
Manual:FAQ#How do I add.2Fremove tabs throughout my wiki.3F
- DynamicTabs is archived
- And, I saw this this post
but I do not know how to manage hooks, to apply it. I have to register the hook in LocalSettings.php,
$wgHooks['BeforePageDisplay'][] = 'wfHideVariousTabsFromAnonymous';
but where may a put the event handler?
function wfHideVariousTabsFromAnonymous( &$hidetabcss ) {
global $wgUser;
if ( !$wgUser->isLoggedIn() ) {
$hidetabcss .= 'li#ca-history, li#ca-viewsource, li#ca-edit, li#ca-talk, .vectorMen$
}
return true;
}
Any help please?