original_string: public function should_show_for_user() {
          if (!$this->is_enabled()) {
              // The tour is disabled - it should not be shown.
              return false;
          }
  
          if ($tourcompletiondate = get_user_preferences(self::TOUR_LAST_COMPLETED_BY_USER . $this->get_id(), null)) {
              if ($tourresetdate = get_user_preferences(self::TOUR_REQUESTED_BY_USER . $this->get_id(), null)) {
                  if ($tourresetdate >= $tourcompletiondate) {
                      return true;
                  }
              }
              $lastmajorupdate = $this->get_config('majorupdatetime', time());
              if ($tourcompletiondate > $lastmajorupdate) {
                  // The user has completed the tour since the last major update.
                  return false;
              }
          }
  
          return true;
      }
code: public function should_show_for_user() {
          if (!$this->is_enabled()) {
              // The tour is disabled - it should not be shown.
              return false;
          }
  
          if ($tourcompletiondate = get_user_preferences(self::TOUR_LAST_COMPLETED_BY_USER . $this->get_id(), null)) {
              if ($tourresetdate = get_user_preferences(self::TOUR_REQUESTED_BY_USER . $this->get_id(), null)) {
                  if ($tourresetdate >= $tourcompletiondate) {
                      return true;
                  }
              }
              $lastmajorupdate = $this->get_config('majorupdatetime', time());
              if ($tourcompletiondate > $lastmajorupdate) {
                  // The user has completed the tour since the last major update.
                  return false;
              }
          }
  
          return true;
      }
code_tokens: public function should_show_for_user ( ) { if ( ! $ this -> is_enabled ( ) ) { // The tour is disabled - it should not be shown. return false ; } if ( $ tourcompletiondate = get_user_preferences ( self :: TOUR_LAST_COMPLETED_BY_USER . $ this -> get_id ( ) , null ) ) { if ( $ tourresetdate = get_user_preferences ( self :: TOUR_REQUESTED_BY_USER . $ this -> get_id ( ) , null ) ) { if ( $ tourresetdate >= $ tourcompletiondate ) { return true ; } } $ lastmajorupdate = $ this -> get_config ( 'majorupdatetime' , time ( ) ) ; if ( $ tourcompletiondate > $ lastmajorupdate ) { // The user has completed the tour since the last major update. return false ; } } return true ; }
docstring: Whether this tour should be displayed to the user.
  
  @return  boolean
docstring_tokens: Whether this tour should be displayed to the user .