public function finish_step1($initial_language_code) { $this->set_initial_default_category($initial_language_code); $this->prepopulate_translations($initial_language_code); icl_set_setting('existing_content_language_verified', 1); icl_set_setting('default_language', $initial_language_code); icl_set_setting('admin_default_language', $initial_language_code); $this->maybe_set_locale($initial_language_code); icl_set_setting('setup_wizard_step', 2); icl_save_settings(); $this->refresh_active_lang_cache($initial_language_code); do_action('icl_initial_language_set'); }
$output .= '<a href="' . $url . '">' . $title . '</a></li>'; } $output .= '</ul>'; echo '1|' . $output; } else { echo '0|'; } } break; case 'icl_show_sidebar': icl_set_setting('icl_sidebar_minimized', $_POST['state'] == 'hide' ? 1 : 0); icl_save_settings(); break; case 'icl_promote_form': icl_set_setting('promote_wpml', @intval($_POST['icl_promote'])); icl_save_settings(); echo '1|'; break; case 'save_translator_note': update_post_meta($_POST['post_id'], '_icl_translator_note', $_POST['note']); break; case 'icl_st_track_strings': foreach ($_POST['icl_st'] as $k => $v) { $iclsettings['st'][$k] = $v; } if (isset($iclsettings)) { $this->save_settings($iclsettings); } echo 1; break; case 'icl_st_more_options':
public function finish_step1($initial_language_code) { $this->set_initial_default_category($initial_language_code); $this->prepopulate_translations($initial_language_code); $this->maybe_set_locale($initial_language_code); icl_set_setting('existing_content_language_verified', 1); icl_set_setting('default_language', $initial_language_code); icl_set_setting('setup_wizard_step', 2); icl_save_settings(); wp_cache_flush(); $this->refresh_active_lang_cache($initial_language_code); add_filter('locale', array($this->sitepress, 'locale_filter'), 10, 1); if ($this->sitepress->is_rtl($initial_language_code)) { $GLOBALS['text_direction'] = 'rtl'; $this->sitepress->rtl_fix(); } else { unset($GLOBALS['text_direction']); } $GLOBALS['wp_locale'] = new WP_Locale(); $GLOBALS['locale'] = $this->sitepress->get_locale($initial_language_code); do_action('icl_initial_language_set'); }