/**
  * Plugin upgrader
  */
 protected function _upgrade()
 {
     $options = new SBTT_Options();
     $options->initOptions();
     $defaults = $options->defaultOptions();
     $key = $options->optionsKey();
     $wp_option = get_option($key, array());
     // v1.1 adds a few new options to the settings menu, init the default values.
     if (isset($wp_option['version']) && $wp_option['version'] < 1.1 || !isset($wp_option['version'])) {
         $wp_option['version'] = $options->getVersion();
         if (!isset($wp_option['min_resolution'])) {
             $wp_option['min_resolution'] = isset($defaults['min_resolution']) ? $defaults['min_resolution'] : 0;
         }
         if (!isset($wp_option['max_resolution'])) {
             $wp_option['max_resolution'] = isset($defaults['max_resolution']) ? $defaults['max_resolution'] : 9999;
         }
         if (!isset($wp_option['visibility_duration'])) {
             $wp_option['visibility_duration'] = isset($defaults['visibility_duration']) ? $defaults['visibility_duration'] : 0;
         }
         if (!isset($wp_option['color_foreground_hover']) && isset($wp_option['color_foreground'])) {
             $wp_option['color_foreground_hover'] = $wp_option['color_foreground'];
         } elseif (!isset($wp_option['color_foreground_hover'])) {
             $wp_option['color_foreground_hover'] = isset($defaults['color_foreground_hover']) ? $defaults['color_foreground_hover'] : '#eeeeee';
         }
         update_option($key, $wp_option);
     }
 }
 /**
  * Get options
  *
  * @return array
  */
 protected function _getScrollButtonArgs()
 {
     return get_option($this->options->optionsKey());
 }