original_string: public static function set_theme() {
  
  		$stylesheet = filter_input( INPUT_GET, 'theme' );
  		$theme      = wp_get_theme( $stylesheet );
  
  		if ( $theme->exists() && $theme->is_allowed() ) {
  			setcookie( self::get_cookie_name(), $theme->get_stylesheet(), strtotime( '+1 year' ), COOKIEPATH );
  		}
  
  		wp_safe_redirect( wp_get_referer() );
  		die;
  	}
code: public static function set_theme() {
  
  		$stylesheet = filter_input( INPUT_GET, 'theme' );
  		$theme      = wp_get_theme( $stylesheet );
  
  		if ( $theme->exists() && $theme->is_allowed() ) {
  			setcookie( self::get_cookie_name(), $theme->get_stylesheet(), strtotime( '+1 year' ), COOKIEPATH );
  		}
  
  		wp_safe_redirect( wp_get_referer() );
  		die;
  	}
code_tokens: public static function set_theme ( ) { $ stylesheet = filter_input ( INPUT_GET , 'theme' ) ; $ theme = wp_get_theme ( $ stylesheet ) ; if ( $ theme -> exists ( ) && $ theme -> is_allowed ( ) ) { setcookie ( self :: get_cookie_name ( ) , $ theme -> get_stylesheet ( ) , strtotime ( '+1 year' ) , COOKIEPATH ) ; } wp_safe_redirect ( wp_get_referer ( ) ) ; die ; }
docstring: Saves selected theme in cookie if valid.
docstring_tokens: Saves selected theme in cookie if valid .