Difference between revisions of "MediaWiki:Common.css"

From Hablon
Jump to navigation Jump to search
Line 1: Line 1:
 
/* CSS placed here will be applied to all skins */
 
/* CSS placed here will be applied to all skins */
 +
$wgHooks['SkinTemplateSetupPageCss'][] = 'wfHideVariousTabsFromAnonymous';
 +
 +
function wfHideVariousTabsFromAnonymous( &$hidetabcss ) {
 +
global $wgUser;
 +
 +
if ( !$wgUser->isLoggedIn() ) {
 +
$hidetabcss .= 'li#ca-history, li#ca-viewsource, li#ca-edit, li#ca-talk, .vectorMenu { display: none; }';
 +
}
 +
 +
return true;
 +
}

Revision as of 07:36, 18 April 2021

/* CSS placed here will be applied to all skins */
$wgHooks['SkinTemplateSetupPageCss'][] = 'wfHideVariousTabsFromAnonymous';

function wfHideVariousTabsFromAnonymous( &$hidetabcss ) {
	global $wgUser;

	if ( !$wgUser->isLoggedIn() ) {
		$hidetabcss .= 'li#ca-history, li#ca-viewsource, li#ca-edit, li#ca-talk, .vectorMenu { display: none; }';
	}

	return true;
}