Thread:Project:Support desk/How to hide "View History" button for unlogged users?/reply (18)

Try using the BeforePageDisplay hook instead of editing the skin file.

Try this (haven't tested) in LocalSettings.php: public static function efAddSkinStylesAnon( OutputPage &$out, Skin &$skin ) { if( !$wgUser->isLoggedIn ) { // Hide history tab if ( $skin->getSkinName == 'vector' ) { $out->addInlineStyle( '#ca-history { display:none; }' ); }	}	return true; }

$wgHooks['BeforePageDisplay'][] = 'efAddSkinStylesAnon';