SPWeb.HideSiteContentsLink property
SharePoint 2013
Controls the appearance of the “site contents” link in the gear icon (the menu known as "Site Actions" in SharePoint 2010) of the UX control.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)