public function run()
 {
     $string_settings = $this->sitepress->get_setting('st', array());
     if (!isset($string_settings['sw']) || $this->pagenow === 'admin.php' && strpos($this->get_page, 'theme-localization.php') !== false) {
         $string_settings['sw'] = isset($string_settings['sw']) ? $string_settings['sw'] : array();
         $this->sitepress->set_setting('st', $string_settings, true);
         $this->st_instance->initialize_wp_and_widget_strings();
         $this->st_instance->scan_theme_for_strings(true);
     }
 }
 public function run()
 {
     $string_settings = $this->sitepress->get_setting('st', array());
     if (!isset($string_settings['sw']) || $this->pagenow === 'admin.php' && strpos($this->get_page, 'theme-localization.php') !== false) {
         $string_settings['sw'] = isset($string_settings['sw']) ? $string_settings['sw'] : array();
         $this->sitepress->set_setting('st', $string_settings, true);
         $this->st_instance->initialize_wp_and_widget_strings();
         if (1 === $this->sitepress->get_setting('theme_localization_type', null) && true !== $this->sitepress->get_wp_api()->constant('WPML_DISABLE_AUTOMATIC_THEME_SCANNING')) {
             $this->st_instance->scan_theme_for_strings(true);
         }
     }
 }