applications/dashboard/controllers/class.profilecontroller.php
public function NoMobile($Unset = 0) {
      if ($Unset == 1) {
         // Allow mobile again
         Gdn_CookieIdentity::DeleteCookie('VanillaNoMobile');
      }
      else {
         // Set 48-hour "no mobile" cookie
         $Expiration = time() + 172800;
         $Expire = 0;
         $UserID = ((Gdn::Session()->IsValid()) ? Gdn::Session()->UserID : 0);
         $KeyData = $UserID."-{$Expiration}";
         Gdn_CookieIdentity::SetCookie('VanillaNoMobile', $KeyData, array($UserID, $Expiration, 'force'), $Expire);
      }
      
      Redirect("/", 302);
   }
public function NoMobile($Unset = 0) {
      if ($Unset == 1) {
         // Allow mobile again
         Gdn_CookieIdentity::DeleteCookie('VanillaNoMobile');
      }
      else {
         // Set 48-hour "no mobile" cookie
         $Expiration = time() + 172800;
         $Expire = 0;
         $UserID = ((Gdn::Session()->IsValid()) ? Gdn::Session()->UserID : 0);
         $KeyData = $UserID."-{$Expiration}";
         Gdn_CookieIdentity::SetCookie('VanillaNoMobile', $KeyData, array($UserID, $Expiration, 'force'), $Expire);
      }
      
      Redirect("/", 302);
   }
public function NoMobile ( $ Unset = 0 ) { if ( $ Unset == 1 ) { // Allow mobile again Gdn_CookieIdentity :: DeleteCookie ( 'VanillaNoMobile' ) ; } else { // Set 48-hour "no mobile" cookie $ Expiration = time ( ) + 172800 ; $ Expire = 0 ; $ UserID = ( ( Gdn :: Session ( ) -> IsValid ( ) ) ? Gdn :: Session ( ) -> UserID : 0 ) ; $ KeyData = $ UserID . "-{$Expiration}" ; Gdn_CookieIdentity :: SetCookie ( 'VanillaNoMobile' , $ KeyData , array ( $ UserID , $ Expiration , 'force' ) , $ Expire ) ; } Redirect ( "/" , 302 ) ; }
Set 'NoMobile' cookie for current user to prevent use of mobile theme.

@since 2.0.?
@access public
Set NoMobile cookie for current user to prevent use of mobile theme .